Quiz

 
 
Picture of Pere O.
Question type: All or nothing multiple choice for Moodle 2.4
 

Hi,

I'm trying to get the 'all or nothing' functionality in multiple choice questions. That is, the user gets the mark of the question when his answers are 100% right, or 0 otherwise.

Looking at the documentation/forums/etc., seems like that is still not a core feature for Moodle 2.4.

I've also seen a module in https://github.com/jmvedrine/moodle-qtype_multichoiceset , marked as working for Moodle 2.3, but not for 2.4.

Does anyone know the current state for this functionality in 2.4? What may be the best approach? Try to port that old module or try to get in core this functionality for the already existing question type multiple choice ?

 

Related links:

https://tracker.moodle.org/browse/CONTRIB/component/10704

https://moodle.org/mod/data/view.php?d=13&rid=4014

https://tracker.moodle.org/browse/MDL-4037

 

Many thanks

EDIT: I've just seen this: https://moodle.org/plugins/view.php?plugin=qtype_oumultiresponse , which may be the way to go!

 
Average of ratings: -
Tim at Lone Pine Koala Sanctuary
Re: Question type: All or nothing multiple choice for Moodle 2.4
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

I'm afraid that does something different. It gives partial credit for partially right answers.

 
Average of ratings: -
Picture of Jean-Michel Védrine
Re: Question type: All or nothing multiple choice for Moodle 2.4
Group DevelopersGroup Particularly helpful Moodlers

Hello,

multichoiceset and oumultiresponse are 2 different question types and the marking is not done in the same way. Looking at what you say "That is, the user gets the mark of the question when his answers are 100% right, or 0 otherwise" you want multichoiceset grading not oumultiresponse.

The version in my github account should work with no problem with Moodle 2.4. If not, report the problem here and I will push an upgrade. In fact for questiontypes that don't use javascript (multichoiceset and oumulti response don't use javascript) there' is no real difference between 2.3 and 2.4.

 
Average of ratings: -
Tim at Lone Pine Koala Sanctuary
Re: Question type: All or nothing multiple choice for Moodle 2.4
Group DevelopersGroup Documentation writersGroup Particularly helpful Moodlers

Should you add that to https://moodle.org/plugins/ Jean-Michel?

 
Average of ratings: -
Picture of Pere O.
Re: Question type: All or nothing multiple choice for Moodle 2.4
 

Many thanks.

 
Average of ratings: -
Picture of Juergen Zimmer
Re: Question type: All or nothing multiple choice for Moodle 2.4
 

Just to let you know that I've just tried the MOODLE_23_STABLE branch of this question type in my Moodle Moodle 2.5+ (Build: 20130606) and so far I haven't had any issues.

 

 
Average of ratings: -
Picture of Jean-Michel Védrine
Re: Question type: All or nothing multiple choice for Moodle 2.4
Group DevelopersGroup Particularly helpful Moodlers

Hello Juergen,

Thanks for reporting.

Yes I think this version was working but the form on the question creation/edition page was needing some changes now that shortforms and collapsed editors are in Moodle 2.5

There are now 3 differents branches in my github repo https://github.com/jmvedrine/moodle-qtype_multichoiceset

  • MOODLE_23_STABLE is for Moodle 2.3.x
  • MOODLE_24_STABLE is for Moodle 2.4.x (and is in fact not different from the previous one)
  • master has been upgraded for Moodle 2.5.x

This is because I am preparing to submit this plugin to the Plugins directory smile

Please report any problem or comment.

 
Average of ratings: -
Picture of Tristan Roscoe
Re: Question type: All or nothing multiple choice for Moodle 2.4
 

Hey Jean-Michel! I know the master is only up to 2.5.x. Any reason it wouldn't work on 2.6? Getting the following error:

Plugin "qtype_multichoiceset" is installed in incorrect location "$CFG->dirroot/question/type/multichoiceset", expected location is ""

More information about this error

Debug info: 
Error code: detectedmisplacedplugin
Stack trace:
  • line 427 of /lib/upgradelib.php: plugin_misplaced_exception thrown
  • line 1580 of /lib/upgradelib.php: call to upgrade_plugins()
  • line 422 of /admin/index.php: call to upgrade_noncore()

As far as I've read, this was the only change from 2.5 to 2.6

This files describes API changes for question type plugins.
 
=== 2.6 ===
  + The changes in MDL-32750 were reverted in favour of the new pdw toggle toolbars
    plugin for TinyMCE. The get_non_collapsible_editor_options method has been deprecated.
 
 
Average of ratings: -
Picture of Tristan Roscoe
Re: Question type: All or nothing multiple choice for Moodle 2.4
 

You need to update your sql to include additional name fields in the user object.

  • line 3570 of /lib/moodlelib.php: call to debugging()
  • line 4061 of /lib/navigationlib.php: call to fullname()
  • line 3956 of /lib/navigationlib.php: call to settings_navigation->generate_user_settings()
  • line 3364 of /lib/navigationlib.php: call to settings_navigation->load_user_settings()
  • line 717 of /lib/pagelib.php: call to settings_navigation->initialise()
  • line 734 of /lib/pagelib.php: call to moodle_page->magic_get_settingsnav()
  • line 109 of /blocks/admin_bookmarks/block_admin_bookmarks.php: call to moodle_page->__get()
  • line 296 of /blocks/moodleblock.class.php: call to block_admin_bookmarks->get_content()
  • line 238 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()
  • line 956 of /lib/blocklib.php: call to block_base->get_content_for_output()
  • line 1008 of /lib/blocklib.php: call to block_manager->create_block_contents()
  • line 353 of /lib/blocklib.php: call to block_manager->ensure_content_created()
  • line 6 of /theme/base/layout/general.php: call to block_manager->region_has_content()
  • line 866 of /lib/outputrenderers.php: call to include()
  • line 796 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
  • line 2563 of /lib/outputrenderers.php: call to core_renderer->header()
  • line ? of unknownfile: call to core_renderer->fatal_error()
  • line 1644 of /lib/setuplib.php: call to call_user_func_array()
  • line 362 of /lib/setuplib.php: call to bootstrap_renderer->__call()
  • line 362 of /lib/setuplib.php: call to bootstrap_renderer->fatal_error()
  • line 1158 of /lib/upgradelib.php: call to default_exception_handler()
  • line 1592 of /lib/upgradelib.php: call to upgrade_handle_exception()
  • line 422 of /admin/index.php: call to upgrade_noncore()
You need to update your sql to include additional name fields in the user object.
  • line 3570 of /lib/moodlelib.php: call to debugging()
  • line 23 of /admin/settings/server.php: call to fullname()
  • line 6361 of /lib/adminlib.php: call to require()
  • line 3518 of /lib/navigationlib.php: call to admin_get_root()
  • line 3375 of /lib/navigationlib.php: call to settings_navigation->load_administration_settings()
  • line 717 of /lib/pagelib.php: call to settings_navigation->initialise()
  • line 734 of /lib/pagelib.php: call to moodle_page->magic_get_settingsnav()
  • line 109 of /blocks/admin_bookmarks/block_admin_bookmarks.php: call to moodle_page->__get()
  • line 296 of /blocks/moodleblock.class.php: call to block_admin_bookmarks->get_content()
  • line 238 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()
  • line 956 of /lib/blocklib.php: call to block_base->get_content_for_output()
  • line 1008 of /lib/blocklib.php: call to block_manager->create_block_contents()
  • line 353 of /lib/blocklib.php: call to block_manager->ensure_content_created()
  • line 6 of /theme/base/layout/general.php: call to block_manager->region_has_content()
  • line 866 of /lib/outputrenderers.php: call to include()
  • line 796 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
  • line 2563 of /lib/outputrenderers.php: call to core_renderer->header()
  • line ? of unknownfile: call to core_renderer->fatal_error()
  • line 1644 of /lib/setuplib.php: call to call_user_func_array()
  • line 362 of /lib/setuplib.php: call to bootstrap_renderer->__call()
  • line 362 of /lib/setuplib.php: call to bootstrap_renderer->fatal_error()
  • line 1158 of /lib/upgradelib.php: call to default_exception_handler()
  • line 1592 of /lib/upgradelib.php: call to upgrade_handle_exception()
  • line 422 of /admin/index.php: call to upgrade_noncore()
 

Moodle

You need to update your sql to include additional name fields in the user object.
  • line 3570 of /lib/moodlelib.php: call to debugging()
  • line 609 of /lib/outputrenderers.php: call to fullname()
  • line 62 of /theme/base/layout/general.php: call to core_renderer->login_info()
  • line 866 of /lib/outputrenderers.php: call to include()
  • line 796 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
  • line 2563 of /lib/outputrenderers.php: call to core_renderer->header()
  • line ? of unknownfile: call to core_renderer->fatal_error()
  • line 1644 of /lib/setuplib.php: call to call_user_func_array()
  • line 362 of /lib/setuplib.php: call to bootstrap_renderer->__call()
  • line 362 of /lib/setuplib.php: call to bootstrap_renderer->fatal_error()
  • line 1158 of /lib/upgradelib.php: call to default_exception_handler()
  • line 1592 of /lib/upgradelib.php: call to upgrade_handle_exception()
  • line 422 of /admin/index.php: call to upgrade_noncore()
 
Average of ratings: -
Picture of Jean-Michel Védrine
Re: Question type: All or nothing multiple choice for Moodle 2.4
Group DevelopersGroup Particularly helpful Moodlers

Hello Tristan,

I don't understand what is wrong in your Moodle

  • I have multichoiceset installed on several 2.6 and 2.7dev Moodle installs and it seems to be working with no problem
  • the version.php file in multichoiceset correctly define the component : $plugin->component = 'qtype_multichoiceset';
  • something is strange in the error message you get : current location is correct but expected location is empty

Unless I am missing something obvious the problem is not in multichoiceset.

Are you sure your install or upgrade of Moodle 2.6 is correct ?

 
Average of ratings: -
Picture of Jean-Michel Védrine
Re: Question type: All or nothing multiple choice for Moodle 2.4
Group DevelopersGroup Particularly helpful Moodlers

The other messages about additional name fields are completely unrelated to multichoiceset.

Did you follow the correct procedure to update your Moodle ? (Fist delete all the files of the previous version) ?

 
Average of ratings: -