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

When a Feedback activity is restore the "Site after submit" URL is not updated and shows "$@PAGEVIEWBYID*15463@$"

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.5, 2.1.2, 2.2
    • Fix Version/s: 2.0.6, 2.1.3
    • Component/s: Feedback
    • Labels:
      None
    • Testing Instructions:
      Hide
      1. Create a new course
      2. Add a html page
      3. Add a Feedback activity with the URL of the html page created on step 2, add some questions
      4. Backup the course
      5. Restore the backup file into a new course.
      6. Go to the Feedback activity and submit the answers.
      7. (before this fix), Moodle will show a confirmation message and a "Continue" button that will take you to "moodle/$@PAGEVIEWBYID*###@$", or
        you can go and edit the feedback activity, in URL you'll see "$@PAGEVIEWBYID*###@$"
      8. Test that both situations have been fixed into properly formed URLs.
      Show
      Create a new course Add a html page Add a Feedback activity with the URL of the html page created on step 2, add some questions Backup the course Restore the backup file into a new course. Go to the Feedback activity and submit the answers. (before this fix), Moodle will show a confirmation message and a "Continue" button that will take you to "moodle/$@PAGEVIEWBYID*###@$", or you can go and edit the feedback activity, in URL you'll see "$@PAGEVIEWBYID*###@$" Test that both situations have been fixed into properly formed URLs.
    • Workaround:
      Hide

      file: moodle\mod\feedback\backup\moodle2\restore_feedback_activity_task.class.php
      function: define_decode_contents()

      the function has:

              $contents = array();
              $contents[] = new restore_decode_content('feedback', array('intro'), 'feedback');
              $contents[] = new restore_decode_content('feedback_item', array('presentation'), 'feedback_item');
              $contents[] = new restore_decode_content('feedback_value', array('value'), 'feedback_value');
              return $contents;

      the second line should include 'site_after_submit' and preferably 'page_after_submit':

      $contents[] = new restore_decode_content('feedback', array('intro', 'site_after_submit', 'page_after_submit'), 'feedback');

      Show
      file: moodle\mod\feedback\backup\moodle2\restore_feedback_activity_task.class.php function: define_decode_contents() the function has: $contents = array(); $contents[] = new restore_decode_content('feedback', array('intro'), 'feedback'); $contents[] = new restore_decode_content('feedback_item', array('presentation'), 'feedback_item'); $contents[] = new restore_decode_content('feedback_value', array('value'), 'feedback_value'); return $contents; the second line should include 'site_after_submit' and preferably 'page_after_submit': $contents[] = new restore_decode_content('feedback', array('intro', 'site_after_submit', 'page_after_submit'), 'feedback');
    • Affected Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-29806_master_wip

      Description

      I have created a feedback activity and included a URL pointing to a Moodle page within the same course. But when I try to restore the course into a new course the URL is not updated, it shows '$@PAGEVIEWBYID*15463@$' where '15463' is the new id for the html page.

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            grabs Andreas Grabs added a comment -

            Hi Martha,
            thank you very much for reporting this! You are completely right. I will fix this shortly.
            Best regards
            Andreas

            Show
            grabs Andreas Grabs added a comment - Hi Martha, thank you very much for reporting this! You are completely right. I will fix this shortly. Best regards Andreas
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

            TIA and ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week. TIA and ciao
            Hide
            nebgor Aparup Banerjee added a comment -

            Thanks for this fix, it has been integrated and its up for testing to all.

            Show
            nebgor Aparup Banerjee added a comment - Thanks for this fix, it has been integrated and its up for testing to all.
            Hide
            ankit_frenz Ankit Agarwal added a comment -

            Hi,
            Works like a charm!
            Test passed
            Thanks

            Show
            ankit_frenz Ankit Agarwal added a comment - Hi, Works like a charm! Test passed Thanks
            Hide
            stronk7 Eloy Lafuente (stronk7) added a comment -

            Done, your delicious hacks have been sent upstream, many thanks!

            Closing as fixed, ciao

            Show
            stronk7 Eloy Lafuente (stronk7) added a comment - Done, your delicious hacks have been sent upstream, many thanks! Closing as fixed, ciao

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  28/Nov/11