Ejemplo n.º 1
0
Archivo: lib.php Proyecto: rrusso/EARS
 function after_install()
 {
     $name = $this->cpsName();
     if (!($hook = CoursePrefsHook::findByUnique($name))) {
         $hook = new CoursePrefsHook($name, 'block');
     }
     try {
         $hook->save();
         $a->name = $hook->getName();
         $a->type = $hook->getType();
         mtrace(get_string('hook_install', 'block_courseprefs', $a));
     } catch (Exception $e) {
         // TODO: log it or something
     }
 }