Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0, 2.1.1, 2.2
    • Fix Version/s: 2.1.2
    • Component/s: Course, Filters
    • Labels:
    • Testing Instructions:
      Hide
      1. Log in as an admin
      2. Enable the multilang filter (Settings > Plugins > Filters > Manage filters)
      3. Set the multilang filter to apply to both content and headings
      4. Create a new category and give it a multilang name
      5. Browse around the site and make sure the correct name is always shown

      Areas to check:

      • Backup and restore
      • Course list block
      • Category listing
      • Frontpage combo list
      • Deleting a course
      • Deleting a category
      • Navigation and settings blocks

      Example multilang = <span class="multilang" lang="en">EN</span><span class="multilang" lang="NZ">NZ</span>

      Show
      Log in as an admin Enable the multilang filter (Settings > Plugins > Filters > Manage filters) Set the multilang filter to apply to both content and headings Create a new category and give it a multilang name Browse around the site and make sure the correct name is always shown Areas to check: Backup and restore Course list block Category listing Frontpage combo list Deleting a course Deleting a category Navigation and settings blocks Example multilang = <span class="multilang" lang="en">EN</span><span class="multilang" lang="NZ">NZ</span>
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE
    • Pull Master Branch:
      wip-MDL-29187-master
    • Rank:
      18524

      Description

      This task involves reviewing all of the uses of course category name for display to make sure it is formatted consistently.

        Issue Links

          Activity

          Hide
          Sam Hemelryk added a comment -

          Up for peer-review

          Show
          Sam Hemelryk added a comment - Up for peer-review
          Hide
          Sam Hemelryk added a comment -

          Will help resolve MDL-28729 and MDL-28636

          Show
          Sam Hemelryk added a comment - Will help resolve MDL-28729 and MDL-28636
          Hide
          Rajesh Taneja added a comment - - edited

          Changes looks Good Sam

          Probably you missed category->name formating in headings/errors

          1. course/category.php
            $PAGE->set_title("$site->shortname: $category->name");
            
          2. course/lib.php (Exception should also show correct course name ?)
            throw new moodle_exception('cannotdeletecategoryquestions','','',$category->name);
            
          3. course/editcategory.php
            $fullname = $category->name;
            
          Show
          Rajesh Taneja added a comment - - edited Changes looks Good Sam Probably you missed category->name formating in headings/errors course/category.php $PAGE->set_title( "$site->shortname: $category->name" ); course/lib.php (Exception should also show correct course name ?) throw new moodle_exception('cannotdeletecategoryquestions','','',$category->name); course/editcategory.php $fullname = $category->name;
          Hide
          Sam Hemelryk added a comment -

          Hi thanks for looking at it Raj.

          In regards to the three points you raised sorry I should have made a comment to clarify some of the decisions I made:

          1. $PAGE->set_title and $PAGE->set_heading both call format_string internally. This is a annoying bug that we will need to fix in the near future as there is no way to format properly by doing this.
          2. I've left the raw category name in the exception as it will help people to track things down if they can see what the real content is.
          3. $fullname is later being passed to set_heading so is covered by case 1.

          I've put this up for integration now

          Cheers
          Sam

          Show
          Sam Hemelryk added a comment - Hi thanks for looking at it Raj. In regards to the three points you raised sorry I should have made a comment to clarify some of the decisions I made: $PAGE->set_title and $PAGE->set_heading both call format_string internally. This is a annoying bug that we will need to fix in the near future as there is no way to format properly by doing this. I've left the raw category name in the exception as it will help people to track things down if they can see what the real content is. $fullname is later being passed to set_heading so is covered by case 1. I've put this up for integration now Cheers Sam
          Hide
          Eloy Lafuente (stronk7) added a comment -

          The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

          TIA and ciao

          Show
          Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
          Hide
          Sam Hemelryk added a comment -

          Rebased thanks Eloy

          Show
          Sam Hemelryk added a comment - Rebased thanks Eloy
          Hide
          Aparup Banerjee added a comment -

          Thanks super moodlers!
          This has now been integrated.

          (kept out of 20 stable)

          Show
          Aparup Banerjee added a comment - Thanks super moodlers! This has now been integrated. (kept out of 20 stable )
          Hide
          Andrew Davis added a comment -

          areas checked:
          course creation
          course restore
          course category listing
          course category deletion
          the navigation block

          All looks good.

          Show
          Andrew Davis added a comment - areas checked: course creation course restore course category listing course category deletion the navigation block All looks good.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          YTC !

          (aka, yay, thanks and ciao ) Closing.

          Show
          Eloy Lafuente (stronk7) added a comment - YTC ! (aka, yay, thanks and ciao ) Closing.
          Hide
          Juan Leyva (CV&A) added a comment -

          This is also happening in Moodle 2.0.X

          Show
          Juan Leyva (CV&A) added a comment - This is also happening in Moodle 2.0.X
          Hide
          Aparup Banerjee added a comment -

          Hi Juan,
          as commented above , this fix was kept out of 2.0 stable (that includes 2.0.X).
          Please see http://tracker.moodle.org/browse/MDL-29189?focusedCommentId=123405&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-123405

          If you really need the fix back ported to 2.0.x, can I suggest creating a new (linked) issue. This issue has been closed.

          cheers,
          Aparup

          Show
          Aparup Banerjee added a comment - Hi Juan, as commented above , this fix was kept out of 2.0 stable (that includes 2.0.X). Please see http://tracker.moodle.org/browse/MDL-29189?focusedCommentId=123405&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-123405 If you really need the fix back ported to 2.0.x, can I suggest creating a new (linked) issue. This issue has been closed. cheers, Aparup

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: