mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 04:52:36 +02:00
Merge branch 'MOODLE_master_MDL-74773' of https://github.com/danielneis/moodle
This commit is contained in:
commit
7144dccdd8
@ -123,10 +123,15 @@ if ($editorform->is_cancelled()) {
|
||||
}
|
||||
redirect($returnurl);
|
||||
} else if ($data = $editorform->get_data()) {
|
||||
if (empty($id)) {
|
||||
$msg = get_string('contentcreated', 'contentbank');
|
||||
} else {
|
||||
$msg = get_string('contentupdated', 'contentbank');
|
||||
}
|
||||
$id = $editorform->save_content($data);
|
||||
// Just in case we've created a new content.
|
||||
$returnurl->param('id', $id);
|
||||
redirect($returnurl);
|
||||
redirect($returnurl, $msg, null, \core\output\notification::NOTIFY_SUCCESS);
|
||||
}
|
||||
|
||||
echo $OUTPUT->header();
|
||||
|
@ -37,6 +37,8 @@ $string['contenttypenoaccess'] = 'You cannot view this {$a} instance.';
|
||||
$string['contenttypenoedit'] = 'You can not edit this content';
|
||||
$string['contentvisibilitychanged'] = 'The content has been made {$a}.';
|
||||
$string['contentvisibilitynotset'] = 'An error was encountered while trying to set the content visibility.';
|
||||
$string['contentcreated'] = 'Content created.';
|
||||
$string['contentupdated'] = 'Content updated.';
|
||||
$string['contextnotallowed'] = 'You are not allowed to access the content bank in this context.';
|
||||
$string['copycontent'] = 'Copy content';
|
||||
$string['copyof'] = 'Copy of {$a}';
|
||||
|
Loading…
x
Reference in New Issue
Block a user