当前位置: 首页>>代码示例>>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;未经允许,请勿转载。