question = $question; $this->question->setAnswer(); $this->questionIdent = 'QST_'.$question->id; } /** * Start the XML flow. * * This opens the block, with correct attributes. */ public function start_page() { $head = ''; /*if ($this->standalone) { $charset = 'UTF-8'; $head = ''; $head .= ''; }*/ return $head; } /** * End the XML flow, closing the tag. */ public function end_page() { /*if ($this->standalone) { return ''; }*/ return ''; } /** * Start document header. */ public function start_header() { /*if ($this->standalone) { return ''; }*/ return ''; } /** * Print CSS inclusion. */ public function css() { $css = ''; // if ($this->standalone) { // $css = ''."\n"; // $css .= ''; // } return $css; } /** * End document header. */ public function end_header() { // if ($this->standalone) { // return ''; // } return ''; } /** * Start the itemBody. */ public function start_js() { $js = ''; // if ($this->standalone) { // return ''; }*/ return ''; } /** * Start the itemBody. */ public function start_body() { /*if ($this->standalone) { return '
'; }*/ return ''; } /** * End the itemBody part. */ public function end_body() { /*if ($this->standalone) { return '
'; }*/ return ''; } /** * Export the question as a SCORM Item. * This is a default behaviour, some classes may want to override this. * * @return string|array a string, the XML flow for an Item */ public function export() { list($js, $html) = $this->question->export(); /*if ($this->standalone) { $res = $this->start_page() .$this->start_header() .$this->css() .$this->start_js() .$this->common_js() .$js .$this->end_js() .$this->end_header() .$this->start_body() .$html .$this->end_body() .$this->end_page(); return $res; } else { return [$js, $html]; }*/ return [$js, $html]; } }