本文整理匯總了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);