• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP emarking_tabs函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中emarking_tabs函数的典型用法代码示例。如果您正苦于以下问题:PHP emarking_tabs函数的具体用法?PHP emarking_tabs怎么用?PHP emarking_tabs使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了emarking_tabs函数的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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));
开发者ID:hansnok,项目名称:emarking,代码行数:31,代码来源:predefinedcomments.php


示例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) {
开发者ID:hansnok,项目名称:emarking,代码行数:31,代码来源:justice.php


示例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) {
开发者ID:sikeze,项目名称:emarking,代码行数:31,代码来源:view.php


示例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));
开发者ID:jorgecabane93,项目名称:eMarkingWeb,代码行数:31,代码来源:comparativereport.php


示例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;
}
开发者ID:hansnok,项目名称:emarking,代码行数:30,代码来源:orphanpages.php


示例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) {
开发者ID:hansnok,项目名称:emarking,代码行数:31,代码来源:export.php


示例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();
开发者ID:eduagdo,项目名称:emarking,代码行数:31,代码来源:uploadanswers.php


示例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) {
开发者ID:hansnok,项目名称:emarking,代码行数:31,代码来源:outcomes.php


示例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;
开发者ID:pspro360,项目名称:emarking,代码行数:31,代码来源:settings.php


示例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');
开发者ID:jorgecabane93,项目名称:eMarkingWeb,代码行数:31,代码来源:ranking.php


示例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;
开发者ID:jorgecabane93,项目名称:eMarkingWeb,代码行数:31,代码来源:experimentalgroups.php


示例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();
开发者ID:jorgecabane93,项目名称:eMarkingWeb,代码行数:31,代码来源:viewpeers.php


示例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();
开发者ID:jorgecabane93,项目名称:eMarkingWeb,代码行数:31,代码来源:marking.php


示例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();
开发者ID:jorgecabane93,项目名称:eMarkingWeb,代码行数:31,代码来源:newprintorder.php


示例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"), "&nbsp;");
// 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"));
开发者ID:hansnok,项目名称:emarking,代码行数:31,代码来源:exam.php


示例16: require_login

require_login($course->id);
if (isguestuser()) {
    die;
}
$PAGE->set_url($url);
$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('importrubric', 'mod_emarking'));
echo $OUTPUT->header();
echo $OUTPUT->heading($emarking->name);
// Output of the tabtree.
echo $OUTPUT->tabtree(emarking_tabs($context, $cm, $emarking), 'importrubric');
list($gradingmanager, $gradingmethod, $definition, $rubriccontroller) = emarking_validate_rubric($context, false, false);
// Form Display.
$predefinedform = new emarking_import_excel_form(null, array('cmid' => $cm->id));
if ($predefinedform->get_data()) {
    // Use csv importer from Moodle.
    $iid = csv_import_reader::get_new_iid('emarking-predefined-comments');
    $reader = new csv_import_reader($iid, 'emarking-predefined-comments');
    $content = $predefinedform->get_data()->comments;
    $reader->load_csv_content($content, 'utf8', 'tab');
    $columns = array();
    $columns[] = html_writer::div(get_string('criterion', 'mod_emarking'));
    $columns[] = html_writer::div(get_string('rubriclevel', 'mod_emarking'));
    $data = array();
    $definitiondata = array();
    $ignoredcolumns = $reader->get_columns();
开发者ID:hansnok,项目名称:emarking,代码行数:31,代码来源:importrubric.php


示例17: require_capability

$context = context_module::instance($cm->id);
require_capability('mod/emarking:grade', $context);
require_capability('mod/emarking:regrade', $context);
$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->set_url(new moodle_url("/mod/emarking/marking/regraderequests.php?id={$cmid}"));
$PAGE->navbar->add(get_string('regrades', 'mod_emarking'));
$PAGE->requires->jquery();
$PAGE->requires->jquery_plugin('ui');
$PAGE->requires->jquery_plugin('ui-css');
echo $OUTPUT->header();
echo $OUTPUT->heading($emarking->name);
echo $OUTPUT->tabtree(emarking_tabs($context, $cm, $emarking), "regrades");
$sql = "select \n\t\t\trg.*,\n\t\t\tu.id AS userid,\n\t\t\tu.firstname,\n\t\t\tu.lastname,\n\t\t\tc.description AS criterion,\n\t\t\tdr.id AS ids,\n\t\t\tdr.status AS status,\n            T.maxscore,\n            T.minscore,\n        CASE WHEN b.score is null AND comment.bonus is null THEN T.minscore\n            WHEN b.score is null THEN round(T.minscore + comment.bonus,2)\n            WHEN comment.bonus is null THEN round(b.score,2)\n\t\t\tELSE  round(b.score + comment.bonus,2) END\n        AS currentscore,\n\t\tround(T.maxscore,2) AS maxscore,\n        round(T.minscore,2) AS minscore,\n\t\tcomment.bonus as currentbonus,\n        ol.score as originalscore,\n        rg.bonus as originalbonus,\n        ol.definition as originaldefinition,\n        b.definition as currentdefinition\nfrom mdl_emarking AS e\ninner join mdl_emarking_submission  AS s ON (s.emarking = :emarking AND s.emarking = e.id)\nINNER JOIN mdl_emarking_draft AS dr ON (dr.submissionid = s.id AND dr.qualitycontrol=0)\nINNER JOIN mdl_emarking_regrade AS rg ON (rg.draft = dr.id)\nINNER JOIN mdl_gradingform_rubric_levels AS ol on (ol.id = rg.levelid)\nINNER JOIN mdl_user  AS u on (s.student = u.id)\nINNER JOIN (\n\t\t\tSELECT\n\t\t\ts.id AS emarkingid,\n\t\t\ta.id AS criterionid,\n\t\t\tMAX(l.score) AS maxscore,\n            MIN(l.score) AS minscore\n\t\t\tFROM mdl_emarking AS s\n\t\t\tINNER JOIN mdl_course_modules  AS cm on (s.id = :emarkingid2 AND s.id = cm.instance)\n\t\t\tINNER JOIN mdl_context  AS c on (c.instanceid = cm.id)\n\t\t\tINNER JOIN mdl_grading_areas  AS ar on (ar.contextid = c.id)\n\t\t\tINNER JOIN mdl_grading_definitions  AS d on (ar.id = d.areaid)\n\t\t\tINNER JOIN mdl_gradingform_rubric_criteria  AS a on (d.id = a.definitionid)\n\t\t\tINNER JOIN mdl_gradingform_rubric_levels  AS l on (a.id = l.criterionid)\n\t\t\tGROUP BY s.id, criterionid\n\t\t) AS T ON (s.emarking = T.emarkingid AND T.criterionid = ol.criterionid)\nINNER JOIN mdl_course  AS co ON (e.course = co.id)\nINNER JOIN mdl_gradingform_rubric_criteria AS c on (ol.criterionid = c.id)\nLEFT JOIN mdl_emarking_comment AS comment ON (comment.draft = dr.id AND comment.criterionid = c.id AND comment.levelid > 0)\nLEFT JOIN mdl_gradingform_rubric_levels AS b on (b.id = comment.levelid)\nLEFT JOIN mdl_emarking_page AS page ON (page.submission = s.id AND comment.page = page.id)\nORDER BY u.lastname ASC, c.sortorder";
$records = $DB->get_records_sql($sql, array("emarking" => $emarking->id, "emarkingid2" => $emarking->id));
if (count($records) == 0) {
    echo $OUTPUT->notification(get_string('noregraderequests', 'mod_emarking'), 'notifyproblem');
    echo $OUTPUT->footer();
    die;
}
$table = new html_table();
$table->head = array(get_string('student', 'grades') . '-' . get_string('criterion', 'mod_emarking'), get_string('motive', 'mod_emarking'), get_string('grade', 'mod_emarking'), get_string('regrade', 'mod_emarking'), '&nbsp;');
$data = array();
foreach ($records as $record) {
    if ($record->accepted) {
        $statusicon = $OUTPUT->pix_icon("i/valid", get_string('replied', 'mod_emarking'));
    } else {
        $statusicon = $OUTPUT->pix_icon("i/flagged", get_string('sent', 'mod_emarking'));
开发者ID:eduagdo,项目名称:emarking,代码行数:31,代码来源:regraderequests.php


示例18: moodle_url

$continue = new moodle_url("/mod/emarking/print/enablefeatures.php", array("id" => $cmid, "type" => $newtype, "confirm" => "true"));
$cancel = new moodle_url("/mod/emarking/view.php", array("id" => $cmid));
if ($confirm) {
    $emarking->type = $newtype;
    if (!$DB->update_record("emarking", $emarking)) {
        print_error("Error updating emarking activity");
    }
    $success = new moodle_url("/mod/emarking/view.php", array("id" => $cmid, "enabled" => $newtype));
    redirect($success);
    die;
}
// URL for adding a new print order
$params = $cmid > 0 ? array("cm" => $cm->id) : array("course" => $course->id);
// Label and title according to type
$label = $newtype == EMARKING_TYPE_PRINT_SCAN ? "enablescan" : "enableosm";
$title = get_string($label, "mod_emarking");
$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($title);
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), $label);
$emarking->message = core_text::strtolower($title);
echo $OUTPUT->box(get_string("updateemarkingtype", "mod_emarking", $emarking));
echo $OUTPUT->confirm(get_string("areyousure", "mod_emarking"), $continue, $cancel);
echo $OUTPUT->footer();
开发者ID:eduagdo,项目名称:emarking,代码行数:31,代码来源:enablefeatures.php



注:本文中的emarking_tabs函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP emarking_validate_rubric函数代码示例发布时间:2022-05-15
下一篇:
PHP emarking_json_error函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap