Exemple #1
0
 /**
  * Force site regrading
  */
 function regrade_all()
 {
     global $CFG;
     require_once "{$CFG->libdir}/gradelib.php";
     grade_force_site_regrading();
 }
Exemple #2
0
 /**
  * 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;
 }