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

"Export to portfolio" button in database ignores capabilties

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Create (or use) a database with a few entries
      2. Enable Porfolios on the site and enable (+ make visible) the File Download portfolio
      3. Enrol a student to the course with the database activity
      4. Log in as that student and display the database list.
      5. Note that if the student hasn't created any records on the page that there is no 'Export to portfolio' button.
      6. Create a record with the student.
      7. Check that the 'Export to portfolio' button is now present. Download the portfolio and check that only the students records are exported.
      8. Log in as the administrator.
      9. In the Student role disable mod/data:exportownentry capability (make sure exportallentries and exportentry are also disabled, but this is the default)
      10. Log in as that student and display the database list.
      11. Note the 'Export to portfolio' button at the bottom of the page is not present even if some of the records belong to the student.
      Show
      Create (or use) a database with a few entries Enable Porfolios on the site and enable (+ make visible) the File Download portfolio Enrol a student to the course with the database activity Log in as that student and display the database list. Note that if the student hasn't created any records on the page that there is no 'Export to portfolio' button. Create a record with the student. Check that the 'Export to portfolio' button is now present. Download the portfolio and check that only the students records are exported. Log in as the administrator. In the Student role disable mod/data:exportownentry capability (make sure exportallentries and exportentry are also disabled, but this is the default) Log in as that student and display the database list. Note the 'Export to portfolio' button at the bottom of the page is not present even if some of the records belong to the student.
    • Affected Branches:
      MOODLE_27_STABLE, MOODLE_28_STABLE, MOODLE_29_STABLE
    • Fixed Branches:
      MOODLE_27_STABLE, MOODLE_28_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      wip-MDL-48325-master
    • Sprint:
      Team A Sprint 1, Team '; drop tables Sprint 2
    • Issue size:
      Small

      Description

      To reproduce...

      1. Create (or use) a database with a few entries
      2. In the Student role disable mod/data:exportownentry capability (make sure exportallentries and exportentry are also disabled, but this is the default)
      3. Enable Porfolios on the site and enable (+ make visible) the File Download repository
      4. Assign a student to the course with the database activity
      5. Log in as that student and display the database list.
      6. Note the 'Export to portfolio' button at the bottom of the page.
      7. Click it and you get a 'no capability' error

      The display of the button should properly check capabilties.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  2/Feb/15