Error al crear una nueva actividad

Error al crear una nueva actividad

de Francisco Parra -
Número de respuestas: 2

Hola de nuevo:

resulta que al realizar una modificación al módulo de actividad que estoy creando me aparece el siguiente error

Notice: Undefined property: stdClass::$introeditor in /var/www/moodle/course/modedit.php on line 404

 

la verdad no se a que se pueda deber.

Estoy utilizando moodle 2.0 y esto me tiene un poco estancado... ojalá puedan ayudarme... intenté volver al punto anterior de esto, pero me sigue dando el erorr

 

Saludos y espero sus comentarios

Promedio de valoraciones: -
En respuesta a Francisco Parra

Re: Error al crear una nueva actividad

de David Hernández -

Hola Francisco,

Si no pones código, es muy difícil saber qué pasa.

Yo he visto que el error puede deberse a que algo no está definido,

En este sentido, quizá debas determinar en tu código si $introeditor existe o no (Ej. con "if" e "isset").

Pero sin código, sólo los iluminados... guiño

Saludos

En respuesta a David Hernández

Re: Error al crear una nueva actividad

de Francisco Parra -

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