當前位置: 首頁>>代碼示例>>PHP>>正文


PHP quiz_update_all_attempt_sumgrades函數代碼示例

本文整理匯總了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);
 }
開發者ID:hatone,項目名稱:moodle,代碼行數:13,代碼來源:report.php

示例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) {
開發者ID:saurabh947,項目名稱:MoodleLearning,代碼行數:31,代碼來源:edit.php


注:本文中的quiz_update_all_attempt_sumgrades函數示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。