本文整理汇总了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'));
示例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());