Proyectos de Subversion Moodle

Rev

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

Rev 1 Rev 1441
Línea 560... Línea 560...
560
     *
560
     *
561
     * @param   boolean     $force      Whether to force writing to the database.
561
     * @param   boolean     $force      Whether to force writing to the database.
562
     * @return  $this
562
     * @return  $this
563
     */
563
     */
564
    public function persist($force = false) {
564
    public function persist($force = false) {
565
        global $DB;
565
        global $CFG, $DB;
-
 
566
        require_once("{$CFG->libdir}/filelib.php");
Línea 566... Línea 567...
566
 
567
 
567
        if (!$this->dirty && !$force) {
568
        if (!$this->dirty && !$force) {
568
            return $this;
569
            return $this;
Línea 717... Línea 718...
717
     * Prepare the configuration data for the moodle form.
718
     * Prepare the configuration data for the moodle form.
718
     *
719
     *
719
     * @return  object
720
     * @return  object
720
     */
721
     */
721
    public function prepare_data_for_form() {
722
    public function prepare_data_for_form() {
-
 
723
        global $CFG;
-
 
724
        require_once("{$CFG->libdir}/filelib.php");
-
 
725
 
722
        $data = $this->to_record();
726
        $data = $this->to_record();
723
        foreach (self::get_config_keys() as $key) {
727
        foreach (self::get_config_keys() as $key) {
724
            $data->$key = $this->get_config($key, configuration::get_step_default_value($key));
728
            $data->$key = $this->get_config($key, configuration::get_step_default_value($key));
725
        }
729
        }