当前位置: 首页>>代码示例>>PHP>>正文


PHP workshop::prepare_assessment方法代码示例

本文整理汇总了PHP中workshop::prepare_assessment方法的典型用法代码示例。如果您正苦于以下问题:PHP workshop::prepare_assessment方法的具体用法?PHP workshop::prepare_assessment怎么用?PHP workshop::prepare_assessment使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在workshop的用法示例。


在下文中一共展示了workshop::prepare_assessment方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: array

    print_collapsible_region_start('', 'workshop-viewlet-instructreviewers', get_string('instructreviewers', 'workshop'));
    echo $output->box(format_text($instructions, $workshop->instructreviewersformat, array('overflowdiv'=>true)), array('generalbox', 'instructions'));
    print_collapsible_region_end();
}

// extend the current assessment record with user details
$assessment = $workshop->get_assessment_by_id($assessment->id);

if ($isreviewer) {
    $options    = array(
        'showreviewer'  => true,
        'showauthor'    => has_capability('mod/workshop:viewauthornames', $workshop->context),
        'showform'      => $assessmenteditable or !is_null($assessment->grade),
        'showweight'    => true,
    );
    $assessment = $workshop->prepare_assessment($assessment, $mform, $options);
    $assessment->title = get_string('assessmentbyyourself', 'workshop');
    echo $output->render($assessment);

} else {
    $options    = array(
        'showreviewer'  => has_capability('mod/workshop:viewreviewernames', $workshop->context),
        'showauthor'    => has_capability('mod/workshop:viewauthornames', $workshop->context),
        'showform'      => $assessmenteditable or !is_null($assessment->grade),
        'showweight'    => true,
    );
    $assessment = $workshop->prepare_assessment($assessment, $mform, $options);
    echo $output->render($assessment);
}

if (!$assessmenteditable and $canoverridegrades) {
开发者ID:nigeldaley,项目名称:moodle,代码行数:31,代码来源:assessment.php

示例2: array

if ($submission->id and !$edit and !$isreviewer and $canallocate and $workshop->assessing_allowed($USER->id)) {
    $url = new moodle_url($PAGE->url, array('assess' => 1));
    echo $output->single_button($url, get_string('assess', 'workshop'), 'post');
}
if ($workshop->phase == workshop::PHASE_CLOSED and ($ownsubmission or $canviewall)) {
    if (!empty($submission->gradeoverby) and strlen(trim($submission->feedbackauthor)) > 0) {
        echo $output->render(new workshop_feedback_author($submission));
    }
}
// and possibly display the submission's review(s)
if ($isreviewer) {
    // user's own assessment
    $strategy = $workshop->grading_strategy_instance();
    $mform = $strategy->get_assessment_form($PAGE->url, 'assessment', $userassessment, false);
    $options = array('showreviewer' => true, 'showauthor' => $showauthor, 'showform' => !is_null($userassessment->grade), 'showweight' => true);
    $assessment = $workshop->prepare_assessment($userassessment, $mform, $options);
    $assessment->title = get_string('assessmentbyyourself', 'workshop');
    if ($workshop->assessing_allowed($USER->id)) {
        if (is_null($userassessment->grade)) {
            $assessment->add_action($workshop->assess_url($assessment->id), get_string('assess', 'workshop'));
        } else {
            $assessment->add_action($workshop->assess_url($assessment->id), get_string('reassess', 'workshop'));
        }
    }
    if ($canoverride) {
        $assessment->add_action($workshop->assess_url($assessment->id), get_string('assessmentsettings', 'workshop'));
    }
    echo $output->render($assessment);
    if ($workshop->phase == workshop::PHASE_CLOSED) {
        if (strlen(trim($userassessment->feedbackreviewer)) > 0) {
            echo $output->render(new workshop_feedback_reviewer($userassessment));
开发者ID:alanaipe2015,项目名称:moodle,代码行数:31,代码来源:submission.php

示例3: array

// Output starts here
$output = $PAGE->get_renderer('mod_workshop');
echo $output->header();
echo $output->heading(get_string('assessedexample', 'workshop'), 2);

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,
        'showweight'    => false,
    );
    $reference = $workshop->prepare_assessment($reference, $mformreference, $options);
    $reference->title = get_string('assessmentreference', 'workshop');
    echo $output->render($reference);
}

if ($isreviewer) {
    $options = array(
        'showreviewer'  => true,
        'showauthor'    => false,
        'showform'      => true,
        'showweight'    => false,
    );
    $assessment = $workshop->prepare_assessment($assessment, $mformassessment, $options);
    $assessment->title = get_string('assessmentbyyourself', 'workshop');
    if ($workshop->assessing_examples_allowed()) {
        $assessment->add_action(
开发者ID:nigeldaley,项目名称:moodle,代码行数:31,代码来源:excompare.php


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