本文整理汇总了PHP中emarking_tabs函数的典型用法代码示例。如果您正苦于以下问题:PHP emarking_tabs函数的具体用法?PHP emarking_tabs怎么用?PHP emarking_tabs使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了emarking_tabs函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: require_login
require_login($course->id);
if (isguestuser()) {
die;
}
$PAGE->set_url($urlemarking);
$PAGE->set_context($context);
$PAGE->set_course($course);
$PAGE->set_pagelayout('incourse');
$PAGE->set_cm($cm);
$PAGE->set_title(get_string('emarking', 'mod_emarking'));
$PAGE->navbar->add(get_string('emarking', 'mod_emarking'));
$PAGE->navbar->add(get_string('predefinedcomments', 'mod_emarking'));
echo $OUTPUT->header();
echo $OUTPUT->heading($emarking->name);
// Output of the tabtree.
echo $OUTPUT->tabtree(emarking_tabs($context, $cm, $emarking), "comment");
// Action action on delete.
if ($action == "delete") {
// Getting record to delete.
$DB->delete_records('emarking_predefined_comment', array('id' => $commentid));
echo $OUTPUT->notification(get_string('changessaved', 'mod_emarking'), 'notifysuccess');
$action = "list";
}
// Action on edit.
if ($action == "edit") {
// Geting previous data, so we can reuse it.
if (!($editingcomment = $DB->get_record('emarking_predefined_comment', array('id' => $commentid)))) {
print_error(get_string('invalidid', 'mod_emarking'));
}
// Creating new form and giving the var it needs to pass.
$editcommentform = new EditCommentForm(null, array('text' => $editingcomment->text, 'cmid' => $cm->id, 'commentid' => $commentid));
示例2: emarking_download_excel_perception
}
// Download Excel if it is the case.
if ($exportcsv && $exportcsv === 'justice' && $usercangrade && $issupervisor) {
emarking_download_excel_perception($emarking, $context);
die;
}
// Page settings (URL, breadcrumbs and title).
$PAGE->set_context($context);
$PAGE->set_course($course);
$PAGE->set_cm($cm);
$PAGE->set_url($url);
$PAGE->set_pagelayout('incourse');
echo $OUTPUT->header();
echo $OUTPUT->heading($emarking->name);
// Print eMarking tabs.
echo $OUTPUT->tabtree(emarking_tabs($context, $cm, $emarking), "justicereport");
if ($issupervisor && $emarking->type == EMARKING_TYPE_ON_SCREEN_MARKING && $emarking->justiceperception) {
$csvurl = new moodle_url('justice.php', array('id' => $cm->id, 'exportcsv' => 'justice'));
echo $OUTPUT->single_button($csvurl, get_string('exporttoexcel', 'mod_emarking'));
}
// Get rubric instance.
list($gradingmanager, $gradingmethod, $definition, $rubriccontroller) = emarking_validate_rubric($context, true, true);
// Calculates the number of criteria for this evaluation.
$numcriteria = count($definition->rubric_criteria);
$emarkingids = '' . $emarking->id;
$studentsanswered = $DB->get_records_sql("\nSELECT\n\ts.emarking,\n\te.course,\n c.shortname,\n c.fullname,\n\tCOUNT(DISTINCT s.student) AS total,\n\tCOUNT(DISTINCT p.id) AS answered\nFROM {emarking_submission} s\nINNER JOIN {emarking_draft} d ON (d.qualitycontrol = 0 AND d.submissionid = s.id\n AND s.emarking in ({$emarkingids}) AND d.status >= :status)\nINNER JOIN {emarking} e ON (s.emarking = e.id)\nINNER JOIN {course} c ON (e.course = c.id)\nLEFT JOIN {emarking_perception} p ON (p.submission = s.id)\nGROUP BY s.emarking", array("status" => EMARKING_STATUS_PUBLISHED));
foreach ($studentsanswered as $section) {
$pending = $section->total - $section->answered;
$datatable[$section->emarking] = "['Status', 'Students'],\n ['Answered', {$section->answered}],\n ['Not yet', {$pending}]\n ";
}
if ($emarking->justiceperception == EMARKING_JUSTICE_PER_CRITERION) {
示例3: redirect
redirect(new moodle_url("/mod/emarking/print/uploadanswers.php", array("id" => $cm->id)));
die;
}
// Check drafts being graded for reassigning peers.
$sqlnumdraftsgrading = "\n\t SELECT COUNT(DISTINCT d.id) AS numdrafts\n\t\tFROM {emarking_draft} d\n\t\tINNER JOIN {emarking_submission} s ON (s.emarking = :emarking AND d.submissionid = s.id)\n \tWHERE d.status >= " . EMARKING_STATUS_GRADING;
$numdraftsgrading = $DB->count_records_sql($sqlnumdraftsgrading, array("emarking" => $cm->instance));
}
// Get all user which can mark in this activity.
$markers = get_enrolled_users($context, 'mod/emarking:grade');
// Show header and heading.
echo $OUTPUT->header();
// Heading and tabs if we are within a course module.
echo $OUTPUT->heading($emarking->name);
// Navigation tabs.
$tabname = $scan ? "scanlist" : "mark";
echo $OUTPUT->tabtree(emarking_tabs($context, $cm, $emarking), $tabname);
// Reassign peers if everything is ok with it.
if ($reassignpeers && $usercangrade && $issupervisor && $numdraftsgrading == 0) {
if (emarking_assign_peers($emarking)) {
echo $OUTPUT->notification(get_string('transactionsuccessfull', 'mod_emarking'), 'notifysuccess');
} else {
echo $OUTPUT->notification(get_string('fatalerror', 'mod_emarking'), 'notifyproblem');
}
}
// Get rubric instance.
list($gradingmanager, $gradingmethod, $rubriccriteria, $rubriccontroller) = emarking_validate_rubric($context, $emarking->type == EMARKING_TYPE_MARKER_TRAINING || $emarking->type == EMARKING_TYPE_PEER_REVIEW, !$scan);
// Show rubric creation button.
// User filter checking capabilities. If user can not grade, then she can not.
// see other users.
$userfilter = 'WHERE 1=1 ';
if (!$usercangrade) {
示例4: require_login
require_login($course->id);
if (isguestuser()) {
die;
}
// Page settings (URL, breadcrumbs and title)
$PAGE->set_context($context);
$PAGE->set_course($course);
$PAGE->set_cm($cm);
$PAGE->set_url($url);
$PAGE->set_pagelayout('incourse');
$PAGE->set_heading($course->fullname);
$PAGE->navbar->add(get_string('comparativereport', 'mod_emarking'));
echo $OUTPUT->header();
echo $OUTPUT->heading_with_help(get_string('comparativereport', 'mod_emarking'), 'comparativereport', 'mod_emarking');
// Print eMarking tabs
echo $OUTPUT->tabtree(emarking_tabs($context, $cm, $emarking), "comparison");
// Get rubric definitions for both activities
list($gradingmanager, $gradingmethod) = emarking_validate_rubric($context, true);
$controller = $gradingmanager->get_controller($gradingmethod);
$definition = $controller->get_definition();
$totalsubmissions = $DB->count_records_sql("\n\t\tSELECT COUNT(e.id) AS total\n\t\tFROM {emarking_submission} AS e\n\t\tWHERE e.emarking = :emarkingid AND e.grade >= 0 AND e.status >= " . EMARKING_STATUS_RESPONDED, array('emarkingid' => $emarking->id));
if (!$totalsubmissions || $totalsubmissions == 0) {
echo $OUTPUT->notification(get_string('nosubmissionsgraded', 'mod_emarking'), 'notifyproblem');
echo $OUTPUT->footer();
die;
}
$emarkingsform = new emarking_comparativereport_form(null, array('course' => $course, 'cm' => $cm));
$emarkingsform->display();
if ($emarkingsform->get_data()) {
// Get the emarking activity to compare this one to
$emarking2 = $DB->get_record('emarking', array('id' => $emarkingsform->get_data()->emarking2));
示例5: redirect
}
}
redirect($url, get_string('transactionsuccessfull', 'mod_emarking'), 3);
die;
}
if ($action === 'rotate') {
require_capability('mod/emarking:uploadexam', $context);
$fileidtorotate = required_param('file', PARAM_INT);
$newpath = emarking_rotate_image_file($fileidtorotate);
redirect($url, get_string('transactionsuccessfull', 'mod_emarking'), 3);
die;
}
// Display form for uploading zip file.
echo $OUTPUT->header();
echo $OUTPUT->heading($emarking->name);
echo $OUTPUT->tabtree(emarking_tabs($context, $cm, $emarking), 'orphanpages');
?>
<style>
<!--
.fixorphanpage {
display: none;
margin-top: 10px;
position: absolute;
background-color: #fafafa;
padding: 5px;
border: 1px solid #bbb;
color: black !important;
border-radius: 3px;
box-shadow: 2px 2px 2px 2px grey;
}
示例6: require_login
require_login($course->id);
if (isguestuser()) {
die;
}
$url = new moodle_url('/mod/emarking/marking/export.php', array('id' => $cm->id));
$PAGE->set_pagelayout('incourse');
$PAGE->set_popup_notification_allowed(false);
$PAGE->set_url($url);
$PAGE->set_context($context);
$PAGE->set_course($course);
$PAGE->set_cm($cm);
$PAGE->set_title(get_string('emarking', 'mod_emarking'));
$PAGE->navbar->add(get_string('publishtitle', 'mod_emarking'));
echo $OUTPUT->header();
echo $OUTPUT->heading($emarking->name);
echo $OUTPUT->tabtree(emarking_tabs($context, $cm, $emarking), "export");
list($gradingmanager, $gradingmethod, $definition, $rubriccontroller) = emarking_validate_rubric($context, false, false);
if (count($emarkingdst) > 0) {
$destinationemarkings = array();
foreach ($emarkingdst as $destinationid) {
if ($emarkingdestination = $DB->get_record('emarking', array('id' => $destinationid))) {
$destinationemarkings[] = $emarkingdestination;
} else {
print_error("Invalid emarking destination");
}
}
foreach ($destinationemarkings as $emarkingdestination) {
echo $OUTPUT->box_start();
echo $OUTPUT->heading($emarkingdestination->name, 4);
$result = emarking_copy_settings($emarking, $emarkingdestination, $rubricoverride, $markersoverride);
if ($result) {
示例7: isset
$merge = isset($mform->get_data()->merge) ? false : true;
// Inverted as question in form was inverted
$nocache = rand(1, 999999);
// File is ok, process
// Setup de directorios temporales
$tempdir = emarking_get_temp_dir_path($emarking->id);
emarking_initialize_directory($tempdir, true);
// Gets file hash
$newfile = emarking_get_path_from_hash($tempdir, $file->get_pathnamehash(), '', true);
// Display confirmation page before moving to process
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('confirmprocess', 'mod_emarking'));
echo $OUTPUT->tabtree(emarking_tabs($context, $cm, $emarking), "uploadanswers");
echo $OUTPUT->box_start('generalbox');
// If the user confirms it goes to process.php
$confirmurl = new moodle_url('/mod/emarking/print/processanswers.php', array('merge' => $merge, 'file' => $file->get_pathnamehash(), 'emarkingid' => $emarking->id));
// Message changes if it will be merged
$confirmessage = $merge ? 'confirmprocessfilemerge' : 'confirmprocessfile';
// Show confirmation buttons
echo $OUTPUT->confirm(get_string($confirmessage, 'mod_emarking', array('file' => $file->get_filename(), 'assignment' => $emarking->name)), $confirmurl, $urlemarking);
echo $OUTPUT->box_end();
echo $OUTPUT->footer();
die;
}
}
// Display form for uploading zip file
echo $OUTPUT->header();
echo $OUTPUT->heading($emarking->name);
echo $OUTPUT->tabtree(emarking_tabs($context, $cm, $emarking), "uploadanswers");
$mform->display();
echo $OUTPUT->footer();
示例8: require_capability
if (isguestuser()) {
die;
}
// Validate the user has grading capabilities.
require_capability('mod/emarking:grade', $context);
// Page settings (URL, breadcrumbs and title).
$PAGE->set_context($context);
$PAGE->set_course($course);
$PAGE->set_cm($cm);
$PAGE->set_url($url);
$PAGE->set_pagelayout('incourse');
$PAGE->navbar->add(get_string('gradereport', 'grades'));
echo $OUTPUT->header();
echo $OUTPUT->heading($emarking->name);
// Print eMarking tabs.
echo $OUTPUT->tabtree(emarking_tabs($context, $cm, $emarking), "outcomesreport");
list($gradingmanager, $gradingmethod, $definition, $rubriccontroller) = emarking_validate_rubric($context, false, false);
$totalsubmissions = $DB->count_records_sql("\n SELECT COUNT(DISTINCT s.id) AS total\n FROM {emarking_submission} s\n INNER JOIN {emarking_draft} d\n ON (s.emarking = :emarking AND d.status >= " . EMARKING_STATUS_PUBLISHED . " AND d.submissionid = s.id AND d.grade > 0 AND d.qualitycontrol=0)\n ", array('emarking' => $emarking->id));
if (!$totalsubmissions || $totalsubmissions == 0) {
echo $OUTPUT->notification(get_string('nosubmissionspublished', 'mod_emarking'), 'notifyproblem');
echo $OUTPUT->footer();
die;
}
$emarkingids = '' . $emarking->id;
$extracategory = optional_param('categories', 0, PARAM_INT);
$parallels = emarking_get_parallel_courses($course);
$emarkingsform = new emarking_gradereport_form(null, array('course' => $course, 'cm' => $cm, 'parallels' => $parallels, 'id' => $emarkingids));
$emarkingsform->display();
$totalemarkings = 1;
if ($parallels && count($parallels) > 0) {
foreach ($parallels as $pcourse) {
示例9: array
$PAGE->set_cm($cm);
$PAGE->set_url($url);
$PAGE->set_pagelayout('incourse');
$PAGE->set_title(get_string('emarking', 'mod_emarking'));
$PAGE->navbar->add(get_string('settings', 'mod_emarking'));
// Verify capability for security issues
if (!has_capability('mod/emarking:supervisegrading', $context)) {
$item = array('context' => context_module::instance($cm->id), 'objectid' => $cm->id);
// Add to Moodle log so some auditing can be done
\mod_emarking\event\markers_assigned::create($item)->trigger();
print_error(get_string('invalidaccess', 'mod_emarking'));
}
echo $OUTPUT->header();
// Heading and tabs if we are within a course module
echo $OUTPUT->heading($emarking->name);
echo $OUTPUT->tabtree(emarking_tabs($context, $cm, $emarking), "osmsettings");
$mform = new emarking_osm_form(null, array('context' => $context, 'id' => $cm->id, 'emarking' => $emarking, "action" => "addpages"));
// Data was submitted
if ($mform->get_data()) {
$emarking->peervisibility = $mform->get_data()->peervisibility;
$emarking->anonymous = $mform->get_data()->anonymous;
$emarking->justiceperception = $mform->get_data()->justiceperception;
$emarking->linkrubric = isset($mform->get_data()->linkrubric) ? 1 : 0;
$emarking->collaborativefeatures = isset($mform->get_data()->collaborativefeatures) ? 1 : 0;
$emarking->custommarks = $mform->get_data()->custommarks;
$emarking->qualitycontrol = isset($mform->get_data()->qualitycontrol) ? 1 : 0;
$emarking->enableduedate = isset($mform->get_data()->enableduedate) ? 1 : 0;
$emarking->markingduedate = $mform->get_data()->markingduedate;
$emarking->regraderestrictdates = isset($mform->get_data()->regraderestrictdates) ? 1 : 0;
$emarking->regradesopendate = $mform->get_data()->regradesopendate;
$emarking->regradesclosedate = $mform->get_data()->regradesclosedate;
示例10: redirect
$PAGE->set_context($context);
$PAGE->set_course($course);
$PAGE->set_cm($cm);
$PAGE->set_title(get_string('justice', 'mod_emarking'));
$PAGE->set_pagelayout('incourse');
$PAGE->set_heading(get_string('justice.my.evaluations', 'mod_emarking'));
$PAGE->set_url($url);
if (!has_capability('mod/emarking:viewpeerstatistics', $context)) {
redirect(new moodle_url("/mod/emarking/view.php?id={$cmid}"));
}
if (!has_capability('mod/assign:grade', $context) && !$emarking->peervisibility) {
redirect(new moodle_url("/mod/emarking/view.php?id={$cmid}"));
}
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string("ranking", 'mod_emarking'));
echo $OUTPUT->tabtree(emarking_tabs($context, $cm, $emarking), 'ranking');
// Get the grading manager, then method and finally controller
list($gradingmanager, $gradingmethod) = emarking_validate_rubric($context);
$rubriccontroller = $gradingmanager->get_controller($gradingmethod);
$definition = $rubriccontroller->get_definition();
$sqluserid = $usercangrade ? "{$USER->id} OR 1 = 1" : $USER->id;
// Query para obtener listado
$sql = "select\nu.id as studentid,\ncase\nwhen u.id = {$sqluserid} then concat(u.lastname, ', ' ,u.firstname)\nelse 'NN'\nend as student,\na.description,\na.id as criterionid,\nIFNULL(ec.bonus, 0) + IFNULL(b.score, 0) as score,\ns.grade as finalgrade\nfrom {emarking_submission} as s\ninner join {emarking} as sg on (s.emarking = :emarking AND s.emarking = sg.id)\ninner join {course} as co on (sg.course = co.id)\ninner join {user} as u on (s.student = u.id)\ninner join {emarking_page} as ep on (ep.submission = s.id)\ninner join {emarking_comment} as ec on (ec.page = ep.id AND ec.levelid > 0)\ninner join {gradingform_rubric_levels} AS b on (b.id = ec.levelid)\ninner join {gradingform_rubric_criteria} AS a on (a.id = b.criterionid)\nwhere s.status >= 20\ngroup by s.id, a.id\norder by s.grade, s.student, a.description";
$resultset = $DB->get_recordset_sql($sql, array('emarking' => $emarking->id));
if (!$resultset->valid() || count($resultset) == 0) {
echo $OUTPUT->notification(get_string('nosubmissionsgraded', 'mod_emarking'), 'notifyproblem');
echo $OUTPUT->footer();
die;
}
// Procesamiento de la data, se definen headers dinámicos y data dinámica
$nameheader = get_string('justice.graph.student.name', 'mod_emarking');
示例11: require_login
require_login($course, true);
$experimentalgroups = $emarking->experimentalgroups;
$context = context_module::instance($cm->id);
$pagelayout = 'incourse';
$PAGE->set_context($context);
$PAGE->set_course($course);
$PAGE->set_cm($cm);
require_capability('mod/emarking:grade', $context);
$PAGE->set_title("Experimental Groups");
$PAGE->set_pagelayout($pagelayout);
$PAGE->set_heading("Experimental Groups");
$PAGE->set_url(new moodle_url("/mod/emarking/experimentalgroups.php?id={$cmid}"));
//Set a variable for output buffering.
$o = "";
// Print eMarking tabs
$o .= $OUTPUT->tabtree(emarking_tabs($context, $cm, $emarking), "experimentalgroups");
if ($action == "edit") {
$groupId = required_param('groupid', PARAM_INT);
$expGroup = $DB->get_record("emarking_experimental_groups", array("id" => $groupId));
$group = $DB->get_record("groups", array("id" => $expGroup->groupid));
$members = $DB->get_records("groups_members", array("groupid" => $group->id));
$mform = new EditExperimentalGroupForm(null, array('id' => $cmid, 'groupid' => $groupId));
//Form processing and displaying is done here
if ($mform->is_cancelled()) {
//Handle form cancel operation, if cancel button is present on form
$action = "default";
} else {
if ($fromform = $mform->get_data()) {
$expGroupEdit = new stdClass();
$expGroupEdit->id = $fromform->groupid;
$expGroupEdit->datestart = $fromform->datestart;
示例12: html_table
$table = new html_table();
$table->head = array(get_string('justice.similars.name', 'mod_emarking'), get_string('justice.similars.grade', 'mod_emarking'), get_string('justice.similars.actions', 'mod_emarking'));
$data = array();
$pixicon = new pix_icon('i/preview', get_string('viewsubmission', 'mod_emarking'));
$current = 0;
foreach ($exams as $exam) {
$current++;
if ($current < $minstudent || $current > $maxstudent) {
continue;
}
$examarray = array();
$grade = " - ";
if (isset($exam->hidden) && $exam->hidden == true) {
$grade = " ? ";
} else {
if (isset($exam->grade)) {
$grade = round($exam->grade, 2);
}
}
$downloadurl = new moodle_url('/mod/emarking/ajax/a.php', array('action' => 'emarking', 'ids' => $exam->submission));
$examarray[] = $exam->userid == $USER->id ? $exam->firstname . " " . $exam->lastname : "NN";
$examarray[] = $grade;
$examarray[] = $OUTPUT->action_link($downloadurl, null, new popup_action('click', $downloadurl, 'emarking' . $exam->submission, array('menubar' => 'no', 'titlebar' => 'no', 'status' => 'no', 'toolbar' => 'no')), null, $pixicon);
$data[] = $examarray;
}
$table->data = $data;
echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('justice.peercheck', 'mod_emarking'));
echo $OUTPUT->tabtree(emarking_tabs($context, $cm, $emarking), 'viewpeers');
echo html_writer::table($table);
echo $OUTPUT->footer();
示例13: get_coursemodule_from_id
$cm = get_coursemodule_from_id('emarking', $cmid);
$action = optional_param('act', 'default', PARAM_ALPHANUMEXT);
if (!($course = $DB->get_record('course', array('id' => $cm->course)))) {
error('You must specify a valid course ID');
}
if (!($emarking = $DB->get_record('emarking', array('id' => $cm->instance)))) {
error('You must specify a valid emarking ID');
}
require_login($course, true);
$gradeitem = optional_param('gradeitem', '0', PARAM_INT);
$context = context_module::instance($cm->id);
$pagelayout = 'incourse';
$PAGE->set_context($context);
$PAGE->set_course($course);
$PAGE->set_cm($cm);
require_capability('mod/emarking:grade', $context);
$PAGE->set_title("CrowdMarking");
$PAGE->set_pagelayout($pagelayout);
$PAGE->set_heading("CrowdMarking");
$PAGE->set_url(new moodle_url("/mod/emarking/crowd/marking.php?cmid={$cmid}"));
//Autoloading using psr-0 standard http://www.php-fig.org/psr/psr-0/
//Set a variable for output buffering.
$o = "";
// Print eMarking tabs
$o .= $OUTPUT->tabtree(emarking_tabs($context, $cm, $emarking), "crowd");
$crowdmod = new emarking_crowd($cm, $context);
$o .= $crowdmod->view($action);
//
echo $OUTPUT->header();
echo $o;
echo $OUTPUT->footer();
示例14: emarking_get_students_count_for_printing
if ($thiscourse = $DB->get_record('course', array('shortname' => $key))) {
$studentsnumber = emarking_get_students_count_for_printing($thiscourse->id);
$newexam = $exam;
$newexam->id = null;
$newexam->totalstudents = $studentsnumber;
$newexam->course = $thiscourse->id;
$newexam->id = $DB->insert_record('emarking_exams', $newexam);
// Send new print order notification
emarking_send_newprintorder_notification($newexam, $thiscourse);
}
}
}
}
// Done, now redirect to index
if ($cmid > 0) {
$previewurl = new moodle_url('/mod/emarking/exams.php', array('id' => $cm->id, 'examid' => $exam->id));
} else {
$previewurl = new moodle_url('/mod/emarking/exams.php', array('course' => $course->id, 'examid' => $exam->id));
}
redirect($previewurl, get_string('newprintordersuccess', 'mod_emarking'));
die;
}
}
// Moodle header
echo $OUTPUT->header();
echo $OUTPUT->heading_with_help(get_string('newprintorder', 'mod_emarking'), 'newprintorder', 'mod_emarking');
if ($cmid > 0) {
echo $OUTPUT->tabtree(emarking_tabs($context, $cm, $emarking), "newprintorder");
}
$mform->display();
echo $OUTPUT->footer();
示例15: array
// URL for adding a new print order.
$params = $cm->id > 0 ? array("cm" => $cm->id) : array("course" => $course->id);
$PAGE->set_url($url);
$PAGE->set_context($context);
$PAGE->set_course($course);
$PAGE->set_cm($cm);
$PAGE->set_title(get_string("emarking", "mod_emarking"));
$PAGE->set_pagelayout("incourse");
$PAGE->navbar->add(get_string("print", "mod_emarking"));
if (has_capability("mod/emarking:downloadexam", $context)) {
$PAGE->requires->js("/mod/emarking/js/printorders.js");
}
echo $OUTPUT->header();
// Heading and tabs if we are within a course module.
echo $OUTPUT->heading($emarking->name);
echo $OUTPUT->tabtree(emarking_tabs($context, $cm, $emarking), "myexams");
$params = array("course" => $course->id, "emarking" => $emarking->id);
// If there are no exams to show.
if (!($exam = $DB->get_record("emarking_exams", $params))) {
redirect(new moodle_url("/course/modedit.php", array("update" => $cm->id, "return" => "1")));
die("");
}
list($canbedeleted, $multicourse) = emarking_exam_get_parallels($exam);
// Create a new html table.
$examstable = new html_table();
// Table header.
$examstable->head = array(get_string("examdetails", "mod_emarking"), " ");
// CSS classes for each column in the table.
$examstable->colclasses = array("exams_examname", null);
$examstable->data[] = array(get_string("examname", "mod_emarking"), $exam->name);
$details = html_writer::start_tag("div", array("class" => "printdetails"));