예제 #1
0
파일: PupilView.php 프로젝트: piiskop/pstk
 /**
  * This function builds the main structure in HTML.
  *
  * @access public
  * @param string $parameters['title'] the title
  * @return string the parsed HTML-structure
  * @uses ROOT_FOLDER for the path to the HTML-template file
  */
 public static function buildView($parameters)
 {
     require_once 'HTML/Template/IT.php';
     $tpl = new \HTML_Template_IT(ROOT_FOLDER);
     $tpl->loadTemplatefile('students-template.html');
     $tpl->setCurrentBlock('html');
     $tpl->setVariable(array('TITLE' => $parameters['title'], 'STUDENT-CLASS' => $parameters['student-class'], 'NO-STUDENT' => $parameters['no-student'], 'STEPS' => $parameters['steps'], 'STYLE' => \students\PupilView::buildCss(), 'JS' => \students\PupilView::buildJs(array($parameters['guess']))));
     $tpl->parse('html');
     return $tpl->get('html');
 }