コード例 #1
0
ファイル: adminlib.php プロジェクト: raymondAntonio/moodle
 /**
  * Force site regrading
  */
 function regrade_all()
 {
     global $CFG;
     require_once "{$CFG->libdir}/gradelib.php";
     grade_force_site_regrading();
 }
コード例 #2
0
ファイル: adminlib.php プロジェクト: mongo0se/moodle
 /**
  * Saves the new setting.
  *
  * @param mixed $data
  * @return string empty string or error message
  */
 function write_setting($data)
 {
     global $CFG;
     $previous = $this->get_setting();
     $result = parent::write_setting($data);
     // If saved and the value has changed.
     if (empty($result) && $previous != $data) {
         require_once $CFG->libdir . '/gradelib.php';
         grade_force_site_regrading();
     }
     return $result;
 }