示例#1
0
 protected function install_database()
 {
     $tables = NeechyDatabase::create_model_tables();
     AppUser::create_on_install();
     AppPage::create_on_install();
     $this->t->flash('Created database tables.', 'success');
     return $tables;
 }
示例#2
0
 /**
  * This method is invoked when the page enters 'onPreRender' stage.
  *
  * @param TEventParameter event parameter to be passed to the event handlers
  */
 public function onPreRender($param)
 {
     parent::onPreRender($param);
     if (!$this->IsCallBack) {
         $this->setPageTitle('My WBT Courses');
         $clientScript = $this->getPage()->getClientScript();
         $scormApiPath = $this->publishAsset('../App_Code/Scorm/API_1484_11.js', __CLASS__);
         $clientScript->registerScriptFile($scormApiPath, $scormApiPath);
         $this->setCourseIdsInSession();
         $this->bindUserCourseRepeater();
     }
 }
示例#3
0
 public static function reset()
 {
     # Require these here to avoid circular dependency error.
     require_once '../app/models/user.php';
     require_once '../app/models/page.php';
     self::drop_model_tables();
     self::create_model_tables();
     AppUser::create_on_install();
     AppPage::create_on_install();
 }