public function update_effective_access($userid) {

        $override = $this->override_exists($userid);

        // Merge with assign defaults.
        $keys = array('duedate', 'cutoffdate', 'allowsubmissionsfromdate');
        foreach ($keys as $key) {
            if (isset($override->{$key})) {
                $this->get_instance()->{$key} = $override->{$key};
            }
        }

    }
public function update_effective_access($userid) {

        $override = $this->override_exists($userid);

        // Merge with assign defaults.
        $keys = array('duedate', 'cutoffdate', 'allowsubmissionsfromdate');
        foreach ($keys as $key) {
            if (isset($override->{$key})) {
                $this->get_instance()->{$key} = $override->{$key};
            }
        }

    }
public function update_effective_access ( $ userid ) { $ override = $ this -> override_exists ( $ userid ) ; // Merge with assign defaults. $ keys = array ( 'duedate' , 'cutoffdate' , 'allowsubmissionsfromdate' ) ; foreach ( $ keys as $ key ) { if ( isset ( $ override -> { $ key } ) ) { $ this -> get_instance ( ) -> { $ key } = $ override -> { $ key } ; } } }
Updates the assign properties with override information for a user.

Algorithm:  For each assign setting, if there is a matching user-specific override,
then use that otherwise, if there are group-specific overrides, return the most
lenient combination of them.  If neither applies, leave the assign setting unchanged.

@param int $userid The userid.
Updates the assign properties with override information for a user .