本文整理汇总了PHP中workshop::real_grade方法的典型用法代码示例。如果您正苦于以下问题:PHP workshop::real_grade方法的具体用法?PHP workshop::real_grade怎么用?PHP workshop::real_grade使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类workshop
的用法示例。
在下文中一共展示了workshop::real_grade方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
echo $output->single_button($url, get_string('assess', 'workshop'), 'post');
}
// and possibly display the submission's review(s)
if ($isreviewer) {
$strategy = $workshop->grading_strategy_instance();
$mform = $strategy->get_assessment_form($PAGE->url, 'assessment', $userassessment, false);
echo $output->heading(get_string('assessmentbyyourself', 'workshop'), 2);
// reviewers can always see the grades they gave even they are not available yet
if (is_null($userassessment->grade)) {
echo $output->heading(get_string('notassessed', 'workshop'), 3);
if ($workshop->assessing_allowed()) {
echo $output->container($output->single_button($workshop->assess_url($userassessment->id), get_string('assess', 'workshop'), 'get'), array('class' => 'buttonsbar'));
}
} else {
$a = new stdclass();
$a->max = $workshop->real_grade(100);
$a->received = $workshop->real_grade($userassessment->grade);
echo $output->heading(get_string('gradeinfo', 'workshop', $a), 3);
if ($userassessment->weight != 1) {
echo $output->heading(get_string('weightinfo', 'workshop', $userassessment->weight), 3);
}
if ($workshop->assessing_allowed()) {
echo $output->container($output->single_button($workshop->assess_url($userassessment->id), get_string('reassess', 'workshop'), 'get'), array('class' => 'buttonsbar'));
}
$mform->display();
}
}
if (has_capability('mod/workshop:viewallassessments', $workshop->context) or $ownsubmission and $workshop->assessments_available()) {
$strategy = $workshop->grading_strategy_instance();
$assessments = $workshop->get_assessments_of_submission($submission->id);
$canviewreviewernames = has_capability('mod/workshop:viewreviewernames', $workshop->context);
示例2: stdclass
// ok you can go
} else {
print_error('nopermissions', 'error', $workshop->view_url(), 'compare example assessment');
}
$PAGE->set_title($workshop->name);
$PAGE->set_heading($course->fullname);
$PAGE->navbar->add(get_string('examplecomparing', 'workshop'));
// 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 (!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);