protected function process_status_change($oldstatus) {
        // Store the dependent status.
        $prevalue = $this->dependentsetting->get_status();
        // Store the current status.
        $currentstatus = $this->setting->get_status();
        if ($currentstatus == base_setting::NOT_LOCKED) {
            if ($prevalue == base_setting::LOCKED_BY_HIERARCHY &&
                    !$this->evaluate_disabled_condition($this->setting->get_value())) {
                // Dependency has changes, is not fine, unlock the dependent setting.
                $this->dependentsetting->set_status(base_setting::NOT_LOCKED);
            }
        } else {
            // Make sure the dependent setting is also locked, in this case by hierarchy.
            $this->dependentsetting->set_status(base_setting::LOCKED_BY_HIERARCHY);
        }
        // Return true if the dependent setting has changed.
        return ($prevalue != $this->dependentsetting->get_status());
    }
protected function process_status_change($oldstatus) {
        // Store the dependent status.
        $prevalue = $this->dependentsetting->get_status();
        // Store the current status.
        $currentstatus = $this->setting->get_status();
        if ($currentstatus == base_setting::NOT_LOCKED) {
            if ($prevalue == base_setting::LOCKED_BY_HIERARCHY &&
                    !$this->evaluate_disabled_condition($this->setting->get_value())) {
                // Dependency has changes, is not fine, unlock the dependent setting.
                $this->dependentsetting->set_status(base_setting::NOT_LOCKED);
            }
        } else {
            // Make sure the dependent setting is also locked, in this case by hierarchy.
            $this->dependentsetting->set_status(base_setting::LOCKED_BY_HIERARCHY);
        }
        // Return true if the dependent setting has changed.
        return ($prevalue != $this->dependentsetting->get_status());
    }
protected function process_status_change ( $ oldstatus ) { // Store the dependent status. $ prevalue = $ this -> dependentsetting -> get_status ( ) ; // Store the current status. $ currentstatus = $ this -> setting -> get_status ( ) ; if ( $ currentstatus == base_setting :: NOT_LOCKED ) { if ( $ prevalue == base_setting :: LOCKED_BY_HIERARCHY && ! $ this -> evaluate_disabled_condition ( $ this -> setting -> get_value ( ) ) ) { // Dependency has changes, is not fine, unlock the dependent setting. $ this -> dependentsetting -> set_status ( base_setting :: NOT_LOCKED ) ; } } else { // Make sure the dependent setting is also locked, in this case by hierarchy. $ this -> dependentsetting -> set_status ( base_setting :: LOCKED_BY_HIERARCHY ) ; } // Return true if the dependent setting has changed. return ( $ prevalue != $ this -> dependentsetting -> get_status ( ) ) ; }
Processes a status change in the primary setting
@param mixed $oldstatus
@return bool
Processes a status change in the primary setting