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