Moodle
  1. Moodle
  2. MDL-34148

Incorrect module names in the blog menu block

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.3, 2.3.1
    • Fix Version/s: 2.2.5, 2.3.2
    • Component/s: Blocks, Blog
    • Labels:
    • Testing Instructions:
      Hide
      1. Go to course A in which you are a Teacher, and turn on editing.
      2. Add assignment activity
      3. Go to assignment activity and add Blog Menu block
      4. Verify the string and make sure x is proper module name and not folder name(View all entries about this x", "View my entries about this x" and "Add an entry about this x", where x is the name of the module.)
      5. Also add "Recent blog entries" block and verify string is fine.
      6. Add "menu block and recent blog entries" on course page and make sure string is fine and module is in lower case.
      Show
      Go to course A in which you are a Teacher, and turn on editing. Add assignment activity Go to assignment activity and add Blog Menu block Verify the string and make sure x is proper module name and not folder name(View all entries about this x", "View my entries about this x" and "Add an entry about this x", where x is the name of the module.) Also add "Recent blog entries" block and verify string is fine. Add "menu block and recent blog entries" on course page and make sure string is fine and module is in lower case.
    • Affected Branches:
      MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE
    • Pull Master Branch:
      wip-mdl-34148
    • Rank:
      42480

      Description

      When the blog menu block is displayed alongside a module, it will display three links: "View all entries about this x", "View my entries about this x" and "Add an entry about this x", where x is the name of the module.
      The problem is that the block uses the modules folder name, which works in most cases. However it does not work for modules that doesn't have the same name as the folder (for example: assign -> assignment and data -> database), meaning that the block displays the link "View all entries about this assign".

        Activity

        Hide
        Erik Lundberg added a comment -

        This patch for /blog/lib.php fixes the problem. Instead of using the $module->modname it will look for the modules name using get_string('modulename', $module->modname)

        Show
        Erik Lundberg added a comment - This patch for /blog/lib.php fixes the problem. Instead of using the $module->modname it will look for the modules name using get_string('modulename', $module->modname)
        Hide
        Erik Lundberg added a comment -

        I seem to have attached the patch prematurely, but I don't have the permission to remove it. The GIT branch submitted above is the current fix. Anyone with permission, feel free to remove the attached patch.

        Show
        Erik Lundberg added a comment - I seem to have attached the patch prematurely, but I don't have the permission to remove it. The GIT branch submitted above is the current fix. Anyone with permission, feel free to remove the attached patch.
        Hide
        Helen Foster added a comment -

        Erik, many thanks for your report and fix. (I've deleted the attached patch, as requested.)

        Show
        Helen Foster added a comment - Erik, many thanks for your report and fix. (I've deleted the attached patch, as requested.)
        Hide
        Rajesh Taneja added a comment -

        Thanks for the great patch Erik,

        I have added one more commit to change variable name, as variables with "_" are not standard in moodle.

        Show
        Rajesh Taneja added a comment - Thanks for the great patch Erik, I have added one more commit to change variable name, as variables with "_" are not standard in moodle.
        Hide
        Ankit Agarwal added a comment -

        Hi Raj and Erik,
        The patch looks good to me.
        Thanks

        Show
        Ankit Agarwal added a comment - Hi Raj and Erik, The patch looks good to me. Thanks
        Hide
        Rajesh Taneja added a comment -

        Thanks Ankit,

        Pushing for integration review.

        Show
        Rajesh Taneja added a comment - Thanks Ankit, Pushing for integration review.
        Hide
        Dan Poltawski 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
        Dan Poltawski 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
        Rajesh Taneja added a comment -

        Branches re-based

        Show
        Rajesh Taneja added a comment - Branches re-based
        Hide
        Dan Poltawski added a comment -

        (Please remember to update the 'Pull from Repository' field)

        Show
        Dan Poltawski added a comment - (Please remember to update the 'Pull from Repository' field)
        Hide
        Dan Poltawski added a comment -

        Integrated, thanks Erik/Raj

        Show
        Dan Poltawski added a comment - Integrated, thanks Erik/Raj
        Hide
        Frédéric Massart added a comment -

        Test successful on master, 2.2 and 2.3. Yay!

        Show
        Frédéric Massart added a comment - Test successful on master, 2.2 and 2.3. Yay!
        Hide
        Aparup Banerjee added a comment -

        yay, it works!

        This issue has been put through rigorous processes and finally swam upstream along with some 65 others this week.

        Thank you all for taking the time to get us here.

        cheers!

        Show
        Aparup Banerjee added a comment - yay, it works! This issue has been put through rigorous processes and finally swam upstream along with some 65 others this week. Thank you all for taking the time to get us here. cheers!

          People

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

            Dates

            • Created:
              Updated:
              Resolved: