Well, today I've started classes at UPC again (finally, I just wanted it :D), and after my first class in "Web Application System Design" and looking for my scolarship holder table (OMG, it was an enormous and dirty table, but I've cleaned it; I hope I will find it as clean as I left it tomorrow), I met Marc.
The objective of the meeting was to show him the OpenSyllabus integration in Moodle prototype I made and "look for" more work.
After Marc took a look into my work, he noticed something he didn't like: Lesson outlines (see image) are all wikis (1 wiki per lesson). This was the unique way I found to solve a problem:
- Marc wanted me to make only 1 wiki, and the lesson outlines were mere links to a wiki page from that wiki. The problem is that links are stored in the Moodle course XML files as static links.
- These links have a number parameter, the wiki identifier. (For example, ID 10). When restoring a course, moodle assigns a different ID automatically to the new modules of the course, so the wiki will have probably another ID different than 10. But the lesson outline link has the ID 10 as parameter!!! (static link).
So, what can I do now? Well, Marc told me that I have to find the way to change the ID of these links to redirect to the current wiki ID. How can I do this?
As a first requirement, I can make an abstraction:
- First, I have to found, in the restoring process, where the new wiki ID is given and restored.
- Then, after the piece of code I found before, I have to retrieve the new ID value.
- Then, I have to locate the code where the link resources are restored.
- Finally, I have to modify every link that will be restored in the previous founded code, retrieving the current link direction, and modifying the id parameter to the previous retrieved ID value from wiki.
I hope it won't be so hard to perform, however Marc's purposes for this piece of work are merely for my own learning and education.
Marc has explained to me that I will work on DFWiki code refactoring (lot of work is coming OMG), so as a training he demanded me to program a "foo" (example) Moodle format course, Moodle module and a Moodle block. This job has priority for me over the "ID" job explained previously.
In Moodle wiki I remember founding something related with that (some module/block/course format templates), so I'm going to take a look immediately.
Ok guys, let's work!