public function apply_default_settings() {
        global $CFG;

        foreach ($this->forceable as $property) {

            if (isset($CFG->{"grade_$property"})) {

                if ($CFG->{"grade_$property"} == -1) {
                    continue; //temporary bc before version bump
                }
                $this->$property = $CFG->{"grade_$property"};
            }
        }
    }
public function apply_default_settings() {
        global $CFG;

        foreach ($this->forceable as $property) {

            if (isset($CFG->{"grade_$property"})) {

                if ($CFG->{"grade_$property"} == -1) {
                    continue; //temporary bc before version bump
                }
                $this->$property = $CFG->{"grade_$property"};
            }
        }
    }
public function apply_default_settings ( ) { global $ CFG ; foreach ( $ this -> forceable as $ property ) { if ( isset ( $ CFG -> { "grade_$property" } ) ) { if ( $ CFG -> { "grade_$property" } == - 1 ) { continue ; //temporary bc before version bump } $ this -> $ property = $ CFG -> { "grade_$property" } ; } } }
Applies default settings on this category

@return bool True if anything changed
Applies default settings on this category