Issue Details (XML | Word | Printable)

Key: MDL-19615
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Eloy Lafuente (stronk7)
Reporter: Tatsuya Shirai
Votes: 0
Watchers: 1
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

Values of the course id and the user id in mdl_wiki_entries are zero.

Created: 24/Jun/09 07:07 PM   Updated: 25/Jun/09 08:40 AM
Return to search
Component/s: Wiki (1.x)
Affects Version/s: 1.9.5
Fix Version/s: None

File Attachments: 1. Zip Archive wiki_add_entry.zip (2 kB)


Participants: Eloy Lafuente (stronk7) and Tatsuya Shirai
Security Level: None
Affected Branches: MOODLE_19_STABLE


 Description  « Hide
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.

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Tatsuya Shirai added a comment - 24/Jun/09 07:20 PM
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' ?