本文整理汇总了PHP中quiz_update_all_attempt_sumgrades函数的典型用法代码示例。如果您正苦于以下问题:PHP quiz_update_all_attempt_sumgrades函数的具体用法?PHP quiz_update_all_attempt_sumgrades怎么用?PHP quiz_update_all_attempt_sumgrades使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了quiz_update_all_attempt_sumgrades函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: update_overall_grades
/**
* Update the final grades for all attempts. This method is used following
* a regrade.
* @param object $quiz the quiz settings.
* @param array $userids only update scores for these userids.
* @param array $attemptids attemptids only update scores for these attempt ids.
*/
protected function update_overall_grades($quiz)
{
quiz_update_all_attempt_sumgrades($quiz);
quiz_update_all_final_grades($quiz);
quiz_update_grades($quiz);
}
示例2: implode
$quiz->questions = implode(',', $questions);
// Update the database.
$DB->set_field('quiz', 'questions', $quiz->questions, array('id' => $quiz->id));
$deletepreviews = true;
}
// If rescaling is required save the new maximum.
$maxgrade = unformat_float(optional_param('maxgrade', -1, PARAM_RAW));
if ($maxgrade >= 0) {
quiz_set_grade($maxgrade, $quiz);
}
if ($deletepreviews) {
quiz_delete_previews($quiz);
}
if ($recomputesummarks) {
quiz_update_sumgrades($quiz);
quiz_update_all_attempt_sumgrades($quiz);
quiz_update_all_final_grades($quiz);
quiz_update_grades($quiz, 0, true);
}
redirect($afteractionurl);
}
$questionbank->process_actions($thispageurl, $cm);
// End of process commands =====================================================
$PAGE->requires->yui2_lib('container');
$PAGE->requires->yui2_lib('dragdrop');
$PAGE->requires->skip_link_to('questionbank', get_string('skipto', 'access', get_string('questionbank', 'question')));
$PAGE->requires->skip_link_to('quizcontentsblock', get_string('skipto', 'access', get_string('questionsinthisquiz', 'quiz')));
$PAGE->set_title(get_string('editingquizx', 'quiz', format_string($quiz->name)));
$PAGE->set_heading($course->fullname);
$node = $PAGE->settingsnav->find('mod_quiz_edit', navigation_node::TYPE_SETTING);
if ($node) {