mirror of
https://github.com/moodle/moodle.git
synced 2025-08-03 08:09:47 +02:00
MDL-16514 - adding format to forum mod_form and fixing regression in single forum type add instance
This commit is contained in:
parent
00b5ffbbb4
commit
b2a9505b22
2 changed files with 3 additions and 1 deletions
|
@ -70,7 +70,7 @@ function forum_add_instance($forum) {
|
|||
$discussion->name = $forum->name;
|
||||
$discussion->intro = $forum->intro;
|
||||
$discussion->assessed = $forum->assessed;
|
||||
$discussion->format = $forum->type;
|
||||
$discussion->format = $forum->format;
|
||||
$discussion->mailnow = false;
|
||||
$discussion->groupid = -1;
|
||||
|
||||
|
|
|
@ -32,6 +32,8 @@ class mod_forum_mod_form extends moodleform_mod {
|
|||
$mform->addRule('intro', get_string('required'), 'required', null, 'client');
|
||||
$mform->setHelpButton('intro', array('writing', 'questions', 'richtext'), false, 'editorhelpbutton');
|
||||
|
||||
$mform->addElement('format', 'format', get_string('format'));
|
||||
|
||||
$options = array();
|
||||
$options[0] = get_string('no');
|
||||
$options[1] = get_string('yesforever', 'forum');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue