original_string: public function get_sort_columns() {
          $result = parent::get_sort_columns();
  
          $assignment = $this->assignment->get_instance();
          if (empty($assignment->blindmarking)) {
              $result = array_merge($result, array('userid' => SORT_ASC));
          } else {
              $result = array_merge($result, [
                      'COALESCE(s.timecreated, '  . time()        . ')'   => SORT_ASC,
                      'COALESCE(s.id, '           . PHP_INT_MAX   . ')'   => SORT_ASC,
                      'um.id'                                             => SORT_ASC,
                  ]);
          }
          return $result;
      }
code: public function get_sort_columns() {
          $result = parent::get_sort_columns();
  
          $assignment = $this->assignment->get_instance();
          if (empty($assignment->blindmarking)) {
              $result = array_merge($result, array('userid' => SORT_ASC));
          } else {
              $result = array_merge($result, [
                      'COALESCE(s.timecreated, '  . time()        . ')'   => SORT_ASC,
                      'COALESCE(s.id, '           . PHP_INT_MAX   . ')'   => SORT_ASC,
                      'um.id'                                             => SORT_ASC,
                  ]);
          }
          return $result;
      }
code_tokens: public function get_sort_columns ( ) { $ result = parent :: get_sort_columns ( ) ; $ assignment = $ this -> assignment -> get_instance ( ) ; if ( empty ( $ assignment -> blindmarking ) ) { $ result = array_merge ( $ result , array ( 'userid' => SORT_ASC ) ) ; } else { $ result = array_merge ( $ result , [ 'COALESCE(s.timecreated, ' . time ( ) . ')' => SORT_ASC , 'COALESCE(s.id, ' . PHP_INT_MAX . ')' => SORT_ASC , 'um.id' => SORT_ASC , ] ) ; } return $ result ; }
docstring: Always return a valid sort - even if the userid column is missing.
  @return array column name => SORT_... constant.
docstring_tokens: Always return a valid sort - even if the userid column is missing .