Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Duplicate
    • 2.0.3, 2.1
    • None
    • Gradebook
    • MOODLE_20_STABLE, MOODLE_21_STABLE
    • MDL-28305_multilang_course_name
    • Easy
    • Hide

      1) Go to Site Adminitration > Plugins > Filters > Manage Filters and enable the Multi-language content filter. Make sure that "apply to" is set to "content and headings"
      2) Go to Site Administration > Language > Language packs and install the "Bahasa Melayu (ms)" language pack.
      2) Edit a course's shortname. This may have to be done in mysql query browser or your SQL environment of choice. Set it to the following.
      <span lang="en" class="multilang">test</span> <span lang="ms" class="multilang">ujian</span>

      3) Go to your user profile and set English to be your preferred language.
      4) Open another browser tab/window and go to the gradebook within the course you edited for step 2. Select the Overview report then select a student.
      5) Check that the course name is displayed as "test".
      6) Go back to your other browser and set your preferred language to be Bahasa Melayu.
      7) Refresh the overview report and check that the course name is now displayed as "ujian".

      Show
      1) Go to Site Adminitration > Plugins > Filters > Manage Filters and enable the Multi-language content filter. Make sure that "apply to" is set to "content and headings" 2) Go to Site Administration > Language > Language packs and install the "Bahasa Melayu (ms)" language pack. 2) Edit a course's shortname. This may have to be done in mysql query browser or your SQL environment of choice. Set it to the following. <span lang="en" class="multilang">test</span> <span lang="ms" class="multilang">ujian</span> 3) Go to your user profile and set English to be your preferred language. 4) Open another browser tab/window and go to the gradebook within the course you edited for step 2. Select the Overview report then select a student. 5) Check that the course name is displayed as "test". 6) Go back to your other browser and set your preferred language to be Bahasa Melayu. 7) Refresh the overview report and check that the course name is now displayed as "ujian".

    Description

      The course shortnames aren't affected by multilang filter in grade overview mode. Not only admins but also students will see this when taking a look into the gradebook.

      Reproduction:

      (1) Create a course using multilang filter in its name/shortname and assign a user to this course
      (2) On the platform, go to the course and choose "Grades"
      (3) In the dropdown boxes, choose "Overview report" on the left and select the user on the right side
      (4) You can now see the course shortname showing all languages one after another

      Fix instructions:

      (1) Open /grades/report/overview/lib.php
      (2) Go to line 122 and add a "format_string()" to "$course->shortname" .....the line should now look like this: $courselink = '<a href="'.$CFG->wwwroot.'/grade/report/user/index.php?id='.$course->id.'&userid='.$this->user->id.'">'.format_string($course->shortname).'</a>';
      (3) Refresh the browser, now it should work!

      Attached: screenshot before and after the fix

      ====
      Concerning multilang and course shortnames another improvement at this point: The course shortname is limited to 100 chars. Using multilang filter, this could lead to a problem, esp. when using more than two languages. This has to be changed in /course/edit_form.php and additionally in the database (table mdl_course -> shortname).

      Attachments

        Issue Links

          Activity

            People

              samhemelryk Sam Hemelryk
              gmorz Dominik Jeni
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Sujith Haridasan
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: