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

Add proper returnurl to enrol/index.php

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.9.4, 2.6.3, 2.7, 2.8.5
    • Fix Version/s: 2.9
    • Component/s: Course
    • Labels:
    • Testing Instructions:
      Hide

      Preparing the courses:
      1. Create course «Sample Course»; all types of enrolment except «Manual enrollment» shold be disabled.
      2. Create new role «Non-enrolled» for System, Category and Course contexts using archetype of Authenticated User.
      3. Allow moodle/course:view capability for created role
      4. Assign «Non-enrolled» role in «Sample Course» context to a testing user (not enrolling him).

      Test 1 Link in courses list
      As administrator:
      1. Create a new empty course «Course One»
      2. Add new category «Sample Category» (without any parent category)
      3. Put «Course One» into created «Sample Category».
      4. Remove capability moodle/course:view to «Non-enrolled» user role.
      As a regular user:
      5. Go to main moodle site page.
      6. Follow courses index page (/course/index.php) using navigation block.
      7. Attempt to reach «Sample Course» throw this page. You will see enrolment options page.
      8. Press «Continue» button and ensure you have got back to courses index page.
      9. Follow courses index page again.
      10. Go to «Sample Category» category index (/course/index.php?categoryid=) using link in a course category header block.
      11. Attempt to reach «Course One».
      12. Press «Continue» button and ensure you have got back to «Sample Category» courses index page.
      As administrator (cleaning up, unnecesary):
      1. Re-allow moodle/course:view capability to «Non-enrolled» user role.
      2. Delete «Course One» and category «Sample Category».

      Test 2 Link in navigation block
      As administrator:
      1. Remove capability moodle/course:view for «Non-enrolled» user role.
      As a regular user:
      2. Go to any available moodle site page.
      3. Inside navigation block, find and expand «Courses» node.
      4. Follow one of any unavailable courses links and get enrollment page.
      5. Press «Continue» button and ensure you have got back to the same page as that in step 1.
      As administrator (cleaning up, unnecesary):
      6. Re-allow moodle/course:view capability for «Non-enrolled» user role.

      Test 3. Link from not available choice
      As administrator:
      1. Create new «Sample Choice» in course «Sample Course».
      As a simple user:
      2. Open «Sample Course» and follow to «Sample Choice».
      3. Press «Enroll me in this course» button under «Sorry, only enrolled users are allowed to make choices» label and get to course enrolment page.
      4. Press «Continue» and ensure you have got back to «Sample Choice» page.

      Test 4. Not allowed forum reply
      As administrator:
      1. Create new «Sample Forum» in course «Sample Course» and start a new discussion.
      2. Allow capabilities mod/forum:replypost, mod/forum:viewdiscussion for «Non-enrolled» user role.
      As a simple user:
      3. Open «Sample Course» and follow to «Sample Forum».
      4. Reply to single discussion initial post then forum post reply form will be opened and you will be able to start typing you reply message
      5. Stop typing for awhile
      As administrator:
      6. Remove capability mod/forum:replypost to user role «Non-enrolled».
      As a regular user:
      7. Press «Post to forum» button and you will be redirected to enrolment page.
      8. Press «Continue» and ensure you have got back to main forum page.

      Show
      Preparing the courses: 1. Create course «Sample Course»; all types of enrolment except «Manual enrollment» shold be disabled. 2. Create new role «Non-enrolled» for System, Category and Course contexts using archetype of Authenticated User. 3. Allow moodle/course:view capability for created role 4. Assign «Non-enrolled» role in «Sample Course» context to a testing user (not enrolling him). Test 1 Link in courses list As administrator: 1. Create a new empty course «Course One» 2. Add new category «Sample Category» (without any parent category) 3. Put «Course One» into created «Sample Category». 4. Remove capability moodle/course:view to «Non-enrolled» user role. As a regular user: 5. Go to main moodle site page. 6. Follow courses index page (/course/index.php) using navigation block. 7. Attempt to reach «Sample Course» throw this page. You will see enrolment options page. 8. Press «Continue» button and ensure you have got back to courses index page. 9. Follow courses index page again. 10. Go to «Sample Category» category index (/course/index.php?categoryid=) using link in a course category header block. 11. Attempt to reach «Course One». 12. Press «Continue» button and ensure you have got back to «Sample Category» courses index page. As administrator (cleaning up, unnecesary): 1. Re-allow moodle/course:view capability to «Non-enrolled» user role. 2. Delete «Course One» and category «Sample Category». Test 2 Link in navigation block As administrator: 1. Remove capability moodle/course:view for «Non-enrolled» user role. As a regular user: 2. Go to any available moodle site page. 3. Inside navigation block, find and expand «Courses» node. 4. Follow one of any unavailable courses links and get enrollment page. 5. Press «Continue» button and ensure you have got back to the same page as that in step 1. As administrator (cleaning up, unnecesary): 6. Re-allow moodle/course:view capability for «Non-enrolled» user role. Test 3. Link from not available choice As administrator: 1. Create new «Sample Choice» in course «Sample Course». As a simple user: 2. Open «Sample Course» and follow to «Sample Choice». 3. Press «Enroll me in this course» button under «Sorry, only enrolled users are allowed to make choices» label and get to course enrolment page. 4. Press «Continue» and ensure you have got back to «Sample Choice» page. Test 4. Not allowed forum reply As administrator: 1. Create new «Sample Forum» in course «Sample Course» and start a new discussion. 2. Allow capabilities mod/forum:replypost, mod/forum:viewdiscussion for «Non-enrolled» user role. As a simple user: 3. Open «Sample Course» and follow to «Sample Forum». 4. Reply to single discussion initial post then forum post reply form will be opened and you will be able to start typing you reply message 5. Stop typing for awhile As administrator: 6. Remove capability mod/forum:replypost to user role «Non-enrolled». As a regular user: 7. Press «Post to forum» button and you will be redirected to enrolment page. 8. Press «Continue» and ensure you have got back to main forum page.
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE, MOODLE_28_STABLE
    • Fixed Branches:
      MOODLE_29_STABLE
    • Pull Master Branch:
      wip-MDL-18309-master

      Description

      If potential students browse a list of courses, and try to enter them they find some of them is not enrollable (there is no icon to show it). They returned to the main site page then, instead of list of courses - that is frustrating when done several times.

      I think adding returnurl argument there would be easy way to improve usability of the thing.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  11/May/15