Issue Details (XML | Word | Printable)

Key: MDL-15139
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Tim Hunt
Reporter: Jerome Mouneyrac
Votes: 2
Watchers: 2
Operations

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

Cannot create Random Short Answer

Created: 04/Jun/08 10:24 AM   Updated: 01/Jul/08 03:47 PM
Component/s: Questions
Affects Version/s: 1.9.1
Fix Version/s: 1.9.2

Environment: WAMP/LAMP
Issue Links:
Blockers

Participants: Jerome Mouneyrac, Matthew Davidson, Nicolas Connault, Paul-Andre Chasse, Ryan Smith and Tim Hunt
Security Level: None
QA Assignee: Nicolas Connault
Resolved date: 26/Jun/08
Affected Branches: MOODLE_19_STABLE
Fixed Branches: MOODLE_19_STABLE


 Description  « Hide
Course > Questions > Create New Question: Random Short Answer (you previously created 2 short answer questions in the same category)
Save Changes

=> error message is displayed: "There are no short answer questions in the category that you chose ''. Choose a different category, make some questions in this category."



 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Paul-Andre Chasse added a comment - 20/Jun/08 01:58 AM
At the Universite de Sherbrooke, we had that problem. We made a temporary fix into the source. The file '/moodle/question/type/randomsamatch/edit_randomsamatch_form.php' was modified as follow:

We replaced the following code ( lines 53-57 of file /moodle/...edit_randomsamatch_form.php) :

if (isset($data['usecurrentcat'])){ $category = $data['category']; }else{ $category = $data['categorymoveto']; }

By the following:

if (!isset($data['usecurrentcat']) && isset($data['categorymoveto'])) { $category = $data['categorymoveto']; } } else { $category = $data['category']; } }

Paul-André Chassé


Ryan Smith added a comment - 25/Jun/08 11:35 PM
Will this be fixed soon? This should not be minor priority, it should be at least major. The Random-Short Answer Matching question type is currently completely broken on the latest cvs of the Moodle 1.9 stable branch.

Thanks for the code Paul-Andre, it does temporarily fix the issue for us.


Matthew Davidson added a comment - 25/Jun/08 11:36 PM
This question type is completely broken without the patch. Thank you for the patch Paul...even though it doesn't fix everything...at least it works now if the questions are in the correct category. However, there are some major problems.

When creating the question, you select a category and then select how many questions to check for.

If you have all your questions in subcategories of the category selected, the check will fail...even though the question will draw from those subcategories.


Tim Hunt added a comment - 26/Jun/08 09:13 PM
Thanks for working out the fix Paul-Andre. I changed it slightly, in order to make the code here closer to default_questiontype::save_question.

Ryan Smith added a comment - 26/Jun/08 09:24 PM
Tim,

I just tested it and looks like it works properly now. Thanks for the quick fix!


Matthew Davidson added a comment - 26/Jun/08 09:37 PM
Check this new related bug... http://tracker.moodle.org/browse/MDL-15433

Nicolas Connault added a comment - 01/Jul/08 03:47 PM
Tested and verified. Closing.