Example #1
0
    <?php 
    if (file_exists(REVIEWER_ASSIGNMENTS_FILE)) {
        echo "<p>\nYou have been assigned the following papers to review. Click on a title to download a paper. Use the box next to the title to upload your review for that paper.\n</p>\n";
        $revs = read_reviewer_assignments();
        $papers_for_the_user = compile_papers_for_reviewer_by_email_address($revs, $the_user->get_email_address());
        echo "<p>\n" . generate_review_upload_table($papers_for_the_user, $USERINVENTORY, $the_user) . "\n</p>\n";
    } else {
        echo "<p>\nNo papers are available to review yet. Please check back later.\n</p>\n";
    }
    ?>

  <h2>Reviews of your paper</h2>

  <?php 
    if ($PROJECTSTATE->get_reviews_available_status()) {
        $revs = read_reviewer_assignments();
        echo generate_review_retrieval_table($revs, $the_user->get_email_address(), $USERINVENTORY);
    } else {
        echo '<p>No reviews are currently available.</p>';
    }
    ?>

  <?php 
    // USER LOGIN ERRORS
} else {
    foreach ($login_errors as $e) {
        echo $e . "<br>";
    }
}
?>
Example #2
0
  <?php 
    if (file_exists(REVIEWER_ASSIGNMENTS_FILE)) {
        echo "<p>\nThe current reviewer assignments are as follows:\n</p>";
        echo "<p>\n" . generate_reviewer_assignment_table(read_reviewer_assignments(), $USERINVENTORY) . "\n</p>";
        echo '<p>' . generate_batch_review_download_link() . '</p>' . "\n";
    }
    ?>


  <h2>Review Distribution</h2>

  <?php 
    if (file_exists(REVIEWER_ASSIGNMENTS_FILE)) {
        // not elegant: how many reviews are we supposed to have? check how many the first user is supposed to have * how many users we have
        $total_expected_reviews = count(read_reviewer_assignments()[$USERINVENTORY->get_users()[0]->get_email_address()]) * count($USERINVENTORY->get_users());
        $total_received_reviews = 0;
        foreach ($USERINVENTORY->get_users() as $u) {
            $total_received_reviews += count($u->get_submitted_reviews());
        }
        echo '<p>' . $total_received_reviews . ' out of ' . $total_expected_reviews . ' have been submitted so far.</p>';
        $reviews_awaited = $total_expected_reviews - $total_received_reviews;
        if ($reviews_awaited > 0) {
            echo '<b>Note: Reviews submitted after distribution is enabled (still waiting on ' . $reviews_awaited . ' more) will immediately be viewable by authors without your approval.</b>';
        }
        echo '</p>';
        $revs_on_string = '';
        $revs_off_string = '';
        if ($PROJECTSTATE->get_reviews_available_status()) {
            $revs_on_string = ' checked';
        } else {