original_string: 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};
              }
          }
  
      }
code: 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};
              }
          }
  
      }
code_tokens: 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 } ; } } }
docstring: 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.
docstring_tokens: Updates the assign properties with override information for a user .