Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Won't Fix
-
Affects Version/s: 1.9.5
-
Fix Version/s: None
-
Component/s: Wiki (1.x)
-
Labels:None
-
Affected Branches:MOODLE_19_STABLE
Description
Please see mdl_wiki_entries table, the most of columns courseid and userid are zero!
The cause of this problem is in function wiki_add_entry(), mod/wiki/lib.php.
When the type of wiki (=wtype) is 'group' (teachers and students can edit the wiki), $wiki_entry->course and $wiki_entry->userid aren't set values.
I had attached a zip file which includes original code, modified code and commented code of function wiki_add_entry().
Please see and check, then try this.
mdl_wiki_entries are checked in global search for access control.
I think, upgrading of database to correct 'mdl_wiki_entries' will be needed.
The courseid can be corrected from 'mdl_wiki' easily, on the other hand, correcting the userid filed is not so easy (but may be it is not impossible), for example 'mdl_course_module' ?