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


PHP workshop::prepare_example_assessment方法代码示例

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


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

示例1: test_prepare_example_assessment

 public function test_prepare_example_assessment()
 {
     $this->resetAfterTest(true);
     // fixture setup
     $fakerawrecord = (object) array('id' => 42, 'submissionid' => 56, 'weight' => 0, 'timecreated' => time() - 10, 'timemodified' => time() - 5, 'grade' => null, 'gradinggrade' => null, 'gradinggradeover' => null, 'feedbackauthor' => null, 'feedbackauthorformat' => 0, 'feedbackauthorattachment' => 0);
     // excersise SUT
     $a = $this->workshop->prepare_example_assessment($fakerawrecord);
     // verify
     $this->assertTrue($a instanceof workshop_example_assessment);
     $this->assertTrue($a->url instanceof moodle_url);
     // modify setup
     $fakerawrecord->weight = 1;
     $this->expectException('coding_exception');
     // excersise SUT
     $a = $this->workshop->prepare_example_assessment($fakerawrecord);
 }
开发者ID:dg711,项目名称:moodle,代码行数:16,代码来源:locallib_test.php

示例2: array

    $options = array(
        'showreviewer'  => false,
        'showauthor'    => false,
        'showform'      => true,
    );
    $assessment = $workshop->prepare_example_reference_assessment($assessment, $mform, $options);
    $assessment->title = get_string('assessmentreference', 'workshop');
    echo $output->render($assessment);

} else if ($isreviewer) {
    $options = array(
        'showreviewer'  => true,
        'showauthor'    => false,
        'showform'      => true,
    );
    $assessment = $workshop->prepare_example_assessment($assessment, $mform, $options);
    $assessment->title = get_string('assessmentbyyourself', 'workshop');
    echo $output->render($assessment);

} else if ($canmanage) {
    $options = array(
        'showreviewer'  => true,
        'showauthor'    => false,
        'showform'      => true,
        'showweight'    => false,
    );
    $assessment = $workshop->prepare_example_assessment($assessment, $mform, $options);
    echo $output->render($assessment);
}

echo $output->footer();
开发者ID:verbazend,项目名称:AWFA,代码行数:31,代码来源:exassessment.php


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