Restore issue for courses with topic= in URLs

Restore issue for courses with topic= in URLs

by Larry Elchuck -
Number of replies: 2
I'm creating a site with simple navigation for early elementary students. Each course is to be set up so that students see a number of large icons under topic 1. Each icon links to a new topic (which in turn has a "back" button to topic 1. Only one topic is to be visible at a time (initially topic 1)

So course links such as http://mysite.edu/course/view.php?id=34&topic=1, http://mysite.edu/course/view.php?id=34&topic=2, http://mysite.edu/course/view.php?id=34&topic=etc. are used extensively throughout the course.

Works fine ... But .... when I backup and restore to another course (say id=35), all of the links remain pointing to id=34. I'm pretty sure that if the "&topic=x" was not included, the url would be changed to the new course id upon the creation of a new course.

Is there anyway to modify the core code (or any other work around) to allow for these course links to take on the id of the newly created (from restore) course rather than pointing to the original course?

Average of ratings: -
In reply to Larry Elchuck

Re: Restore issue for courses with topic= in URLs

by Eloy Lafuente (stronk7) -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Uhm...

I cannot find anything in backup / restore encoding / decoding those URLs (no matter if they have the "&topic=xx" or no).

Can you confirm that the conversion happens if the "topic" part isn't added?

In any case, feel free to create one bug in the Tracker, as far as I think those links can be easily converted on backup / restore.

Also it would be great to have some filter doing that work, exactly like the "Activity Names" filter does, but working on sections. IMO. Something like [[sec:1]] - to use the wiki-like syntax shared by other filters - being automatically expanded to the whole link.

Ciao smile
In reply to Eloy Lafuente (stronk7)

Re: Restore issue for courses with topic= in URLs

by Larry Elchuck -
You are correct Eloy

The conversion does not happen, even if the "topic" part is not added

BTW I am preferring to show the icons as a label , but I did create a webpage with the same html, to see if it made a difference on restore. It did not

Created a Tracker item at MDL-22176