Issue Details (XML | Word | Printable)

Key: CONTRIB-494
Type: Bug Bug
Status: Open Open
Priority: Major Major
Assignee: Anthony Borrow
Reporter: Per Olofsson
Votes: 0
Watchers: 0
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Non-core contributed modules

exercise: cartesian join in locallib.php

Created: 11/Jun/08 11:27 PM   Updated: 03/Jan/09 01:14 AM
Return to search
Component/s: Module: {none of the above}
Affects Version/s: 2.0
Fix Version/s: None

File Attachments: 1. File exercise.diff (0.9 kB)
2. File exercise2.diff (1 kB)


Database: Any
Participants: Anthony Borrow and Per Olofsson
Security Level: None
Affected Branches: MOODLE_20_STABLE


 Description  « Hide
The exercise module brings my database to a crawl. The reason are two Cartesian joins in the function exercise_get_student_submissions(). All records from the user table are joined with each exercise submission, creating a huge result.

The attached patch fixes the problem (at least it seems to...)


 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Anthony Borrow added a comment - 13/Jul/08 08:42 AM
I posted in the forums at: http://moodle.org/mod/forum/discuss.php?d=96336#p446981 to help identify the current maintainer of the exercise module. The patch seems reasonable to me as it limits the scope down to where the users match but I am not familiar enough with the exercise module to know of what impact the change would have. Hopefully someone will step forward to help maintain this module and then I can assign this issue to them and if they judge it to be a good patch they can then apply it to CVS. Peace - Anthony

Anthony Borrow added a comment - 02/Jan/09 06:41 AM
Petr - I am assuming that this is also an issue in Moodle 1.9. If so, you might be able to get someone to take a look at it by creating a bug report for Moodle 1.9 and get your patch applied there and then we can easily apply it to CONTRIB. I just want to have someone more familiar with the code look at it and make sure it is a good fix for the trouble you were reporting. Peace - Anthony

Per Olofsson added a comment - 02/Jan/09 08:46 AM
Hi Anthony,

I think the patch is missing something, but now I can't remember what. I need to take a look at it again.
I think it needs to narrow the scope even more. I'm attaching another patch which I think I'm using right now, but it might need to be cleaned up to apply to HEAD. Not sure I have the time...


Per Olofsson added a comment - 02/Jan/09 08:47 AM
improved patch (I think)

Per Olofsson made changes - 02/Jan/09 08:47 AM
Field Original Value New Value
Attachment exercise2.diff [ 15984 ]
Anthony Borrow added a comment - 03/Jan/09 01:14 AM
I understand the time crunch. I'm getting ready to leave for 3 weeks in Nepal and self-imposed restrictions on email and Internet (I'm going cold turkey - aka, I will not be doing anything related to a computer for 3 weeks). Peace - Anthony