' . oc_('File') . ''; // table header used for file column $formatField = '`format`'; // paper table format field $extraCols = 0; // extra columns to skip when displaying ZIP download icons (e.g., abstract, type) $abstractCol = 'Abstract'; // name for abstract column -- set to empty to not display $advocateOrder = '!ISNULL(`adv_recommendation`), `paperid`'; // Submission to Advocate ORDER BY fields $showReviewScore = false; // EXPERIMENTAL. Displays review score in Submissions to Review table beginSession(); printHeader(oc_('Committee Member'), 2); print "
\n"; $conflictAR = getConflicts($_SESSION[OCC_SESSION_VAR_NAME]['acreviewerid']); if (oc_hookSet('committee-menu-preprocess')) { foreach ($OC_hooksAR['committee-menu-preprocess'] as $v) { require_once $v; } } if (!empty($abstractCol)) { $extraCols++; } // it's here so it's checked after the hook // Track 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; $extraCols++; } // Can reviewers still sign-in? if ($OC_statusAR['OC_rev_signin_open']) { $extraFields = ''; print '
' . safeHTMLstr(oc_('View Submissions')) . '

'; if (oc_hookSet('committee-menu-prereview')) { foreach ($OC_hooksAR['committee-menu-prereview'] as $v) { print '
• ' . $v . '

'; } } if (oc_hookSet('committee-menu-pc-prereview') && ($_SESSION[OCC_SESSION_VAR_NAME]['acpc'] == "T") && $OC_statusAR['OC_pc_signin_open']) { foreach ($OC_hooksAR['committee-menu-pc-prereview'] as $v) { print '
• ' . $v . '

'; } } // Is reviewing open? if ($OC_statusAR['OC_reviewing_open']) { print '
' . safeHTMLstr(oc_('Submissions to Review:')) . '

'; // delete assignments? if (($OC_configAR['OC_reviewerUnassignReviews'] == 1) && isset($_POST['ocaction']) && ($_POST['ocaction'] == 'Delete Review Assignments') && isset($_POST['submissions']) && is_array($_POST['submissions']) && (count($_POST['submissions'] > 0)) ) { // Check for valid submission if (!validToken('ac')) { warn(oc_('Invalid submission')); } // iterate through subs foreach ($_POST['submissions'] as $sid) { if (!preg_match("/^[1-9]\d*$/", $sid)) { warn(oc_('Invalid request')); } // verify assignment if (($unassign_r1 = ocsql_query("SELECT `" . OCC_TABLE_PAPERREVIEWER . "`.`paperid` AS `sid`, `" . OCC_TABLE_PAPERREVIEWER . "`.`reviewerid`, `" . OCC_TABLE_PAPER . "`.`title`, `" . OCC_TABLE_REVIEWER . "`.`username`, CONCAT_WS(' ', `" . OCC_TABLE_REVIEWER . "`.`name_first`, `" . OCC_TABLE_REVIEWER . "`.`name_last`) AS `name` FROM `" . OCC_TABLE_REVIEWER . "`, `" . OCC_TABLE_PAPERREVIEWER . "`, `" . OCC_TABLE_PAPER . "` WHERE `" . OCC_TABLE_PAPERREVIEWER . "`.`reviewerid`='" . safeSQLstr($_SESSION[OCC_SESSION_VAR_NAME]['acreviewerid']) . "' AND `" . OCC_TABLE_PAPERREVIEWER . "`.`paperid`='" . safeSQLstr($sid) . "' AND `" . OCC_TABLE_PAPERREVIEWER . "`.`paperid`=`" . OCC_TABLE_PAPER . "`.`paperid` AND `" . OCC_TABLE_PAPERREVIEWER . "`.`reviewerid`=`" . OCC_TABLE_REVIEWER . "`.`reviewerid`")) && (ocsql_num_rows($unassign_r1) == 1) && ($unassign_l1 = ocsql_fetch_assoc($unassign_r1)) ) { $mailto = ''; // retrieve advocate email for notification if ( ($unassign_r2 = ocsql_query("SELECT `" . OCC_TABLE_REVIEWER . "`.`email` FROM `" . OCC_TABLE_REVIEWER . "`, `" . OCC_TABLE_PAPERADVOCATE . "` WHERE `" . OCC_TABLE_PAPERADVOCATE . "`.`paperid`='" . safeSQLstr($sid) . "' AND `" . OCC_TABLE_PAPERADVOCATE . "`.`advocateid`=`" . OCC_TABLE_REVIEWER . "`.`reviewerid`")) && (ocsql_num_rows($unassign_r2) == 1) && ($unassign_l2 = ocsql_fetch_assoc($unassign_r2)) ) { $mailto = $unassign_l2['email']; } // delete assignment oc_deleteAssignments($sid, $_SESSION[OCC_SESSION_VAR_NAME]['acreviewerid'], 'reviewer', 'reviewer'); // notify list($mailsubject, $mailbody) = oc_getTemplate('committee-reviewunassign'); $mailsubject = oc_replaceVariables($mailsubject, $unassign_l1); $mailbody = oc_replaceVariables($mailbody, $unassign_l1); sendEmail($mailto, $mailsubject, $mailbody, 1); } } } // show reviews $q = "SELECT `" . OCC_TABLE_PAPERREVIEWER . "`.`paperid`, `" . OCC_TABLE_PAPERREVIEWER . "`.`score`, " . $formatField . ", `title`, `type`, `completed`" . $extraFields . " FROM `" . OCC_TABLE_PAPERREVIEWER . "`, `" . OCC_TABLE_PAPER . "` WHERE `reviewerid`='" . safeSQLstr($_SESSION[OCC_SESSION_VAR_NAME]['acreviewerid']) . "' AND `" . OCC_TABLE_PAPERREVIEWER . "`.`paperid`=`" . OCC_TABLE_PAPER . "`.`paperid` ORDER BY CAST(`completed` AS CHAR), `paperid`"; $r = ocsql_query($q) or err("Unable to retrieve submissions for review"); if (ocsql_num_rows($r) == 0) { print '' . safeHTMLstr(oc_('You do not have any submissions to review.')) . '

'; } else { print '

' . sprintf(oc_('A blank review form (that opens in a separate window) is available for you to print out if you prefer writing it out before typing it in.'), 'review.php?pid=blank') . '

'; print '
' . safeHTMLstr(oc_('Legend:')) . '    o    ' . safeHTMLstr(oc_('Review completed')) . ($showReviewScore ? (' (' . oc_('Score') . ')') : '') . '      x    ' . safeHTMLstr(oc_('Review not yet completed')) . '


'; if ($OC_configAR['OC_reviewerUnassignReviews'] == 1) { print '
'; } print ''; if ($OC_configAR['OC_reviewerUnassignReviews'] == 1) { print ''; $extraCols++; // do it here so it doesn't impact advocate table } print '' . (!empty($abstractCol) ? ('') : ''); if ($OC_trackType) { //T: Type = Submission Type (e.g., paper, poster) print ''; } print $fileTableHeader . ''; $row = 1; $OC_downloadZipAR = array(); while ($p = ocsql_fetch_array($r)) { if ($p['completed'] == "T") { $bgcolor = '#afa'; $symbol = (($showReviewScore && preg_match("/^\d+$/", $p['score'])) ? $p['score'] : 'o'); } else { $bgcolor = '#fcc'; $symbol = 'x'; } print ''; if ($OC_configAR['OC_reviewerUnassignReviews']) { print ''; } print ''; if (!empty($abstractCol)) { print ''; } if ($OC_trackType) { print ''; } print oc_printFileCells($p) . "\n"; $row = $rowAR[$row]; } if (class_exists('ZipArchive')) { if (oc_hookSet('print_file_cells_zip')) { $str = call_user_func($GLOBALS['OC_hooksAR']['print_file_cells_zip'][0], $row, ($extraCols + 2)); // only one hook allowed here print $str; } elseif (isset($OC_downloadZipAR[1]) && ($OC_downloadZipAR[1] > 1)) { print ''; } } print "
* ' . safeHTMLstr(oc_('Title - click for review form')) . '' . safeHTMLstr(oc_($abstractCol)) . '' . safeHTMLstr(oc_('Type')) . '
 ' . $symbol . ' ' . $p['paperid'] . ' - ' . safeHTMLstr($p['title']) . '' . safeHTMLstr(oc_('view abstract')) . '' . varValue('type', $p, ' ', true) . '
 ' . safeHTMLstr(oc_('Download All')) . '
ZIP
\n"; if ($OC_configAR['OC_reviewerUnassignReviews']) { print '
*
'; $extraCols--; // undo it here so it doesn't impact advocate table } } print '
'; } } if (($_SESSION[OCC_SESSION_VAR_NAME]['acpc'] == "T") && $OC_statusAR['OC_pc_signin_open']) { $extraFields = ''; $extraGroupByFields = ''; if (! $OC_statusAR['OC_rev_signin_open']) { print '
' . safeHTMLstr(oc_('View Submissions')) . '

