Moodle
  1. Moodle
  2. MDL-23425

Course requests buttons don't appear for anything other than category with ID=1

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0.2
    • Component/s: Course, Navigation
    • Labels:
      None
    • Database:
      Any
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE
    • Rank:
      2685

      Description

      Conditional check for whether to show course request / approval buttons checks the wrong permissions.

      To reproduce:

      1. turn on course requests for a category with any ID other than 1
      2. go to the category page (e.g. /course/category.php?id=2)
      3. buttons aren't there

      Will attach a patch in a second...

        Activity

        Hide
        Myles Carrick added a comment -

        simple patch for this

        Show
        Myles Carrick added a comment - simple patch for this
        Hide
        Myles Carrick added a comment -

        Hey guys. Just a ping for this - the patch is uploaded and ready to roll...

        Show
        Myles Carrick added a comment - Hey guys. Just a ping for this - the patch is uploaded and ready to roll...
        Hide
        Helen Foster added a comment -

        Hi Myles,

        I've just tried to reproduce this and found that whatever category was set for defaultrequestcategory, the request a course button always appears in course/category.php?id=1.

        I then noticed that the defaultrequestcategory setting description is "Courses requested by users will be automatically placed in this category." i.e. the setting doesn't control which category the request a course button appears in.

        Show
        Helen Foster added a comment - Hi Myles, I've just tried to reproduce this and found that whatever category was set for defaultrequestcategory, the request a course button always appears in course/category.php?id=1. I then noticed that the defaultrequestcategory setting description is "Courses requested by users will be automatically placed in this category." i.e. the setting doesn't control which category the request a course button appears in.
        Hide
        Myles Carrick added a comment -

        hi Helen,
        Thanks for checking it out.
        The button (and the subsequent courses) should appear in the selected category - the code has a clear typo

        Show
        Myles Carrick added a comment - hi Helen, Thanks for checking it out. The button (and the subsequent courses) should appear in the selected category - the code has a clear typo
        Hide
        Dan Poltawski added a comment -

        Thanks Myles, sorry for the slow response!

        I've submitted PULL-87 to get this merged

        Show
        Dan Poltawski added a comment - Thanks Myles, sorry for the slow response! I've submitted PULL-87 to get this merged

          People

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

            Dates

            • Created:
              Updated:
              Resolved: