Proyectos de Subversion Moodle

Rev

Rev 1 | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 1441
Línea 61... Línea 61...
61
                        array(
61
                        array(
62
                            'userid' => new external_value(PARAM_INT, 'id of the user the note is about'),
62
                            'userid' => new external_value(PARAM_INT, 'id of the user the note is about'),
63
                            'publishstate' => new external_value(PARAM_ALPHA, '\'personal\', \'course\' or \'site\''),
63
                            'publishstate' => new external_value(PARAM_ALPHA, '\'personal\', \'course\' or \'site\''),
64
                            '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)'),
64
                            '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)'),
65
                            'text' => new external_value(PARAM_RAW, 'the text of the message - text or HTML'),
65
                            'text' => new external_value(PARAM_RAW, 'the text of the message - text or HTML'),
66
                            'format' => new external_format_value('text', VALUE_DEFAULT),
66
                            'format' => new external_format_value('text', VALUE_DEFAULT, FORMAT_MOODLE),
67
                            '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),
67
                            '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),
68
                        )
68
                        )
69
                    )
69
                    )
70
                )
70
                )
71
            )
71
            )
Línea 144... Línea 144...
144
                    case 'html':
144
                    case 'html':
145
                        $textformat = FORMAT_HTML;
145
                        $textformat = FORMAT_HTML;
146
                        break;
146
                        break;
147
                    case 'text':
147
                    case 'text':
148
                        $textformat = FORMAT_PLAIN;
148
                        $textformat = FORMAT_PLAIN;
-
 
149
                        break;
149
                    default:
150
                    default:
150
                        $textformat = util::validate_format($note['format']);
151
                        $textformat = util::validate_format($note['format']);
151
                        break;
152
                        break;
152
                }
153
                }
153
                $dbnote->content = $note['text'];
154
                $dbnote->content = $note['text'];