var $printdialogs = false;
/**
- * PHP4 style class constructor.
+ * PHP5 style class constructor.
*
* @param int $courseid
*/
- function tinymce ($courseid) {
+ function __construct($courseid) {
parent::editorObject();
$this->courseid = clean_param($courseid, PARAM_INT);
$this->printdialogs = has_capability('moodle/course:managefiles', get_context_instance(CONTEXT_COURSE, $courseid)) ? true : false;
}
- /**
- * PHP5 style class constructor.
- *
- * @param int $courseid
- */
- function __construct($courseid) {
- $this->tinymce($courseid);
- }
-
/**
* Checks configuration key validity.
* @param string $key Configuration key to check.
}
}
return false;
-
}
/**
if ( !empty($this->cfg->editorsrc) ) {
unset($this->cfg->editorsrc);
}
-
}
/**
/**
* Editor class for Moodle.
*
- * This library is made to make easier to intergrate
+ * This library is made to make easier to integrate
* WYSIWYG editors into Moodle.
*
* @author Janne Mikkonen
var $cfg;
/**
- * PHP4 style class constructor.
- *
- * @uses $CFG, $USER
+ * Constructor
*/
- function editorObject () {
+ function __construct() {
global $CFG, $USER;
$this->cfg = &$CFG;
$this->user = &$USER;
$this->courseid = NULL;
- }
-
- /**
- * PHP5 style class constructor.
- *
- */
- function __construct() {
- $this->editorObject();
- }
+ }
/**
* Method to load necessary editor codes to
return (new tinymce($courseid));
break;
}
-
}
-
}
/**
echo '</div>';
exit;
}
-
}
+
?>