Non-core contributed modules

exercise: cartesian join in locallib.php

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Incomplete
  • Affects Version/s: 2.0
  • Fix Version/s: None
  • Labels:
    None
  • Database:
    Any
  • Affected Branches:
    MOODLE_20_STABLE

Description

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...)

  1. exercise.diff
    11/Jun/08 11:27 PM
    0.9 kB
    Per Olofsson
  2. exercise2.diff
    02/Jan/09 8:47 AM
    1 kB
    Per Olofsson

Activity

Hide
Anthony Borrow added a comment -

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

Show
Anthony Borrow added a comment - 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
Hide
Anthony Borrow added a comment -

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

Show
Anthony Borrow added a comment - 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
Hide
Per Olofsson added a comment -

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...

Show
Per Olofsson added a comment - 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...
Hide
Per Olofsson added a comment -

improved patch (I think)

Show
Per Olofsson added a comment - improved patch (I think)
Hide
Anthony Borrow added a comment -

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

Show
Anthony Borrow added a comment - 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
Hide
Anthony Borrow added a comment -

Per - I am resolving this issue as incomplete. I am trying to clean up some of my to do list and this does not seem to be active. The first step would be to find someone to serve as the primary maintainer. I posted requesting someone to step forward but did not find anyone. As such, it is currently not being actively maintained by anyone. Peace - Anthony

Show
Anthony Borrow added a comment - Per - I am resolving this issue as incomplete. I am trying to clean up some of my to do list and this does not seem to be active. The first step would be to find someone to serve as the primary maintainer. I posted requesting someone to step forward but did not find anyone. As such, it is currently not being actively maintained by anyone. Peace - Anthony

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: