= 1) { while ($l = ocsql_fetch_assoc($r)) { $fields .= ", `" . $l['Field'] . "`=NULL"; } } // clear out if ($_POST['type'] == 'All Submissions') { issueSQL("TRUNCATE `" . OCC_TABLE_PAPERSESSION . "`"); issueSQL("UPDATE `" . OCC_TABLE_PAPERREVIEWER . "` SET " . $fields); } else { if ($_POST['type'] == 'Pending') { $acceptedValue = ' IS NULL'; } elseif (in_array($_POST['type'], $accTypesAR)) { $acceptedValue = "='" . safeSQLstr($_POST['type']) . "'"; } else { warn('Invalid acceptance type'); } issueSQL("DELETE FROM `" . OCC_TABLE_PAPERSESSION . "` WHERE `" . OCC_TABLE_PAPERSESSION . "`.`paperid` IN (SELECT `" . OCC_TABLE_PAPER . "`.`paperid` FROM `" . OCC_TABLE_PAPER . "` WHERE `" . OCC_TABLE_PAPER . "`.`accepted`" . $acceptedValue . ")"); issueSQL("UPDATE `" . OCC_TABLE_PAPERREVIEWER . "` `pr` INNER JOIN `" . OCC_TABLE_PAPER . "` `p` ON `pr`.`paperid`=`p`.`paperid` SET `pr`." . preg_replace("/, `/", ", `pr`.`", $fields) . " WHERE `p`.`accepted`" . $acceptedValue); } $count = ocsql_affected_rows(); // Hook if (oc_hookSet('chair-clear-review')) { foreach ($OC_hooksAR['chair-clear-review'] as $f) { require_once $f; } } // confirm print '

'; if ($count > 0) { print safeHTMLstr($count) . ' review records have been cleared'; } else { print 'No reviews found to be cleared'; } print '

'; } print '

Clicking the button below will clear out data for all built-in and custom review form fields while maintaining review assignments. Only click the button if you intend on having reviewers start the review process anew. Backing up the database and exporting reviews is recommended prior to clearing review data.

keep comments to

'; printFooter(); ?>