Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-14610 Chat: 1.9 fixing and cleanup
  3. MDL-10373

Chat dates printing does not switch language

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Cannot Reproduce
    • Icon: Minor Minor
    • 1.9.2
    • 1.8.1
    • Chat
    • None
    • Php 5.0.23, MySQL 5.2.x Apache 2.0.59, Win XP
    • MySQL
    • MOODLE_18_STABLE
    • MOODLE_19_STABLE

      When using chat in other languages some printings call userdate() without fixing locale

      example of location : mod/chat/report.php ยง169

      adding the marked line fixes the issue and make userdate print in the correct locale.

      else {
      $sessionstart = $lasttime;
      if ($sessionend - $sessionstart > 60 and count($sessionusers) >= 1) {

      >>>> setLocale(LC_TIME, substr(current_language(), 0, 2)); <<<<<
      echo '<p align="center">'.userdate($sessionstart).' --> '. userdate($sessionend).'</p>';

      print_simple_box_start('center');

            dongsheng Dongsheng Cai
            vf Valery Fremaux
            Nicolas Connault Nicolas Connault (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

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