'; if (oc_hookSet('committee-menu-prereview')) { foreach ($OC_hooksAR['committee-menu-prereview'] as $v) { print '
• ' . $v . '

'; } } if (oc_hookSet('committee-menu-pc-prereview') && ($_SESSION[OCC_SESSION_VAR_NAME]['acpc'] == "T") && $OC_statusAR['OC_pc_signin_open']) { foreach ($OC_hooksAR['committee-menu-pc-prereview'] as $v) { print '
• ' . $v . '

'; } } } if ($OC_configAR['OC_paperAdvocates'] && $OC_statusAR['OC_advocating_open']) { print '
' . safeHTMLstr(oc_('Submissions to Advocate:')) . '

'; $q = "SELECT `" . OCC_TABLE_PAPERADVOCATE . "`.`paperid`, `" . OCC_TABLE_PAPERADVOCATE . "`.`adv_recommendation`, " . $formatField . ", `title`, `type`, AVG(`score`) AS `paperavg`" . $extraFields . " FROM (`" . OCC_TABLE_PAPERADVOCATE . "`, `" . OCC_TABLE_PAPER . "`) LEFT JOIN `" . OCC_TABLE_PAPERREVIEWER . "` ON `" . OCC_TABLE_PAPERADVOCATE . "`.`paperid`=`" . OCC_TABLE_PAPERREVIEWER . "`.`paperid` WHERE `" . OCC_TABLE_PAPERADVOCATE . "`.`advocateid`='" . safeSQLstr($_SESSION[OCC_SESSION_VAR_NAME]['acreviewerid']) . "' AND `" . OCC_TABLE_PAPERADVOCATE . "`.`paperid`=`" . OCC_TABLE_PAPER . "`.`paperid` GROUP BY `paperid`, `adv_recommendation`, " . $formatField . ", `title`, `type`" . $extraGroupByFields . " ORDER BY " . $advocateOrder; $r = ocsql_query($q) or err("Unable to retrieve submissions for advocating"); if (ocsql_num_rows($r) == 0) { print '' . safeHTMLstr(oc_('You do not have any submissions to advocate.')) . '

'; } else { //T: Recom. = Recommendation (e.g., Accept, Reject) [abbreviate if possible]; Score = Average reviews score print '' . (!empty($abstractCol) ? ('') : ''); if ($OC_trackType) { //T: Type = Submission Type (e.g., paper, poster) print ''; } print $fileTableHeader . ''; $row = 1; $OC_downloadZipAR = array(); while ($p = ocsql_fetch_array($r)) { if ($p['paperavg'] != '') { $usescore = number_format($p['paperavg'], 2); } else { $usescore = '–'; } print ''; if (!empty($abstractCol)) { print ' '; } if ($OC_trackType) { print ''; } print oc_printFileCells($p) . "\n"; $row = $rowAR[$row]; } if (class_exists('ZipArchive')) { if (oc_hookSet('print_file_cells_zip')) { $str = call_user_func($GLOBALS['OC_hooksAR']['print_file_cells_zip'][0], $row, ($extraCols + 3), 1); // only one hook allowed here print $str; } elseif (isset($OC_downloadZipAR[1]) && ($OC_downloadZipAR[1]['count'] > 1)) { print ''; } } print "
' . safeHTMLstr(oc_('Recom.')) . '' . safeHTMLstr(oc_('Score')) . '' . safeHTMLstr(oc_('Title - click for recommendation form')) . '' . safeHTMLstr(oc_($abstractCol)) . '' . safeHTMLstr(oc_('Type')) . '
'. safeHTMLstr($p['adv_recommendation']) . '' . $usescore . '' . $p['paperid'] . ' - ' . safeHTMLstr($p['title']) . '' . safeHTMLstr(oc_('view abstract')) . '' . varValue('type', $p, ' ', true) . '
 ' . safeHTMLstr(oc_('Download All')) . '
ZIP
\n"; } print '

'; } } print "
\n"; if (!empty($OC_configAR['OC_committeeFooter'])) { print '
' . (preg_match("/\<(?:p|br) ?\/?\>/", $OC_configAR['OC_committeeFooter']) ? oc_($OC_configAR['OC_committeeFooter']) : nl2br(oc_($OC_configAR['OC_committeeFooter']))) . '
'; } printFooter(); ?>