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

Feedback: the preview icon shouldn't be displayed for students

XMLWordPrintable

    • MOODLE_310_STABLE, MOODLE_400_STABLE, MOODLE_401_STABLE
    • MOODLE_400_STABLE, MOODLE_401_STABLE
    • MDL-70586-401
    • MDL-70586-master
    • Hide

      Covered mostly with behat. However, some manual tests are required to confirm the print.php page can't be accessed directly if the user hasn't had the right permissions:

      Testing instructions

      1. Login as admin
      2. Create a course.
      3. Enrol a student.
      4. Create a feedback activity and add, at least, one question.
      5. Click the "Preview questions" button and copy the URL.
      6. Login as a student.
      7. Go to the feedback.
      8. Confirm the "Preview questions" button is not displayed.
      9. Paste the URL copied previosly.
      10. Confirm the following error is displayed: "Sorry, but you do not currently have permissions to do that (Edit items)."
      Show
      Covered mostly with behat. However, some manual tests are required to confirm the print.php page can't be accessed directly if the user hasn't had the right permissions: Testing instructions Login as admin Create a course. Enrol a student. Create a feedback activity and add, at least, one question. Click the "Preview questions" button and copy the URL. Login as a student. Go to the feedback. Confirm the "Preview questions" button is not displayed. Paste the URL copied previosly. Confirm the following error is displayed: "Sorry, but you do not currently have permissions to do that (Edit items)."
    • 1
    • HQ 2023 Sprint i1.1 Moppies

      When using the feedback activity, the preview icon is displayed for everyone in the course, including students. This is especially worrisome in the app, where the resulting "Preview" button has the same size as the button to actually submit your feedback. After clicking on "Preview", users then believe that they are actually filling out the feedback form, but finishing this process will not actually submit the feedback.

      The code is in mod/feedback/view.php with the assignment of the variable $preview.

      I suggest adding a check so that $preview is an empty string when the user does not have the permission to edit the activity.

        1. 400.gif
          400.gif
          295 kB
        2. 401.gif
          401.gif
          321 kB
        3. image-2023-02-13-17-53-08-167.png
          image-2023-02-13-17-53-08-167.png
          208 kB
        4. master.gif
          master.gif
          345 kB

            sarjona Sara Arjona (@sarjona)
            kenogo Keno Goertz
            Laurent David Laurent David
            Andrew Lyons Andrew Lyons
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            10 Vote for this issue
            Watchers:
            22 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 44 minutes
                2h 44m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.