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

              Hide
              salvetore Michael de Raadt added a comment -

              Thanks for reporting that and sharing a fix.

              Hopefully it will be reviewed soon.

              Show
              salvetore Michael de Raadt added a comment - Thanks for reporting that and sharing a fix. Hopefully it will be reviewed soon.
              Hide
              jerome Jérôme Mouneyrac added a comment -

              All good to me sending to integration

              Show
              jerome Jérôme Mouneyrac added a comment - All good to me sending to integration
              Hide
              poltawski Dan Poltawski added a comment -

              The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

              TIA and ciao

              Show
              poltawski Dan Poltawski added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
              Hide
              damyon Damyon Wiese added a comment -

              Thanks Adam,

              Is there any reason this doesn't this have a 2.4 branch? Seems to me like it would affect 2.4 as well.

              Show
              damyon Damyon Wiese added a comment - Thanks Adam, Is there any reason this doesn't this have a 2.4 branch? Seems to me like it would affect 2.4 as well.
              Hide
              aolley Adam Olley added a comment -

              Hi Damyon, I believe it was caused by the changes to the defaults the form uses introduced in 2.5 in MDL-37012 (as per link).

              Show
              aolley Adam Olley added a comment - Hi Damyon, I believe it was caused by the changes to the defaults the form uses introduced in 2.5 in MDL-37012 (as per link).
              Hide
              damyon Damyon Wiese added a comment -

              Thanks Adam, makes sense. Integrated to master and 25 only.

              Show
              damyon Damyon Wiese added a comment - Thanks Adam, makes sense. Integrated to master and 25 only.
              Hide
              fred Frédéric Massart added a comment -

              Passing, thanks.

              Show
              fred Frédéric Massart added a comment - Passing, thanks.
              Hide
              stronk7 Eloy Lafuente (stronk7) added a comment -

              Yes, it's happening (somewhere in the French Polynesia, right now). And you did it, raising Moodle to new excellency levels.

              Or, if you prefer, yes, you fixed that boring issue.

              Thanks anyway! Ciao

              Show
              stronk7 Eloy Lafuente (stronk7) added a comment - Yes, it's happening (somewhere in the French Polynesia, right now). And you did it, raising Moodle to new excellency levels. Or, if you prefer, yes, you fixed that boring issue. Thanks anyway! Ciao

                People

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

                  Dates

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