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

Add "mod/choice:view" permission to Choice Activity

    XMLWordPrintable

Details

    • New Feature
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 2.6.6, 2.8.7, 3.1
    • 3.2
    • Choice
    • MOODLE_26_STABLE, MOODLE_28_STABLE, MOODLE_31_STABLE
    • MOODLE_32_STABLE
    • MDL-49029_m32v2
    • Moderate
    • Hide

      Manual testing:
      This requires a course with at least 2 student users.

      1. Testing the choice:view capability:
        1. Create a choice activity
        2. Override the permissions on the choice activity so the choice:view permission is prohibited for student2
        3. Have student1 make a selection
        4. Verify the choice activity does not appear to student 2

      Automated testing:

      1. Run behat for mod_choice
      2. Run phpunit for mod_choice
      Show
      Manual testing: This requires a course with at least 2 student users. Testing the choice:view capability: Create a choice activity Override the permissions on the choice activity so the choice:view permission is prohibited for student2 Have student1 make a selection Verify the choice activity does not appear to student 2 Automated testing: Run behat for mod_choice Run phpunit for mod_choice

    Description

      The Page resource as the following permission:
      mod/page:view

      This prohibits users who don't have this permission from seeing the Page.

      It would be great if this permission could be added to all activities & resources. Particularly the Choice activity.

      At my school, we put the Choice activity on the front page for students to vote for various things. Even though I can set it up so that guests cannot vote, I only want authenticated users to be able to click on the Choice activity. I'd like guests to see the "you cannot view this page" message. I think the addition of this permission to all activities would be useful as well.

      Attachments

        Issue Links

          Activity

            People

              sbourget Stephen Bourget
              jprovasnik John Provasnik
              Marina Glancy Marina Glancy
              David Monllaó David Monllaó
              Damyon Wiese Damyon Wiese
              Dan Marsden, Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Laurent David, Raquel Ortega, Sara Arjona (@sarjona)
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                5/Dec/16