|
David, do you feel like making a patch for MOODLE_19_STABLE?
Finally it's just a single line of code that implements the proposed check. Works for me at MOODLE_19_STABLE @ Postgres 8.1
Looks ok for me (I guess a lot of module-related data will be there - partially restore), but at least course won't show fake activities. +1
I am waiting for another +1 from Petr or Martin. The I will commit into both STABLEs.
I heard some ppl are having activities without entries in course_module table (ask sam from OU if needed
but the opposite should never happen +1 for 1.8 and 1.9 branches hmmm, maybe we could limit it to current course only and add upgrade code with clean up of all existing courses
100% agree with Petr last comment.
Oh, I think it's enough for now.
Hehe, I don't use the web interface at all, at least for me (triaging everyone else bugs) the client is really better! B-) Ciao Hi, all. I am experiencing this issue. Quick question: what does the "mdl_course_modules.instance" column signify?
Thanks! Never mind, figured it out. I'll answer here anyway for the legions of interested people flocking to this page.
The "instance" column is the id of the module, pointing to the modulename table. So, for example, a "label": mdl_course_module.instance joins to mdl_label.id Yes Jeffrey, you are right. The "instance" is the ID of the module record in its own table. In "mdl_course_modules" we define just "slots" where module instances can be put into.
Ad this issue: I have not committed yet, because I want to check yet another approach: the restorelib should remember which slots (i.e. course_modules) were created during the restore process. At the end of the restore, only empty slots created in this restore process are deleted. This should prevent potential problems with concurrent (parallel) restore processes. In the current proposal, one running restore process could remove empty course_modules slots created by another (and still running!) restore process. I'm experiencing this problem in Moodle 1.9.2 (Build: 20080711). Is there a patch available for this yet? Faculty are starting to hit Moodle as they ramp up for the fall semester and are encountering this problem in droves. If it helps, I can confirm that "DELETE FROM course_modules where instance=0" gets ride of the ghost activities.
To clarify, what I'm seeing is the behavior reported in <a href="http://tracker.moodle.org/browse/MDL-10993"> MDL-10993: Restore creates duplicate activity/resource icons with no text</a>. We get these duplicates when importing a course into a new blank course (rather than restoring from a backup). It appears to be intermittent; I can reproduce it on my development system but not my production one, yet I have reports of this happening in production as well.
The "DELETE FROM" line removed the duplicates however, as the tracker notes, fixing this will likely help with my problem as well. Increasing the priority. I am on the holiday at the moment but I shall post a patch next week.
I have had the same issues on multiple sites and this patch should resolve the issue with duplicate icons being created during Backup/Restore or import to new or existing course. moodle/backup/restorelib.php patch...
A work around for the issue with duplication ...
I am going to commit the patch today
fixed the old DML syntax in HEAD, sorry for missing that
Hi. Has this patch been included in the 1.9.2x version of moodle?
Hi Robert. Yes, it has. Use the most recent wekly build of 1.9.2.
Tim,
The issue here was additional modules instances if you check grade_item::fetch_all(array('itemtype'=>'mod', 'itemmodule'=>$modulename, We are running version 1.8.8 and this problem still exists. Not sure about during restore but it occurred during import. After importing contents, empty resources appeared in various weeks and when clicking them the following error occurs:The required instance of this module didn't exist. Module deleted. But it doesn't actually delete. I could go back in and manually delete the empty modules, but why does this still occur? Same bug or different one?
Hi !
I get this problem with version 1.8.5. But the biggest problemn is not that the icons of non-existing modules appear, but that thsese modules have not been created by the restore ! Thank you. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
The required instance of this module didn't exist. Module deleted.