Merge branch 'MDL-74188-404' of https://github.com/paulholden/moodle into MOODLE_404_STABLE
This commit is contained in:
@@ -63,7 +63,7 @@ class core_notes_external extends external_api {
|
||||
'publishstate' => new external_value(PARAM_ALPHA, '\'personal\', \'course\' or \'site\''),
|
||||
'courseid' => new external_value(PARAM_INT, 'course id of the note (in Moodle a note can only be created into a course, even for site and personal notes)'),
|
||||
'text' => new external_value(PARAM_RAW, 'the text of the message - text or HTML'),
|
||||
'format' => new external_format_value('text', VALUE_DEFAULT),
|
||||
'format' => new external_format_value('text', VALUE_DEFAULT, FORMAT_MOODLE),
|
||||
'clientnoteid' => new external_value(PARAM_ALPHANUMEXT, 'your own client id for the note. If this id is provided, the fail message id will be returned to you', VALUE_OPTIONAL),
|
||||
)
|
||||
)
|
||||
@@ -146,6 +146,7 @@ class core_notes_external extends external_api {
|
||||
break;
|
||||
case 'text':
|
||||
$textformat = FORMAT_PLAIN;
|
||||
break;
|
||||
default:
|
||||
$textformat = util::validate_format($note['format']);
|
||||
break;
|
||||
|
||||
+1
-1
@@ -108,7 +108,7 @@ function note_save(&$note) {
|
||||
$note->lastmodified = time();
|
||||
$note->usermodified = $USER->id;
|
||||
if (empty($note->format)) {
|
||||
$note->format = FORMAT_PLAIN;
|
||||
$note->format = FORMAT_MOODLE;
|
||||
}
|
||||
if (empty($note->publishstate)) {
|
||||
$note->publishstate = NOTES_STATE_PUBLIC;
|
||||
|
||||
Reference in New Issue
Block a user