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


PHP workshop::get_assessments_of_submission方法代码示例

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


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

示例1: foreach

        }
    }
    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));
        }
    }
}
if (has_capability('mod/workshop:viewallassessments', $workshop->context) or $ownsubmission and $workshop->assessments_available()) {
    // other assessments
    $strategy = $workshop->grading_strategy_instance();
    $assessments = $workshop->get_assessments_of_submission($submission->id);
    $showreviewer = has_capability('mod/workshop:viewreviewernames', $workshop->context);
    foreach ($assessments as $assessment) {
        if ($assessment->reviewerid == $USER->id) {
            // own assessment has been displayed already
            continue;
        }
        if (is_null($assessment->grade) and !has_capability('mod/workshop:viewallassessments', $workshop->context)) {
            // students do not see peer-assessment that are not graded yet
            continue;
        }
        $mform = $strategy->get_assessment_form($PAGE->url, 'assessment', $assessment, false);
        $options = array('showreviewer' => $showreviewer, 'showauthor' => $showauthor, 'showform' => !is_null($assessment->grade), 'showweight' => true);
        $displayassessment = $workshop->prepare_assessment($assessment, $mform, $options);
        if ($canoverride) {
            $displayassessment->add_action($workshop->assess_url($assessment->id), get_string('assessmentsettings', 'workshop'));
开发者ID:alanaipe2015,项目名称:moodle,代码行数:31,代码来源:submission.php

示例2: foreach

    }
}
if ($editable and $workshop->useexamples and $workshop->examplesmode == workshop::EXAMPLES_BEFORE_SUBMISSION and !has_capability('mod/workshop:manageexamples', $workshop->context)) {
    // check that all required examples have been assessed by the user
    $examples = $workshop->get_examples_for_reviewer($USER->id);
    foreach ($examples as $exampleid => $example) {
        if (is_null($example->grade)) {
            $editable = false;
            break;
        }
    }
}
$edit = ($editable and $edit);
if (!$candeleteall and $ownsubmission and $editable) {
    // Only allow the student to delete their own submission if it's still editable and hasn't been assessed.
    if (count($workshop->get_assessments_of_submission($submission->id)) > 0) {
        $deletable = false;
    } else {
        $deletable = true;
    }
}
if ($submission->id and $delete and $confirm and $deletable) {
    require_sesskey();
    $workshop->delete_submission($submission);
    // Event information.
    $params = array('context' => $workshop->context, 'courseid' => $workshop->course->id, 'relateduserid' => $submission->authorid, 'other' => array('submissiontitle' => $submission->title));
    $params['objectid'] = $submission->id;
    $event = \mod_workshop\event\submission_deleted::create($params);
    $event->add_record_snapshot('workshop', $workshoprecord);
    $event->trigger();
    redirect($workshop->view_url());
开发者ID:jackdaniels79,项目名称:moodle,代码行数:31,代码来源:submission.php


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