original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Saves the new setting.
  
  @param mixed $data
  @return string empty string or error message
docstring_tokens: Saves the new setting .