Penalty for Cloze type Q.is absent in Moodle 2.1

Penalty for Cloze type Q.is absent in Moodle 2.1

by Ravi Vare -
Number of replies: 5

Hi Moodler,

I am using Moodle 2.1.1+ (Build: 20110831)

There is no option /dialogue box for 'Penalty Factor'.

Experts help appriciated.

TIA

Ravi

Attachment cloze type.JPG
Average of ratings: -
In reply to Ravi Vare

Re: Penalty for Cloze type Q.is absent in Moodle 2.1

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

That's a bug. Please can you report it in the Tracker.

In reply to Tim Hunt

Re: Penalty for Cloze type Q.is absent in Moodle 2.1

by Pierre Pichet -

Absent in ALL question types...

Missing in question_edit_form

$mform->addElement('text', 'name', get_string('questionname', 'question'),
                array('size' => 50));
        $mform->setType('name', PARAM_TEXT);
        $mform->addRule('name', null, 'required', null, 'client');
        $mform->addElement('editor', 'questiontext', get_string('questiontext', 'question'),
                array('rows' => 15), $this->editoroptions);
        $mform->setType('questiontext', PARAM_RAW);
        $mform->addElement('text', 'defaultmark', get_string('defaultmark', 'question'),
                array('size' => 3));
        $mform->setType('defaultmark', PARAM_INT);
        $mform->setDefault('defaultmark', 1);
        $mform->addRule('defaultmark', null, 'required', null, 'client');
        $mform->addElement('editor', 'generalfeedback', get_string('generalfeedback', 'question'),
                array('rows' => 10), $this->editoroptions);
        $mform->setType('generalfeedback', PARAM_RAW);
        $mform->addHelpButton('generalfeedback', 'generalfeedback', 'question');

Bug MDL-29216

 

Pierre

In reply to Pierre Pichet

Re: Penalty for Cloze type Q.is absent in Moodle 2.1

by Ravi Vare -

Hi Tim & Pierre,

I am using Moodle 2.1.1+ (Build: 20110831)

' Penalty ' is available for other question except Cloze type .

I found file

> \question\type\edit_question_form.php

Above Code i applied at end of File.

It doesn't work (gives blank page)

I think place of application is faulty in file (edit_question_form.php).

Where to put this Code?

TIA

Best Regards,

Ravi

In reply to Pierre Pichet

Re: Penalty for Cloze type Q.is absent in Moodle 2.1

by Jean-Michel Védrine -

Hello Pierre,

Are you sure ?

As I remember wghat I have studied when I updated some of the question types that I maintain to Moodle 2.1, the penalty setting is added when the line

$this->add_interactive_settings();
is executed;
So I don't think it is missing in all types.
I am in course smile so I can't look at the code but it may be missing in some types but certtainly not in all types.
Maybe cloze is missing this line ?

In reply to Pierre Pichet

Re: Penalty for Cloze type Q.is absent in Moodle 2.1

by Pierre Pichet -

Ravi And Jean-Michel,

Thanks for your comment.

Effectively I did not see it for other question as it has been relocated after the answers so quite low in the question form. thoughtful

I modified the MDL-29216 accordingly.

 

Pierre

P.S. Working at 11h pm is not always as productive as early in the morning wink