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

col_duration "now" when timefinish == timestart

XMLWordPrintable

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

      /**
       * 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) {

            kritisingh1 Kriti Singh
            jameskinsman James Kinsman
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.