Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Minor
-
Resolution: Unresolved
-
Affects Version/s: 1.9
-
Fix Version/s: STABLE backlog
-
Component/s: Questions
-
Labels:None
-
Database:MySQL
-
Affected Branches:MOODLE_19_STABLE
Description
Under certain circumstances, on Windows based server editing and saving Cloze question may lead ro an update error such as :
Data truncated for column 'category' at row 1
UPDATE mdl_question SET category = '300,1',parent = '3203',name = 'TEST d......
The problem appears only when editing and saving an existing Cloze questions. The problem does not appears when creating Cloze question or using a Linux environment.
Possible solution:
edit moodle/question/type/questiontype.php, and just before line 284, add the following:
$question->category = array_shift(explode(',', $question->category)); // Category clean
The above hack solved the issue in Windoze boxes, so it is here for Question guru review ![]()
As I am working on other aspects of Cloze,(
MDL-14625) I will include this.MDL-14625) I will include this.