Beispiel #1
0
 function instance_config_save($data, $pinned = false, $updaterafl = true)
 {
     global $CFG;
     // if in rafl mode then attempt to update the rafl tables
     if ($CFG->raflmodeenabled && $updaterafl) {
         $course = get_record('course', 'id', $this->instance->pageid);
         if ($course->learning_path_mode == LEARNING_PATH_MODE_RAFL) {
             // look up raflitem id
             if ($pageitem = get_record('format_page_items', 'blockinstance', $this->instance->id)) {
                 require_once $CFG->dirroot . '/mod/rafl/locallib.php';
                 $rafl = new localLibRafl();
                 $rafl->update_share_item($course->id, $pageitem->rafl_item, $data->text);
             } else {
                 error_log('no matching rafl item could be found');
             }
         }
     }
     // And now forward to the default implementation defined in the parent class
     return parent::instance_config_save($data);
 }