當前位置: 首頁>>代碼示例>>PHP>>正文


PHP workshop::exsubmission_url方法代碼示例

本文整理匯總了PHP中workshop::exsubmission_url方法的典型用法代碼示例。如果您正苦於以下問題:PHP workshop::exsubmission_url方法的具體用法?PHP workshop::exsubmission_url怎麽用?PHP workshop::exsubmission_url使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在workshop的用法示例。


在下文中一共展示了workshop::exsubmission_url方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: stdclass

echo $output->heading(get_string('assessedexample', 'workshop'), 2);
echo $output->render($workshop->prepare_example_submission($example));
if (!empty($mformreference)) {
    echo $output->heading(get_string('assessmentreference', 'workshop'), 2);
    $a = new stdclass();
    $a->received = $workshop->real_grade($reference->grade);
    $a->max = $workshop->real_grade(100);
    echo $output->heading(get_string('gradeinfo', 'workshop', $a), 3);
    $mformreference->display();
}
if ($isreviewer) {
    echo $output->heading(get_string('assessmentbyyourself', 'workshop'), 2);
} elseif ($canmanage) {
    $reviewer = new stdclass();
    $reviewer->firstname = $assessment->reviewerfirstname;
    $reviewer->lastname = $assessment->reviewerlastname;
    echo $output->heading(get_string('assessmentbyknown', 'workshop', fullname($reviewer)), 2);
}
$a = new stdclass();
$a->received = $workshop->real_grade($assessment->grade);
$a->max = $workshop->real_grade(100);
echo $output->heading(get_string('gradeinfo', 'workshop', $a), 3);
$mformassessment->display();
echo $output->container_start('buttonsbar');
if ($isreviewer and $workshop->assessing_examples_allowed()) {
    $aurl = new moodle_url($workshop->exsubmission_url($example->id), array('assess' => 'on', 'sesskey' => sesskey()));
    echo $output->single_button($aurl, get_string('reassess', 'workshop'), 'get');
}
echo $output->container_end();
// buttonsbar
echo $output->footer();
開發者ID:vuchannguyen,項目名稱:web,代碼行數:31,代碼來源:excompare.php

示例2: array

// open for editing?
$delete = optional_param('delete', false, PARAM_BOOL);
// example removal requested
$confirm = optional_param('confirm', false, PARAM_BOOL);
// example removal request confirmed
$assess = optional_param('assess', false, PARAM_BOOL);
// assessment required
$cm = get_coursemodule_from_id('workshop', $cmid, 0, false, MUST_EXIST);
$course = $DB->get_record('course', array('id' => $cm->course), '*', MUST_EXIST);
require_login($course, false, $cm);
if (isguestuser()) {
    print_error('guestsarenotallowed');
}
$workshop = $DB->get_record('workshop', array('id' => $cm->instance), '*', MUST_EXIST);
$workshop = new workshop($workshop, $cm, $course);
$PAGE->set_url($workshop->exsubmission_url($id), array('edit' => $edit));
$PAGE->set_title($workshop->name);
$PAGE->set_heading($course->fullname);
if ($edit) {
    $PAGE->navbar->add(get_string('exampleediting', 'workshop'));
} else {
    $PAGE->navbar->add(get_string('example', 'workshop'));
}
$output = $PAGE->get_renderer('mod_workshop');
if ($id) {
    // example is specified
    $example = $workshop->get_example_by_id($id);
} else {
    // no example specified - create new one
    require_capability('mod/workshop:manageexamples', $workshop->context);
    $example = new stdclass();
開發者ID:rushi963,項目名稱:moodle,代碼行數:31,代碼來源:exsubmission.php

示例3: array

$PAGE->navbar->add(get_string('examplecomparing', 'workshop'));
// Output starts here
$output = $PAGE->get_renderer('mod_workshop');
echo $output->header();
echo $output->heading(format_string($workshop->name));
echo $output->heading(get_string('assessedexample', 'workshop'), 3);
echo $output->render($workshop->prepare_example_submission($example));
// if the reference assessment is available, display it
if (!empty($mformreference)) {
    $options = array('showreviewer' => false, 'showauthor' => false, 'showform' => true);
    $reference = $workshop->prepare_example_reference_assessment($reference, $mformreference, $options);
    $reference->title = get_string('assessmentreference', 'workshop');
    if ($canmanage) {
        $reference->url = $workshop->exassess_url($reference->id);
    }
    echo $output->render($reference);
}
if ($isreviewer) {
    $options = array('showreviewer' => true, 'showauthor' => false, 'showform' => true);
    $assessment = $workshop->prepare_example_assessment($assessment, $mformassessment, $options);
    $assessment->title = get_string('assessmentbyyourself', 'workshop');
    if ($workshop->assessing_examples_allowed()) {
        $assessment->add_action(new moodle_url($workshop->exsubmission_url($example->id), array('assess' => 'on', 'sesskey' => sesskey())), get_string('reassess', 'workshop'));
    }
    echo $output->render($assessment);
} elseif ($canmanage) {
    $options = array('showreviewer' => true, 'showauthor' => false, 'showform' => true);
    $assessment = $workshop->prepare_example_assessment($assessment, $mformassessment, $options);
    echo $output->render($assessment);
}
echo $output->footer();
開發者ID:alanaipe2015,項目名稱:moodle,代碼行數:31,代碼來源:excompare.php


注:本文中的workshop::exsubmission_url方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。