# This patch file was generated by NetBeans IDE # This patch can be applied using context Tools: Apply Diff Patch action on respective folder. # It uses platform neutral UTF-8 encoding. # Above lines and this line are ignored by the patching process. Index: moodle/mod/lesson/editpage.php --- moodle/mod/lesson/editpage.php Base (1.13) +++ moodle/mod/lesson/editpage.php Locally Modified (Based On 1.13) @@ -101,7 +101,12 @@ if ($qtype) { //TODO: the handling of form for the selection of question type is a bloody hack! (skodak) $data->qtype = $qtype; + if($qtype ==20) { + $mform->add_action_buttons(get_string('cancel'), get_string('addabranchtable','lesson')); + }else { + $mform->add_action_buttons(get_string('cancel'), get_string('addaquestionpage','lesson')); } + } $data = file_prepare_standard_editor($data, 'contents', $editoroptions, null); $mform->set_data($data); $PAGE->navbar->add(get_string('addanewpage', 'lesson'), $PAGE->url); Index: moodle/mod/lesson/editpage_form.php --- moodle/mod/lesson/editpage_form.php Base (1.5) +++ moodle/mod/lesson/editpage_form.php Locally Modified (Based On 1.5) @@ -50,6 +50,7 @@ asort($types); $mform->addElement('select', 'qtype', get_string('selectaqtype', 'lesson'), $types); $mform->setDefault('qtype', LESSON_PAGE_MULTICHOICE); // preselect the most common type + $this->add_action_buttons(get_string('cancel'), get_string('addaquestionpage','lesson')); } } Index: moodle/mod/lesson/locallib.php --- moodle/mod/lesson/locallib.php Base (1.141.2.1) +++ moodle/mod/lesson/locallib.php Locally Modified (Based On 1.141.2.1) @@ -741,8 +741,6 @@ if ($this->_customdata['edit'] === true) { $mform->addElement('hidden', 'edit', 1); $this->add_action_buttons(get_string('cancel'), get_string('savepage', 'lesson')); - } else { - $this->add_action_buttons(get_string('cancel'), get_string('addaquestionpage', 'lesson')); } }