} } </script> <?php } $showpages->print_html(); if ($usercanpublishgrades && $unpublishedsubmissions > 0 && $rubriccriteria) { echo "<input style='float:right;' type='submit' onclick='return validatePublish();' value='" . get_string('publishselectededgrades', 'mod_emarking') . "'>"; echo "</form>"; } else { if ($usercanpublishgrades && $unpublishedsubmissions == 0) { echo "<script>\$('#select_all').hide();</script>"; } } $submission = $DB->get_record('emarking_submission', array('emarking' => $emarking->id, 'student' => $USER->id)); $orphanpages = emarking_get_digitized_answer_orphan_pages($context); $numorphanpages = count($orphanpages); if ($numorphanpages > 0) { $orphanpagesurl = new moodle_url('/mod/emarking/print/orphanpages.php', array('id' => $cm->id)); echo $OUTPUT->action_link($orphanpagesurl, get_string('thereareorphanpages', 'mod_emarking', $numorphanpages)); } // If the user is a tutor or teacher we don't include justice perception. if ($usercangrade || !$submission) { echo $OUTPUT->footer(); die; } // JUSTICE PERCEPTION FOR CURRENT USER. if ($emarking->justiceperception != EMARKING_JUSTICE_DISABLED && !$submission->seenbystudent) { echo $OUTPUT->heading(get_string("justice", "mod_emarking"), 4); echo $OUTPUT->notification(get_string("mustseefeedbackbeforejustice", "mod_emarking"), "notifymessage"); echo $OUTPUT->footer();
/** * Shows a link to the orphan pages interface when there are orphan pages for this activity. * * @param unknown $context */ function emarking_show_orphan_pages_link($context, $cm) { global $OUTPUT; $orphanpages = emarking_get_digitized_answer_orphan_pages($context); $numorphanpages = count($orphanpages); if ($numorphanpages > 0) { $orphanpagesurl = new moodle_url('/mod/emarking/print/orphanpages.php', array('id' => $cm->id)); echo $OUTPUT->action_link($orphanpagesurl, get_string('thereareorphanpages', 'mod_emarking', $numorphanpages)); } }