Moodle
  1. Moodle
  2. MDL-39825

Disabling badges does not remove links

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 2.5.1
    • Component/s: Badges, Navigation
    • Labels:
    • Testing Instructions:
      Hide

      1. Go to Badges Settings under Site Administration > Badges.
      2. Disable course badges.
      3. Go to course page.
      4. Check that Badges don't appear under Course navigation (Course administration was already fixed, so this applies only to course pages navigation).

      Show
      1. Go to Badges Settings under Site Administration > Badges. 2. Disable course badges. 3. Go to course page. 4. Check that Badges don't appear under Course navigation (Course administration was already fixed, so this applies only to course pages navigation).
    • Affected Branches:
      MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-39825_dev_master

      Description

      When badges are disabled in:
      Site Administration -> Badges -> Badges Setting -> Uncheck Enable course badges
      Links to badges in the navigation are still present e.g. Select a course then badges show up as a sub item, similar under the users profile settings.

      Removing permissions does not affect links either.

      The users can click the link and will simply get an error message, which is not very user-friendly.

        Gliffy Diagrams

          Activity

          Hide
          Yuliya Bozhko added a comment -

          That's strange, there is a closed bug for this issue and I remember fixing it... I will have a look again. Thanks!

          Show
          Yuliya Bozhko added a comment - That's strange, there is a closed bug for this issue and I remember fixing it... I will have a look again. Thanks!
          Hide
          Yuliya Bozhko added a comment -

          Ok, I can see that it is not being removed from course pages, but it is actually gone from course administration

          Show
          Yuliya Bozhko added a comment - Ok, I can see that it is not being removed from course pages, but it is actually gone from course administration
          Hide
          Frédéric Massart added a comment -

          Hi Yuliya,

          Your patch seems to fix the issue, but the line now is becoming a bit long, could you split it? I also noticed that we are doing the same check in front_page_course_essentials(), and so we remove the node under Sites pages > if the course badges are disabled... is that correct? It seems that the front page is responsible for the Site badges.

          Can you provide branches for master too?

          Many thanks!
          Fred

          Show
          Frédéric Massart added a comment - Hi Yuliya, Your patch seems to fix the issue, but the line now is becoming a bit long, could you split it? I also noticed that we are doing the same check in front_page_course_essentials(), and so we remove the node under Sites pages > if the course badges are disabled... is that correct? It seems that the front page is responsible for the Site badges . Can you provide branches for master too? Many thanks! Fred
          Hide
          Yuliya Bozhko added a comment -

          Thanks Frederic! That's where the problem is Config check was added in the wrong place!

          I was told that before 2.5.1 release we are on sync with master branch and there is no need for two patches.

          Show
          Yuliya Bozhko added a comment - Thanks Frederic! That's where the problem is Config check was added in the wrong place! I was told that before 2.5.1 release we are on sync with master branch and there is no need for two patches.
          Hide
          Yuliya Bozhko added a comment -

          Can you please let me know if I still need a patch for master branch? Otherwise, I updated 2.5 patch. Thanks!

          Show
          Yuliya Bozhko added a comment - Can you please let me know if I still need a patch for master branch? Otherwise, I updated 2.5 patch. Thanks!
          Hide
          Frédéric Massart added a comment -

          Thanks! You don't really need a branch for master, but I think it makes integrators' lifes easier if you provide one. Feel free to push for integration, but you might want to check your diff branch URL as your commit if not easy to find in there. Cheers!

          Show
          Frédéric Massart added a comment - Thanks! You don't really need a branch for master, but I think it makes integrators' lifes easier if you provide one. Feel free to push for integration, but you might want to check your diff branch URL as your commit if not easy to find in there. Cheers!
          Hide
          Frédéric Massart added a comment -

          Thanks for updating the patch Yuliya. I'm pushing this for integration. Cheers!

          Show
          Frédéric Massart added a comment - Thanks for updating the patch Yuliya. I'm pushing this for integration. Cheers!
          Hide
          Dan Poltawski added a comment -

          Integrated to master and 25 - thanks Yuliya

          Show
          Dan Poltawski added a comment - Integrated to master and 25 - thanks Yuliya
          Hide
          Jason Fowler added a comment -

          Works perfectly Yuliya

          Show
          Jason Fowler added a comment - Works perfectly Yuliya
          Hide
          Dan Poltawski added a comment -

          Thanks for your contributions!

          _main:
          @ BB#0:
                  push    {r7, lr}
                  mov     r7, sp
                  sub     sp, #4
                  movw    r0, :lower16:(L_.str-(LPC0_0+4))
                  movt    r0, :upper16:(L_.str-(LPC0_0+4))
          LPC0_0:
                  add     r0, pc
                  bl      _printf
                  movs    r1, #0
                  movt    r1, #0
                  str     r0, [sp]                @ 4-byte Spill
                  mov     r0, r1
                  add     sp, #4
                  pop     {r7, pc}
           
                  .section        __TEXT,__cstring,cstring_literals
          L_.str:                                 @ @.str
                  .asciz   "This code is now upstream!"
          

          Show
          Dan Poltawski added a comment - Thanks for your contributions! _main: @ BB#0: push {r7, lr} mov r7, sp sub sp, #4 movw r0, :lower16:(L_.str-(LPC0_0+4)) movt r0, :upper16:(L_.str-(LPC0_0+4)) LPC0_0: add r0, pc bl _printf movs r1, #0 movt r1, #0 str r0, [sp] @ 4-byte Spill mov r0, r1 add sp, #4 pop {r7, pc}   .section __TEXT,__cstring,cstring_literals L_.str: @ @.str .asciz "This code is now upstream!"

            People

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

              Dates

              • Created:
                Updated:
                Resolved: