Moodle
  1. Moodle
  2. MDL-41894

Strict warning when viewing a non anonymous response in feedback

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.5
    • Fix Version/s: 2.4.7, 2.5.3
    • Component/s: Feedback
    • Labels:
    • Testing Instructions:
      Hide
      1. Enable full debugging in your php.ini and your moodle config.
      2. Create a feedback activity with record user names not set to anonymous.
      3. Add some items to the activity and submit a response as a student.
      4. Log back in as admin and click on the response just submitted by the user in the "Show response" tab.
      5. Make sure you do not get any warnings.
      Show
      Enable full debugging in your php.ini and your moodle config. Create a feedback activity with record user names not set to anonymous. Add some items to the activity and submit a response as a student. Log back in as admin and click on the response just submitted by the user in the "Show response" tab. Make sure you do not get any warnings.
    • Affected Branches:
      MOODLE_25_STABLE
    • Fixed Branches:
      MOODLE_24_STABLE, MOODLE_25_STABLE
    • Pull Master Branch:
      MDL-41894-master
    • Sprint:
      BACKEND Sprint 5

      Description

      Following Strict warning is generated when viewing a non anonymous response in feedback

      Warning: Creating default object from empty value in /var/www/stable/pgmaster/mod/feedback/show_entries.php on line 45 Call Stack: 0.0007 322440 1. {main}() /var/www/stable/pgmaster/mod/feedback/show_entries.php:0 
      

        Gliffy Diagrams

          Issue Links

            Activity

            Hide
            Ankit Agarwal added a comment -

            Hi Andreas,
            I am not sure those lines that I removed are serving any purpose, can you please verify?
            Thanks

            Show
            Ankit Agarwal added a comment - Hi Andreas, I am not sure those lines that I removed are serving any purpose, can you please verify? Thanks
            Hide
            Ankit Agarwal added a comment -

            This issue was discovered while working on MDL-40047

            Show
            Ankit Agarwal added a comment - This issue was discovered while working on MDL-40047
            Hide
            Dan Poltawski added a comment -

            Hi Ankit,

            Well.. if we are removing this, should we also remove the $formdata = data_submitted() ??

            Show
            Dan Poltawski added a comment - Hi Ankit, Well.. if we are removing this, should we also remove the $formdata = data_submitted() ??
            Hide
            Ankit Agarwal added a comment -

            Thanks Dan, for the review.

            I couldn't find any code that does a post to show_entries.php. Hence I decided to remove

            if (($formdata = data_submitted()) AND !confirm_sesskey()) {
            print_error('invalidsesskey'); 
            } 
            

            from code as well. Pushing for integration. Thanks

            Show
            Ankit Agarwal added a comment - Thanks Dan, for the review. I couldn't find any code that does a post to show_entries.php. Hence I decided to remove if (($formdata = data_submitted()) AND !confirm_sesskey()) { print_error('invalidsesskey'); } from code as well. Pushing for integration. Thanks
            Hide
            Sam Hemelryk added a comment -

            Thanks Ankit this has been integrated now.

            Show
            Sam Hemelryk added a comment - Thanks Ankit this has been integrated now.
            Hide
            David Monllaó added a comment -

            It passes, tested in 24, 25 and master

            Show
            David Monllaó added a comment - It passes, tested in 24, 25 and master
            Hide
            Dan Poltawski added a comment -

            You did it!

            Thanks for your contribution, this change has been merged upstream and is now available on your local git mirror and on download sites shortly.

            Show
            Dan Poltawski added a comment - You did it! Thanks for your contribution, this change has been merged upstream and is now available on your local git mirror and on download sites shortly.

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Agile