Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-65961

col_duration "now" when timefinish == timestart

    XMLWordPrintable

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.8.4, 3.9.1
    • None
    • Quiz
    • MOODLE_38_STABLE, MOODLE_39_STABLE
    • Easy

    Description

      /**
       * Generate the display of the time taken column.
       * @param object $attempt the table row being output.
       * @return string HTML content to go inside the td.
       */
      public function col_duration($attempt) {
          if ($attempt->timefinish) {
              return format_time($attempt->timefinish - $attempt->timestart);
          } else {
              return '-';
          }
      }

      When $attempt->timefinish == $attempt->timestart it shows "now"

      Suggested fix:
      if ($attempt->timefinish && $attempt->timestart != $attempt->timefinish) {

      Attachments

        Activity

          People

            kritisingh1 Kriti Singh
            jameskinsman James Kinsman
            Tim Hunt, Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: