mirror of
https://github.com/moodle/moodle.git
synced 2025-03-19 15:10:05 +01:00
MDL-79863 qtype_ordering: qtype_ordering restore functionality on Moodle 2.0
This commit is contained in:
parent
29864f6c14
commit
b837d03eb0
@ -142,10 +142,14 @@ class qtype_ordering_edit_form extends question_edit_form {
|
||||
$this->adjust_html_editors($mform, $name, $repeats);
|
||||
|
||||
// Adding feedback fields (=Combined feedback).
|
||||
$this->add_combined_feedback_fields(false);
|
||||
if (method_exists($this, 'add_combined_feedback_fields')) {
|
||||
$this->add_combined_feedback_fields(false);
|
||||
}
|
||||
|
||||
// Adding interactive settings (=Multiple tries).
|
||||
$this->add_interactive_settings(false, false);
|
||||
if (method_exists($this, 'add_interactive_settings')) {
|
||||
$this->add_interactive_settings(false, false);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -282,11 +286,17 @@ class qtype_ordering_edit_form extends question_edit_form {
|
||||
public function data_preprocessing($question) {
|
||||
|
||||
$question = parent::data_preprocessing($question);
|
||||
$question = $this->data_preprocessing_answers($question, true);
|
||||
if (method_exists($this, 'data_preprocessing_answers')) {
|
||||
$question = $this->data_preprocessing_answers($question, true);
|
||||
}
|
||||
|
||||
// Preprocess feedback.
|
||||
$question = $this->data_preprocessing_combined_feedback($question);
|
||||
$question = $this->data_preprocessing_hints($question, false, false);
|
||||
if (method_exists($this, 'data_preprocessing_combined_feedback')) {
|
||||
$question = $this->data_preprocessing_combined_feedback($question);
|
||||
}
|
||||
if (method_exists($this, 'data_preprocessing_hints')) {
|
||||
$question = $this->data_preprocessing_hints($question, false, false);
|
||||
}
|
||||
|
||||
// Preprocess answers and fractions.
|
||||
$question->answer = array();
|
||||
|
@ -24,6 +24,10 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
if (class_exists('default_questiontype')) { // Moodle 2.0
|
||||
require_once($CFG->dirroot.'/question/type/ordering/legacy/20.php');
|
||||
}
|
||||
|
||||
/**
|
||||
* The ordering question type.
|
||||
*
|
||||
@ -807,3 +811,12 @@ class qtype_ordering extends question_type {
|
||||
$question->showgrading = $showgrading;
|
||||
}
|
||||
}
|
||||
|
||||
if (function_exists('question_register_questiontype')) { // Moodle 2.0
|
||||
class qtype_ordering_options_qtype extends qtype_ordering {
|
||||
function name() {
|
||||
return 'ordering';
|
||||
}
|
||||
}
|
||||
question_register_questiontype(new qtype_ordering_options_qtype());
|
||||
}
|
||||
|
@ -28,6 +28,6 @@ defined('MOODLE_INTERNAL') || die();
|
||||
$plugin->cron = 0;
|
||||
$plugin->component = 'qtype_ordering';
|
||||
$plugin->maturity = MATURITY_STABLE;
|
||||
$plugin->requires = 2011070100; // Moodle 2.1.
|
||||
$plugin->version = 2017040658;
|
||||
$plugin->release = '2017-04-26 (58)';
|
||||
$plugin->requires = 2010112400; // Moodle 2.0
|
||||
$plugin->version = 2017050859;
|
||||
$plugin->release = '2017-05-08 (59)';
|
||||
|
Loading…
x
Reference in New Issue
Block a user