mirror of
https://github.com/moodle/moodle.git
synced 2025-04-16 05:54:19 +02:00
MDL-14406
Ensure 'length' field for description type questions is 0 and that default for all questions is 0 Merged from STABLE_19
This commit is contained in:
parent
64fcd675f7
commit
3f5633df11
@ -392,6 +392,7 @@ class qformat_default {
|
||||
}
|
||||
return $category;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return complete file within an array, one item per line
|
||||
* @param string filename name of file
|
||||
@ -474,6 +475,7 @@ class qformat_default {
|
||||
$question->incorrectfeedback = '';
|
||||
$question->answernumbering = 'abc';
|
||||
$question->penalty = 0.1;
|
||||
$question->length = 1;
|
||||
|
||||
// this option in case the questiontypes class wants
|
||||
// to know where the data came from
|
||||
@ -550,6 +552,7 @@ class qformat_default {
|
||||
return $newfile;
|
||||
}
|
||||
|
||||
|
||||
/*******************
|
||||
* EXPORT FUNCTIONS
|
||||
*******************/
|
||||
@ -703,6 +706,7 @@ class qformat_default {
|
||||
fclose($fh);
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* get the category as a path (e.g., tom/dick/harry)
|
||||
* @param int id the id of the most nested catgory
|
||||
|
@ -277,6 +277,8 @@ class qformat_gift extends qformat_default {
|
||||
|
||||
switch ($question->qtype) {
|
||||
case DESCRIPTION:
|
||||
$question->defaultgrade = 0;
|
||||
$question->length = 0;
|
||||
return $question;
|
||||
break;
|
||||
case ESSAY:
|
||||
|
@ -302,6 +302,8 @@ class qformat_xml extends qformat_default {
|
||||
$qo = $this->import_headers( $question );
|
||||
// header parts particular to shortanswer
|
||||
$qo->qtype = DESCRIPTION;
|
||||
$qo->defaultgrade = 0;
|
||||
$qo->length = 0;
|
||||
return $qo;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user