public function display_results($rids = false, $sort = '', $anonymous = false)
 {
     $output = '';
     if (is_array($rids)) {
         $prtotal = 1;
     } else {
         if (is_int($rids)) {
             $prtotal = 0;
         }
     }
     if ($rows = $this->get_results($rids, $anonymous)) {
         foreach ($rows as $row) {
             // Count identical answers (case insensitive).
             $this->text = $row->response;
             if (!empty($this->text)) {
                 $dateparts = preg_split('/-/', $this->text);
                 $this->text = make_timestamp($dateparts[0], $dateparts[1], $dateparts[2]);
                 // Unix timestamp.
                 $textidx = clean_text($this->text);
                 $this->counts[$textidx] = !empty($this->counts[$textidx]) ? $this->counts[$textidx] + 1 : 1;
             }
         }
         $output .= \mod_questionnaire\response\display_support::mkreslistdate($this->counts, count($rids), $this->question->precise, $prtotal);
     } else {
         $output .= '<p class="generaltable">&nbsp;' . get_string('noresponsedata', 'questionnaire') . '</p>';
     }
     return $output;
 }