Moodle

Remove RQP question type from core in Moodle 1.9

Details

  • Type: Task Task
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.8
  • Fix Version/s: 1.9
  • Component/s: Questions
  • Labels:
    None
  • Affected Branches:
    MOODLE_18_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

Description

It hasn't worked since before Moodle 1.6, and no-one in maintaining it, so I am moving it to contrib.

Activity

Hide
Martin Dougiamas added a comment -

I'm seeing these errors when I visit the question category page using latest HEAD:

Table 'moodledev.mdl_question_rqp_types' doesn't exist

SELECT * FROM mdl_question_rqp_types

line 677 of lib/dmllib.php: call to debugging()
line 601 of lib/dmllib.php: call to get_recordset_sql()
ine 569 of lib/dmllib.php: call to get_recordset_select()
ine 862 of lib/dmllib.php: call to get_recordset()
line 172 of question/editlib.php: call to get_records()
line 514 of question/editlib.php: call to question_list()
line 59 of question/edit.php: call to question_showbank()

in /moodle/dev/lib/weblib.php on line 6177, referer: http://dev.moodle.com/course/view.php?id=2

Show
Martin Dougiamas added a comment - I'm seeing these errors when I visit the question category page using latest HEAD: Table 'moodledev.mdl_question_rqp_types' doesn't exist SELECT * FROM mdl_question_rqp_types line 677 of lib/dmllib.php: call to debugging() line 601 of lib/dmllib.php: call to get_recordset_sql() ine 569 of lib/dmllib.php: call to get_recordset_select() ine 862 of lib/dmllib.php: call to get_recordset() line 172 of question/editlib.php: call to get_records() line 514 of question/editlib.php: call to question_list() line 59 of question/edit.php: call to question_showbank() in /moodle/dev/lib/weblib.php on line 6177, referer: http://dev.moodle.com/course/view.php?id=2
Hide
Martin Dougiamas added a comment -

I've removed some offending code .... I'm not sure it's the right thing to do, because it means RQP doesn't work ... but since it doesn't anyway, well ...

Show
Martin Dougiamas added a comment - I've removed some offending code .... I'm not sure it's the right thing to do, because it means RQP doesn't work ... but since it doesn't anyway, well ...
Hide
Tim Hunt added a comment -

Thanks, Martin.

Show
Tim Hunt added a comment - Thanks, Martin.
Hide
Andrew Miller added a comment -

I ran into issues with this with the course backup module.

If a quiz had questions of the rqp type with 1.9, it failed backup until I deleted the rqp questions (the backup didn't give any helpful errors until I turned up verbosity).

I think I'd recommend having the backup module either exclude the rqp question type or have the 1.9 SQL upgrade process remove the questions entirely during a 1.9 upgrade giving people the option to save those questions to a file (just listing the course name & question details).

Show
Andrew Miller added a comment - I ran into issues with this with the course backup module. If a quiz had questions of the rqp type with 1.9, it failed backup until I deleted the rqp questions (the backup didn't give any helpful errors until I turned up verbosity). I think I'd recommend having the backup module either exclude the rqp question type or have the 1.9 SQL upgrade process remove the questions entirely during a 1.9 upgrade giving people the option to save those questions to a file (just listing the course name & question details).
Hide
Tim Hunt added a comment -

I think the current behaviour is sufficient. It gives you a warning when you upgrade if you have any RQP questions in your database, so you can take steps manually to resolve that. (I don't really want to do something automatic, becuase I am not sure that there is a solution that is the right thing for everyone. Also, it would be a lot of work to implement, and the number of people who every used RQP questions is tiny.)

I don't think backup should break if you have questions of a type that has since been uninstalled. Ah, that is a bug: MDL-15290

Show
Tim Hunt added a comment - I think the current behaviour is sufficient. It gives you a warning when you upgrade if you have any RQP questions in your database, so you can take steps manually to resolve that. (I don't really want to do something automatic, becuase I am not sure that there is a solution that is the right thing for everyone. Also, it would be a lot of work to implement, and the number of people who every used RQP questions is tiny.) I don't think backup should break if you have questions of a type that has since been uninstalled. Ah, that is a bug: MDL-15290
Hide
Andrew Miller added a comment -

Thanks for opening the new bug...makes sense as good way to handle it.

As far as the warning when you upgrade, I didn't see any errors during the database upgrade (all screens in the browser at the bottom and/or top said completed successfully). While it's possible it may have given a message in the middle of one those screens, they are very long (I'm presuming just going by the "completed successfully" message at bottom before clicking "Continue" is considered best practice?).

Of course, this isn't an issue for me anymore fortunately. Going into the database to find the rqp question types to remove them would be beyond some people though I believe.

Show
Andrew Miller added a comment - Thanks for opening the new bug...makes sense as good way to handle it. As far as the warning when you upgrade, I didn't see any errors during the database upgrade (all screens in the browser at the bottom and/or top said completed successfully). While it's possible it may have given a message in the middle of one those screens, they are very long (I'm presuming just going by the "completed successfully" message at bottom before clicking "Continue" is considered best practice?). Of course, this isn't an issue for me anymore fortunately. Going into the database to find the rqp question types to remove them would be beyond some people though I believe.

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated:
    Resolved: