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

Language of dates in recent activity block in forced language courses is not the forced

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.9.10, 1.9.17, 2.0.8, 2.1.5, 2.2.2, 2.5.2
    • Fix Version/s: None
    • Component/s: Blocks
    • Labels:
    • Environment:
      Don't apply
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_25_STABLE

      Description

      In my case, I've got a Moodle in Catalan but the english courses are forced to be in english.

      The problem is that, as you can see in the screenshot, the language of the date in the string: "Activity since divendres, 14 gener 2011, 09:13 AM" is still in Catalan. This can have three posible reasons:
      a) Because the locale of the machine is set to Catalan
      b) Because the global moodle settings are set to Catalan
      c) Becasuse the user is in Catalan.

      I've changed the user language and the string changed "Activity since viernes, 14 enero 2011, 09:13 AM"
      So the real reason is the third (C).

      In the code:
      On course/lib.php in function print_recent_activity($course) in line 855, we've got:
      echo get_string('activitysince', '', userdate($timestart));

      I don't know if the error is to call userdate instead of date or another function. Or the error is inside userdate. Becasuse I don't know if the intention of userdate is to show the date in the user language.

      Thanks!

        Attachments

          Activity

            People

            Assignee:
            poltawski Dan Poltawski
            Reporter:
            pferre22 Pau Ferrer
            Participants:
            Component watchers:
            Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: