ndunand / moodle-qtype_matrix

Source code of https://moodle.org/plugins/qtype_matrix
2 stars 10 forks source link

Kprime with exactly 4 options, no multiple responses possible #20

Closed isacsonk closed 9 years ago

isacsonk commented 10 years ago

Description

Some of the bugs are obsolete if we change the kprime/matrix question to a kprime question with only the configuration options we wanted to have in the first place.

Requirements

1) Remove configuration option "Allow multiple responses per answer statement?" ( -->#16, and #17 can be closed) 2) Remove possibility (plus sign) to add more answer statements and remove possibility to add more responses and remove possibility to have less than 4 answer statements and remove possibility to have less than 2 responses (-->#13 can be closed) 3) Change label from Matrix/Kprime to Kprime and change wordings in popup help

For more details see comments below.

isacsonk commented 10 years ago

1) Remove configuration option "Allow multiple responses per answer statement?" Old: nomultipleanswers

Should: nomultipleanswersnew

isacsonk commented 10 years ago

2) Remove possibility (plus sign) to add more answer statements and remove possibility to add more responses Old: responsematrix

New: responsematrixnew

and remove possibility to have less than 4 answer statements. If the user doesn't enter a value in all 4 fields, the question cannot be saved and an error message is shown: "You must supply a value here." fouranswerstatements

and remove possibility to have less than 2 responses. If the user doesn't enter a value in all 2 fields, the question cannot be saved and an error message is shown: "You must supply a value here." tworesponses

isacsonk commented 10 years ago

3) Change label from Matrix/Kprime to Kprime and change wordings in helppopup

Creating a new Kprime question: newkprim

Adding: kprimhelpopup

Editing:

editingkprim

Scoring method helppopup: scoringmethodhelppopup

isacsonk commented 10 years ago

Please do not remove any code for adding rows or columns etc. Only remove the corresponding GUI elements from the GUI that give users access to the functionality. This way there should be no risk of new bugs due to side effects in the code, because no code will be removed. Furthermore, there is no need for a new repository. Indeed, the question type should remain compatible with all pre-existing questions – the user simply won’t have access to the GUI elements for changing the number of rows & columns in a question anymore, effectively constraining the user to using KPrime questions with 4 rows and 2 columns, when generating new questions, and/or using preexisting questions with the number of rows/columns they already have.

ghost commented 10 years ago

So this feature request is implemented now. Upon installation (and also in general) there will be a configuration checkbox: screen shot 2014-09-10 at 10 43 46 pm which can allow you turn switch between [Kprime] or [Kprime AND Matrix] on the fly. This includes all the changes you mentioned except for one: if the user entered empty rows or columns, there will not be a red label saying "You must supply a value here.". However, the form validation will not succeed and the user (i.e. the teacher) will be brought back to the matrix creation form without an actual error message. While this behavior is less than ideal, the code that displays the rows and columns is custom made by the original creator of the matrix question type, and unfortunately, she or he did not adhere at all to the moodle standards. As a result, to make the red label appear where it should would take a lot of effort that I don't think is worth investing (As I've told Thomas previously, exactly the question creation form, if nothing else, should be completely wiped and written from scratch). So I think this is an endurable compromise for now until you indeed get this code rewritten.

At any rate, except for the red labels, the feature is ready for testing as far as I could see.

laurentopprecht commented 9 years ago

This request does not relate to our situation. The matrix plugin is meant to create matrix questions, not only kprime. Closing