Example #1
0
}
echo '<input type="submit" name="doExit" class="btn btn-success"
    onclick="location=\'' . addSession('admin.php') . '\'; return false;" value="Exit">';
echo "</div>";
if ($user_row != false) {
    $user_display = htmlent_utf8($user_row['displayname']) . " (" . htmlent_utf8($user_row['email']) . ")";
    echo "<p><b>Grade record for: " . $user_display . "</b></p>\n";
}
echo '<br clear="all"/>';
// Delay flash messages
$OUTPUT->flashMessages();
if ($submit_row === false) {
    echo "<p>This student has not made a submission.</p>\n";
} else {
    $submit_json = json_decode($submit_row['json']);
    showSubmission($LTI, $assn_json, $submit_json, $assn_id, $user_id);
}
echo '<form method="post">
      <input type="hidden" name="user_id" value="' . $user_id . '">';
if ($next_user_id_ungraded !== false) {
    echo '<input type="hidden" name="next_user_id_ungraded" value="' . $next_user_id_ungraded . '">';
}
if ($assn_json->instructorpoints > 0) {
    echo '<label for="inst_points">Instructor Points</label>
          <input type="number" name="inst_points" id="inst_points" min="0" ';
    echo 'max="' . $assn_json->instructorpoints . '" value="' . $submit_row["inst_points"] . '">';
    echo " (Maximum " . $assn_json->instructorpoints . ' points)<br/>';
}
echo '<label for="inst_note">Instructor Note To Student</label><br/>
      <textarea name="inst_note" id="inst_note" style="width:60%" rows="5">';
echo htmlent_utf8($submit_row['inst_note']);
Example #2
0
    if (count($to_grade) > 0 && ($USER->instructor || $grade_count < $assn_json->maxassess)) {
        echo '<a href="grade.php" class="btn btn-default">Peer grade other students</a> ' . "\n";
        // Add a done button if needed
        echo "<p> You have peer graded " . $grade_count . " other student submissions.\n    You must grade at least " . $assn_json->minassess . " submissions for full credit on this assignment.\n    You <i>can</i> grade up to " . $assn_json->maxassess . " submissions if you like.</p>\n";
    } else {
        if (count($to_grade) > 0) {
            echo '<p>You have graded the maximum number of submissions. Congratulations!<p>';
        } else {
            echo '<p>There are no submisions waiting to be graded. Please check back later.</p>';
        }
    }
}
// We have a submission already
$submit_json = json_decode($submit_row['json']);
echo "<p><b>Your Submission:</b></p>\n";
showSubmission($LTI, $assn_json, $submit_json, $assn_id, $USER->id);
if ($submit_row['inst_points'] > 0) {
    echo "<p>Instructor grade on assignment: " . $submit_row['inst_points'] . "</p>\n";
}
if (strlen($submit_row['inst_note']) > 0) {
    echo "<p>Instructor Note:<br/>";
    echo htmlent_utf8($submit_row['inst_note']);
    echo "</p>\n";
}
if ($assn_json->maxassess < 1) {
    // Do nothing
} else {
    if (count($our_grades) < 1) {
        echo "<p>No peers have graded your submission yet.</p>";
    } else {
        echo "<div style=\"padding:3px\"><p>You have the following grades from other students:</p>";
Example #3
0
}
if (count($to_grade) > 0 && ($USER->instructor || $grade_count < $assn_json->maxassess)) {
    echo '<a href="grade.php" class="btn btn-default">Grade other students</a> ' . "\n";
    // Add a done button if needed
    echo "<p> You have graded " . $grade_count . " other student submissions.\nYou must grade at least " . $assn_json->minassess . " submissions for full credit on this assignment.\nYou <i>can</i> grade up to " . $assn_json->maxassess . " submissions if you like.</p>\n";
} else {
    if (count($to_grade) > 0) {
        echo '<p>You have graded the maximum number of submissions. Congratulations!<p>';
    } else {
        echo '<p>There are no submisions waiting to be graded. Please check back later.</p>';
    }
}
// We have a submission already
$submit_json = json_decode($submit_row['json']);
echo "<p><b>Your Submission:</b></p>\n";
showSubmission($LTI, $assn_json, $submit_json);
if (count($our_grades) < 1) {
    echo "<p>No one has graded your submission yet.</p>";
} else {
    echo "<div style=\"padding:3px\"><p>You have the following grades from other students:</p>";
    echo '<table border="1" class="table table-hover table-condensed table-responsive">';
    echo "\n<tr><th>Points</th><th>Comments</th><th>Action</th></tr>\n";
    $max_points = false;
    foreach ($our_grades as $grade) {
        if ($max_points === false) {
            $max_points = $grade['points'];
        }
        $show = $grade['points'];
        if ($show < $max_points) {
            $show = '';
        }