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

Install is shown despite user not having moodle/community:download

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5.2
    • Fix Version/s: 2.5.3
    • Component/s: Hub
    • Labels:
    • Testing Instructions:
      Hide

      1) Add a 'Community finder' block to a course.
      2) Switch role to a Non-editing teacher (by default they have moodle/community:add but not moodle/community:download)
      3) Click search in the block
      4) In the search form, type "test" as the search term and click search
      5) When the results load up, the possible buttons on each should be "Save a link to this site" and "visit institution". NOT "Install".

      Testing when you have download cap:
      6) Switch role to Teacher (which has both caps).
      7) Search again, the results this time should have buttons "Install" and "visit demo"

      Show
      1) Add a 'Community finder' block to a course. 2) Switch role to a Non-editing teacher (by default they have moodle/community:add but not moodle/community:download) 3) Click search in the block 4) In the search form, type "test" as the search term and click search 5) When the results load up, the possible buttons on each should be "Save a link to this site" and "visit institution". NOT "Install". Testing when you have download cap: 6) Switch role to Teacher (which has both caps). 7) Search again, the results this time should have buttons "Install" and "visit demo"
    • Affected Branches:
      MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_25_STABLE
    • Pull from Repository:
    • Pull Master Branch:

      Description

      The moodle/community:download capability defines if a user is able to download courses from the community hub.

      However, when a user doesn't have this, they're still presented the 'install' button and search assumes they're looking for courses to download rather than ones to enrol in.

      Clicking install simply refreshes on the search screen because you don't have the capability which is good, but confusing for the user.

      Also included in the proposed fix is a $mform->setType call the formslib complains about.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    11/Nov/13