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

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 3.0.2
    • 3.1
    • Feedback
    • MOODLE_30_STABLE
    • MOODLE_31_STABLE
    • wip-MDL-53227-master
    • 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

    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

              marina Marina Glancy
              marina Marina Glancy
              Jun Pataleta Jun Pataleta
              David Monllaó David Monllaó
              cameron1729 cameron1729
              Amaia Anabitarte, Carlos Escobedo, Laurent David, Sabina Abellan, Sara Arjona (@sarjona)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                23/May/16