Moodle plugins directory: All-or-Nothing Multiple Choice | Moodle.org
All-or-Nothing Multiple Choice
Question types ::: qtype_multichoiceset
Maintained by Jean-Michel Védrine, Eoin Campbell
The all-or-nothing multiple choice question is a version of the core multi-answer multiple choice question with modified grading. In an all-or-nothing multiple choice question, a respondent can choose one or more answers. If the chosen answers correspond exactly to the correct choices defined in the question, the respondent gets 100%. If he/she chooses any incorrect choices or does not select all of the correct choices, the grade is 0%.
Latest release:
3975 sites
1k downloads
75 fans
Current versions available: 7
This is a multiple-choice, multiple-response question type that was created by Adriane Boyd and later maintained by Jean-Michel Vedrine. It is now maintained by Eoin Campbell.
Description
The all or nothing question is adapted from the existing multichoice question. The main difference from the standard Moodle multiple choice question type is in the way that grading works. The teacher editing interface is slightly modified as when creating the question, the teacher just indicates which choices are correct.Grading
In an all-or-nothing multiple choice question, a respondent can choose one or more answers. If the chosen answers correspond exactly to the correct choices defined in the question, the respondent gets 100%. If he/she chooses any incorrect choices or does not select all of the correct choices, the grade is 0%. Before using this question type, teachers must really think if this grading is what they want.Contributors
Jean-Michel Védrine (Lead maintainer)
Eoin Campbell: New maintainer
Adriane Boyd: Original Author
Please login to view contributors details and/or to contact them
I just installed this great plugin, but I have a problem. My checkbox is above the sentence, so it looks pretty weird. Can I somehow set the checkbox to be inline with the sentence?
Thanks in advance for the reply!
Have a nice day,
Matej Topolovec
I agree with Matej Topolovec's remark. The checkboxes should be aligned. Plus if numbering option is selected, the numbers (or letters) overlap with the beginning of the answer text.
Our tech support thinks this is due to the “all-or-nothing” plugin update (qtype_multichoiceset). Now we have version 1.10.1 (Build 2021070900)
Ask for your help solving this problem. Did anyone have similar errors?
my installations of this plugin crash repeatly.
I have Moodle 3.11.4+ and when I try to install 1.9.1 version of this plugin, after correct previous check, the website displays "error/moodle/generalexceptionmessage" and all Moodle sites crash and are displaying the following error:
Exception - Call to undefined function is_executable()
Solution for work other sites is delete multichoiceset directory on my FTP, but I would like to use this plugin.
Do you have any ideas, please? Thank you for your help.
I have been recently trying to import all or nothing questions via ohie plugin (https://moodle.org/plugins/qformat_ohie) that references your plugin.
I know there have been changes to the all or nothing question type, and the coding must've made the import via ohie format incompatible to import the boolean properties of the answers anymore.
Unfortunately they do not develop the plugin anymore, and I wanted to modify the code myself (perhaps with your guidance and assistance).
It seems that it imports most of the settings thus far except for the correct corresponding answers. Here is the php snippet :
$userfractionrightanswer = 1/count($userrightanswers);
$userfranctionbadanswer = -1/(count($useranswers)-count($userrightanswers));
$acount = 0;
foreach($useranswers as $key => $useranswer){
$question->answer[$acount] = array('text' => $useranswer, 'format' => FORMAT_HTML, 'files' => array());
$question->feedback[$acount] = array('text' => '', 'format' => FORMAT_HTML, 'files' => array());
if(in_array($key,$userrightanswers)){
$question->fraction[$acount] = $userfractionrightanswer;
} else{
$question->fraction[$acount] = $userfranctionbadanswer;
}
$acount++;
}
return $question;
}
private function import_multichoice_all_or_nothing($rowdata){
question_bank::load_question_definition_classes('multichoiceset');
$question = $this->defaultquestion();
$question->qtype = 'multichoiceset';
$question->shuffleanswers = 1;
$userrightanswers = explode(',',$rowdata[8]);
$useranswers = $this->getanswers($rowdata);
if(count($useranswers) < count($userrightanswers)){
imap_alerts();
}elseif (count($userrightanswers)<2){
echo get_string('alert_multichoice', 'qformat_ohie', $rowdata[0]);
return $this->import_multichoice_one_right_answer($rowdata);
}
$acount = 0;
foreach ($useranswers as $key => $useranswer){
$question->answer[$acount] = array('text' => $useranswer, 'format' => FORMAT_HTML);
$question->feedback[$acount] = array('text' => '', 'format' => FORMAT_HTML);
if(in_array($key,$userrightanswers)){
$question->fraction[$acount] = 1.0;
}
else{
$question->fraction[$acount] = 1.0;
}
$acount++;
}
return($question);
}
private function getanswers($rowdata){
$key = 'A';
$answers = array();
for($i = 9; $i < 15; $i++){
$curentanswers = $rowdata[$i];
if(!empty($curentanswers))
$answers[$key] = $curentanswers;
$key++;
}
return($answers);
}
I have a feeling that it is not importing boolean properties for the corresponding answers from text. The functions above references the get answers function and the import for the all or nothing plugin.
I think the problem could be in this line. (I could be wrong.)
$question->answer[$acount] = array('text' => $useranswer, 'format' => FORMAT_HTML);
or in
if(in_array($key,$userrightanswers)){
$question->fraction[$acount] = 1.0;
}
else{
$question->fraction[$acount] = 1.0;
perhaps you could give some guidance for the correct function in order for the imported csv to enable the correct answers from the answer key?
I'm very interested in this plugin for digital exams via Moodle. Are there any plans to update the plugin to the current Moodle version 4.3 and onwards?
Thanks for your work and greetings from Germany!