Invalid change request. Were submissions selected?
';
}
}
// Get accept/reject/pending count
$r = ocsql_query("SELECT `accepted`, COUNT(*) AS `count` FROM `" . OCC_TABLE_PAPER . "` GROUP BY `accepted`") or err("Unable to get score count");
if (mysql_num_rows($r) == 0) {
warn('No submissions have been made yet.');
}
$accCountAR = array();
while ($l = mysql_fetch_array($r)) {
if (empty($l['accepted'])) {
$accCountAR['Pending'] = $l['count'];
} else {
$accCountAR[$l['accepted']] = $l['count'];
}
}
// Get pending papers advocate recommendation counts
$advcountTotal = 0;
$advCountAR = array();
if (isset($accCountAR['Pending']) && ($accCountAR['Pending'] > 0)) {
$cq = "SELECT `adv_recommendation`, COUNT(`advocateid`) AS `count` FROM `" . OCC_TABLE_PAPER . "`, `" . OCC_TABLE_PAPERADVOCATE . "` WHERE `" . OCC_TABLE_PAPER . "`.`paperid`=`" . OCC_TABLE_PAPERADVOCATE . "`.`paperid` AND `" . OCC_TABLE_PAPER . "`.`accepted` IS NULL GROUP BY `adv_recommendation`";
if ($cr = ocsql_query($cq)) {
while ($cl = mysql_fetch_array($cr)) {
if (empty($cl['adv_recommendation'])) {
$advCountAR['Pending'] = $cl['count'];
} else {
$advCountAR[$cl['adv_recommendation']] = $cl['count'];
}
$advcountTotal += $cl['count'];
}
}
}
// Select sort order
$psort='Submission ID. Title';
$ssort='Score';
$arsort='Adv Recom';
$asort='Advocate';
$pdsort='PC Decision';
$stsort='Sub. Type';
if (!isset($_GET['s'])) {
$_GET['s'] = 'score';
}
switch ($_GET['s']) {
case 'paper':
$psort="Submission ID. Title
" . $OC_sortImg;
$sort = "`paperid`";
break;
case 'advocate':
$asort = "Advocate
" . $OC_sortImg;
$sort = "`name_last`, `name_first`, `paperid`";
break;
case 'advrec':
$arsort = "Adv Recom
" . $OC_sortImg;
$sort = "`adv_recommendation`, `recavg` DESC, `paperid`";
break;
case 'pcdecision':
$pdsort = "PC Decision
" . $OC_sortImg;
$sort = "`accepted`, `recavg` DESC, `paperid`";
break;
case 'subtype':
$stsort = "Sub. Type
" . $OC_sortImg;
$sort = "`module_oc_subtype_type`, `recavg` DESC, `paperid`";
break;
case 'score':
default:
$ssort="Score
" . $OC_sortImg;
$sort = "`recavg` DESC, `paperid`";
$_GET['s'] = 'score';
break;
}
// Display Filter
$aAR = array_keys($OC_acceptanceColorAR);
$aAR[] = 'Pending';
print '
';
$extras = ''; // extra fields to retrieve from DB
if (oc_moduleActive('oc_subtype')) {
$extras .= "`" . OCC_TABLE_PAPER . "`.`module_oc_subtype_type`, ";
}
// Get all papers and decisions
$q = "SELECT `" . OCC_TABLE_PAPER . "`.`paperid`, `" . OCC_TABLE_REVIEWER . "`.`username`, " . $extras . " CONCAT_WS(' ', `" . OCC_TABLE_REVIEWER . "`.`name_first`, `" . OCC_TABLE_REVIEWER . "`.`name_last`) AS `name`, COUNT(`" . OCC_TABLE_PAPERREVIEWER . "`.`reviewerid`) AS `cr`, COUNT(`recommendation`) AS `crec`, ABS(FORMAT(AVG(`recommendation`),2)) AS `recavg`, MAX(`recommendation`) AS `recmax`, MIN(`recommendation`) AS `recmin`, `title`, `accepted`, `adv_recommendation`, MIN(`completed`) AS `reviewscomplete` FROM `" . OCC_TABLE_PAPER . "` LEFT JOIN `" . OCC_TABLE_PAPERREVIEWER . "` ON `" . OCC_TABLE_PAPERREVIEWER . "`.`paperid`=`" . OCC_TABLE_PAPER . "`.`paperid` LEFT JOIN `" . OCC_TABLE_PAPERADVOCATE . "` ON `" . OCC_TABLE_PAPERADVOCATE . "`.`paperid`=`" . OCC_TABLE_PAPER . "`.`paperid` LEFT JOIN `" . OCC_TABLE_REVIEWER . "` ON `" . OCC_TABLE_REVIEWER . "`.`reviewerid`=`" . OCC_TABLE_PAPERADVOCATE . "`.`advocateid` ";
switch($filter) {
case '':
break;
case 'Pending':
$q .= "WHERE (`accepted`='' OR `accepted` IS NULL) ";
break;
default:
$q .= "WHERE `accepted`='" . safeHTMLstr($filter) . "' ";
break;
}
$q .= "GROUP BY `paperid` ORDER BY $sort";
$r = ocsql_query($q) or err("Unable to get scores");
if (mysql_num_rows($r) == 0) {
print 'No submissions available.';
} else {
print '
- Links:
- Score – Show reviews and accept/reject submission
- Submission ID. Title – Show submission info
- Definitions:
- Score = average reviewer recommendation score (if no score, ignored)
- Weight = Number of reviews with a recommendation score
- Weight* = May include reviews marked as incomplete (unassign)
- Range = Min - Max recommendation scores
';
if ($OC_configAR['OC_paperAdvocates']) {
print '
- Adv Recom = Advocate Recommendation
';
if ($advcountTotal > 0) {
print '
- Pending Submissions\' Advocate Recommendation Count:
-
';
$c = 0;
foreach ($OC_acceptanceValuesAR as $acc) {
if ($c++ == 3) {
print "
\n";
$c = 0;
}
print '' . safeHTMLstr($acc['value']) . ' - ' . (isset($advCountAR[$acc['value']]) ? $advCountAR[$acc['value']] : 0) . ' ';
}
print '
None - ' . (isset($advCountAR['Pending']) ? $advCountAR['Pending'] : 0) . '
';
}
}
print '
| |
Legend:
';
foreach ($OC_acceptanceValuesAR as $acc) {
print ' | ' . safeHTMLstr($acc['value']) . ' (' . (isset($accCountAR[$acc['value']]) ? $accCountAR[$acc['value']] : 0) . ') | ';
}
print '
| Pending (' . (isset($accCountAR['Pending']) ? $accCountAR['Pending'] : 0) . ') |
';
if ($OC_configAR['OC_paperAdvocates']) {
print '
| Decision != Recomm. |
';
}
print '
|
';
}
printFooter();
?>