Invalid change request action.
';
}
} else {
print '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 (ocsql_num_rows($r) == 0) {
warn('No submissions have been made yet.');
}
$accCountAR = array();
while ($l = ocsql_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 = ocsql_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='Advocate
Recom.';
$asort='Advocate';
$pdsort='Final
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 = "Final Decision
" . $OC_sortImg;
$sort = "`accepted`, `recavg` DESC, `paperid`";
break;
case 'type':
$stsort = "Type
" . $OC_sortImg;
$sort = "`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 '
';
// Type?
$OC_trackType = false;
$sr = ocsql_query("SELECT COUNT(*) AS `count` FROM `" . OCC_TABLE_PAPER . "` WHERE `type`!='' AND `type` IS NOT NULL") or err('Unable to check type field');
if (($sl = ocsql_fetch_assoc($sr)) && ($sl['count'] > 0)) {
$OC_trackType = true;
}
// Get all papers and decisions
$q = "SELECT `" . OCC_TABLE_PAPER . "`.`paperid`, `" . OCC_TABLE_PAPER . "`.`type`, `" . OCC_TABLE_REVIEWER . "`.`username`, CONCAT_WS(' ', `" . OCC_TABLE_REVIEWER . "`.`name_first`, `" . OCC_TABLE_REVIEWER . "`.`name_last`) AS `name`, COUNT(`" . OCC_TABLE_PAPERREVIEWER . "`.`reviewerid`) AS `cr`, COUNT(`score`) AS `crec`, ABS(FORMAT(AVG(`score`),2)) AS `recavg`, MAX(`score`) AS `recmax`, MIN(`score`) 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` WHERE 1=1 ";
switch($atype) {
case '':
break;
case 'Pending':
$q .= "AND (`accepted`='' OR `accepted` IS NULL) ";
break;
default:
$q .= "AND `accepted`='" . safeSQLstr($atype) . "' ";
break;
}
switch($stype) {
case '':
break;
default:
$q .= "AND `type`='" . safeSQLstr($stype) . "' ";
break;
}
$q .= "GROUP BY `paperid` ORDER BY $sort";
$r = ocsql_query($q) or err("Unable to get scores");
if (ocsql_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 score across reviews (if no score, ignored)
- Weight = Number of reviews with a score
- Weight* = May include reviews marked as incomplete (unassign)
- Range = Min - Max 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 != Recom. |
';
}
print '
|
';
}
printFooter();
?>