original_string: public function load_user_defaults() {
          $defaults = get_config('question_preview');
          foreach ($this->get_user_pref_fields() as $field) {
              $this->$field = get_user_preferences(
                      self::OPTIONPREFIX . $field, $defaults->$field);
          }
          $this->numpartscorrect = $this->feedback;
      }
code: public function load_user_defaults() {
          $defaults = get_config('question_preview');
          foreach ($this->get_user_pref_fields() as $field) {
              $this->$field = get_user_preferences(
                      self::OPTIONPREFIX . $field, $defaults->$field);
          }
          $this->numpartscorrect = $this->feedback;
      }
code_tokens: public function load_user_defaults ( ) { $ defaults = get_config ( 'question_preview' ) ; foreach ( $ this -> get_user_pref_fields ( ) as $ field ) { $ this -> $ field = get_user_preferences ( self :: OPTIONPREFIX . $ field , $ defaults -> $ field ) ; } $ this -> numpartscorrect = $ this -> feedback ; }
docstring: Load the value of the options from the user_preferences table.
docstring_tokens: Load the value of the options from the user_preferences table .