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

Remove file mod/feedback/complete_guest.php as it 95% repeats complete.php

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.0.2
    • Fix Version/s: 3.1
    • Component/s: Feedback
    • Labels:
    • Testing Instructions:
      Hide
      1. Enable feedback module
      2. Modify role "Authenticated user on frontpage" and allow capabilities to view and complete feedback (they are weirdly missing, see MDL-53209)
      3. Create anonymous feedback on frontpage with anonymous access, add some questions
      4. Enable $CFG->feedback_allowfullanonymous
      5. As a guest complete this feedback, make sure everything is ok
      6. Login as normal user and complete this feedback, make sure everything is ok
      7. As admin duplicate feedback and select to display analysis in the copy
      8. Attempt as guest and logged in user - you should not see analysis
      9. As admin duplicate feedback again, this time give both guest and auth user capability mod/feedback:viewanalysepage
      10. Attempt as guest and logged in user - you should see analysis in the end
      11. As admin duplicate feedback and add a completion text
      12. Attempt as guest and logged in user - you should see analysis in the end
      13. Create an anonymous and non-anonymous feedbacks in a course
      14. Attempt both as a student, make sure you complete them fine
      Show
      Enable feedback module Modify role "Authenticated user on frontpage" and allow capabilities to view and complete feedback (they are weirdly missing, see MDL-53209 ) Create anonymous feedback on frontpage with anonymous access, add some questions Enable $CFG->feedback_allowfullanonymous As a guest complete this feedback, make sure everything is ok Login as normal user and complete this feedback, make sure everything is ok As admin duplicate feedback and select to display analysis in the copy Attempt as guest and logged in user - you should not see analysis As admin duplicate feedback again, this time give both guest and auth user capability mod/feedback:viewanalysepage Attempt as guest and logged in user - you should see analysis in the end As admin duplicate feedback and add a completion text Attempt as guest and logged in user - you should see analysis in the end Create an anonymous and non-anonymous feedbacks in a course Attempt both as a student, make sure you complete them fine
    • Affected Branches:
      MOODLE_30_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE
    • Pull Master Branch:
      wip-MDL-53227-master

      Description

      Files complete_guest.php and complete.php are almost identical. All difference in logic can be done using if (isloggedin() && !isguestuser()) blocks

      Removing duplicating code will make it much easier to maintain feedback module

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              marina Marina Glancy
              Reporter:
              marina Marina Glancy
              Peer reviewer:
              Jun Pataleta
              Integrator:
              David Monllaó
              Tester:
              cameron1729
              Participants:
              Component watchers:
              Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Sara Arjona (@sarjona), Víctor Déniz Falcón
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Fix Release Date:
                23/May/16