original_string: public function update_user_flags($flags) {
          global $DB;
          if ($flags->userid <= 0 || $flags->assignment <= 0 || $flags->id <= 0) {
              return false;
          }
  
          $result = $DB->update_record('assign_user_flags', $flags);
          return $result;
      }
code: public function update_user_flags($flags) {
          global $DB;
          if ($flags->userid <= 0 || $flags->assignment <= 0 || $flags->id <= 0) {
              return false;
          }
  
          $result = $DB->update_record('assign_user_flags', $flags);
          return $result;
      }
code_tokens: public function update_user_flags ( $ flags ) { global $ DB ; if ( $ flags -> userid <= 0 || $ flags -> assignment <= 0 || $ flags -> id <= 0 ) { return false ; } $ result = $ DB -> update_record ( 'assign_user_flags' , $ flags ) ; return $ result ; }
docstring: Update user flags for this user in this assignment.
  
  @param stdClass $flags a flags record keyed on id
  @return bool true for success
docstring_tokens: Update user flags for this user in this assignment .