tienes mucha razón david.
mira mi mod_form es el siguiente:
<?php
defined('MOODLE_INTERNAL') || die();
require_once($CFG->dirroot.'/course/moodleform_mod.php');
class mod_mensajes_mod_form extends moodleform_mod {
function definition() {
global $COURSE;
$mform =& $this->_form;
//-------------------------------------------------------------------------------
/// Adding the "general" fieldset, where all the common settings are showed
$mform->addElement('header', 'general', get_string('general', 'form'));
/// Adding the standard "name" field
$mform->addElement('text', 'name', get_string('mensajesname', 'mensajes'), array('size'=>'64'));
if (!empty($CFG->formatstringstriptags)) {
$mform->setType('name', PARAM_TEXT);
} else {
$mform->setType('name', PARAM_CLEAN);
}
$mform->addRule('name', null, 'required', null, 'client');
$mform->addRule('name', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
$mform->addHelpButton('name', 'mensajesname', 'mensajes');
//-------------------------------------------------------------------------------
/// Adding the rest of mensajes settings, spreeading all them into this fieldset
/// or adding more fieldsets ('header' elements) if needed for better logic
$mform->addElement('text', 'teacher_message', get_string('mensajesteacher','mensajes'),array('size'=>'64'));
if (!empty($CFG->formatstringstriptags)) {
$mform->setType('teacher_message', PARAM_TEXT);
} else {
$mform->setType('teacher_message', PARAM_CLEAN);
}
$mform->addRule('teacher_message', null, 'required', null, 'client');
$mform->addRule('teacher_message', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
$mform->addHelpButton('teacher_message', 'mensajesteacher', 'mensajes');
$mform->addElement('text', 'student_message', get_string('mensajesstudent','mensajes'),array('size'=>'64'));
if (!empty($CFG->formatstringstriptags)) {
$mform->setType('student_message', PARAM_TEXT);
} else {
$mform->setType('student_message', PARAM_CLEAN);
}
$mform->addRule('student_message', null, 'required', null, 'client');
$mform->addRule('student_message', get_string('maximumchars', '', 255), 'maxlength', 255, 'client');
$mform->addHelpButton('student_message', 'mensajesstudent', 'mensajes');
$mform->addElement('checkbox', 'profesor_form', 'El profesor escoge el Formulario');
//-------------------------------------------------------------------------------
// add standard elements, common to all modules
$this->standard_coursemodule_elements();
//-------------------------------------------------------------------------------
// add standard buttons, common to all modules
$this->add_action_buttons();
}
}
entonces no entiendo mucho de donde podrá venir el error, ya que anteriormente me funcionaba sin problemas
Ojalá puedan ayudarme