Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-31595

Enrol me in this course in Setting block visible for guests

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.1, 2.2.2, 2.3
    • Fix Version/s: 2.1.6, 2.2.3
    • Component/s: Enrolments
    • Labels:
    • Testing Instructions:
      Hide

      1/ create course
      2/ enable guest access and enable self enrolment
      3/ login as guest account and verify the link is gone
      4/ login as normal user and verify the link is visible

      Show
      1/ create course 2/ enable guest access and enable self enrolment 3/ login as guest account and verify the link is gone 4/ login as normal user and verify the link is visible
    • Affected Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE, MOODLE_23_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      w11_MDL-31595_m23_enrolme

      Description

      Steps to reproduce:
      1. Do not login.
      2. Go to course without guest access.
      3. "Enrol me in this course" link visible for guest.

      The link leads to the same page. It confuses people.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              salvetore Michael de Raadt added a comment -

              I think this was fixed a while ago.

              Show
              salvetore Michael de Raadt added a comment - I think this was fixed a while ago.
              Hide
              aav Artem Andreev added a comment -

              "Non-enrollable courses" is different case.
              Now bug exists on demo.moodle.net.
              Steps to reproduce:
              1. Set "Allow guest access" to No for course "Exchange Samples" (http://demo.moodle.net/course/view.php?id=604)
              2. Logout and try access course "Exchange Samples".
              See screenshot (sorry, I can't change language to English, Moodle always automatically changes it to Russian).

              Show
              aav Artem Andreev added a comment - "Non-enrollable courses" is different case. Now bug exists on demo.moodle.net. Steps to reproduce: 1. Set "Allow guest access" to No for course "Exchange Samples" ( http://demo.moodle.net/course/view.php?id=604 ) 2. Logout and try access course "Exchange Samples". See screenshot (sorry, I can't change language to English, Moodle always automatically changes it to Russian).
              Hide
              aav Artem Andreev added a comment -

              More correct screenshot

              Show
              aav Artem Andreev added a comment - More correct screenshot
              Hide
              aav Artem Andreev added a comment -

              Michael, I think you are mistaken when closing this issue as duplicate.

              Show
              aav Artem Andreev added a comment - Michael, I think you are mistaken when closing this issue as duplicate.
              Hide
              salvetore Michael de Raadt added a comment -

              Thanks for persisting with this, Artem.

              I've re-opened the issue.

              Show
              salvetore Michael de Raadt added a comment - Thanks for persisting with this, Artem. I've re-opened the issue.
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment - - edited

              Side comment: While I think your patch is ok... wouldnt' be better to add the new conditions in the "} else

              {" part of the condition? After all, you've introduced it in the "unenrol" part, where this issue is about "enrol" (aka, the "}

              else {", isn't it?

              FYC, ciao

              Edited: Also, isguestuser() or is_guest(). I always have doubts here, grrr.

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - - edited Side comment: While I think your patch is ok... wouldnt' be better to add the new conditions in the "} else {" part of the condition? After all, you've introduced it in the "unenrol" part, where this issue is about "enrol" (aka, the "} else {", isn't it? FYC, ciao Edited: Also, isguestuser() or is_guest(). I always have doubts here, grrr.
              Hide
              skodak Petr Skoda added a comment - - edited

              isguestuser() is the one account that can not be enrolled in any course since 2.0, I think the "if" reflects that properly

              Show
              skodak Petr Skoda added a comment - - edited isguestuser() is the one account that can not be enrolled in any course since 2.0, I think the "if" reflects that properly
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              Then, perhaps, little detail... it would be worth putting the "// Unenrol link" comment some lines below, to keep the comment with its code or so. And keep your condition before it.

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - Then, perhaps, little detail... it would be worth putting the "// Unenrol link" comment some lines below, to keep the comment with its code or so. And keep your condition before it.
              Hide
              skodak Petr Skoda added a comment -

              comments improved, thanks!

              Show
              skodak Petr Skoda added a comment - comments improved, thanks!
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              Integrated, thanks! (21, 22 & master)

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - Integrated, thanks! (21, 22 & master)
              Hide
              ankit_frenz Ankit Agarwal added a comment -

              works as described.
              Passing.
              Thanks

              Show
              ankit_frenz Ankit Agarwal added a comment - works as described. Passing. Thanks
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              FCT (fixed, closing, thanks). Ciao

              "I feel a very unusual sensation - if it is not indigestion, I think it must be gratitude!"
              ~ Benjamin Disraeli

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - FCT (fixed, closing, thanks). Ciao "I feel a very unusual sensation - if it is not indigestion, I think it must be gratitude!" ~ Benjamin Disraeli

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    14/May/12