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@$"

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.5, 2.1.2, 2.2
    • 2.0.6, 2.1.3
    • Feedback
    • None
    • MOODLE_20_STABLE, MOODLE_21_STABLE, MOODLE_22_STABLE
    • MOODLE_20_STABLE, MOODLE_21_STABLE
    • MDL-29806_master_wip
    • 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');
    • 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.

    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.

      Attachments

        Activity

          People

            grabs Andreas Grabs
            mmorelos Martha
            Aparup Banerjee Aparup Banerjee
            Ankit Agarwal Ankit Agarwal
            Amaia Anabitarte, Carlos Escobedo, Ferran Recio, Ilya Tregubov, Sara Arjona (@sarjona)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:
              28/Nov/11