diff --git a/main/exercice/export/scorm/scorm_export.php b/main/exercice/export/scorm/scorm_export.php index d82a9a06b6..b7a7279e09 100644 --- a/main/exercice/export/scorm/scorm_export.php +++ b/main/exercice/export/scorm/scorm_export.php @@ -266,8 +266,7 @@ class ScormSection * @param $exe The Exercise instance to export * @author Amand Tihon */ - function ScormSection($exe) - { + function ScormSection($exe) { $this->exercise = $exe; } @@ -278,8 +277,7 @@ class ScormSection * This opens the block, with correct attributes. * */ - function start_page() - { + function start_page() { global $charset; $head = $foot = ""; $head = '' . "\n".''."\n"; @@ -290,17 +288,17 @@ class ScormSection * End the XML flow, closing the tag. * */ - function end_page() - { + function end_page() { return ''; } + /** * Start document header */ - function start_header() - { + function start_header() { return ''. "\n"; } + /** * Print CSS inclusion */ @@ -321,28 +319,26 @@ class ScormSection /** * End document header */ - function end_header() - { + function end_header() { return ''. "\n"; } + /** * Start the itemBody * */ - function start_js() - { + function start_js() { return ' '. "\n"; } + /** * Start the itemBody * */ - function start_body() - { + function start_body() { return ''. "\n". '

'.$this->exercise->selectTitle().'

'.$this->exercise->selectDescription()."

\n". '
'."\n". @@ -527,8 +521,7 @@ class ScormSection * End the itemBody part. * */ - function end_body() - { + function end_body() { return '
'."\n".''. "\n"; } @@ -540,8 +533,7 @@ class ScormSection * @param $standalone: Boolean stating if it should be exported as a stand-alone question * @return A string, the XML flow for an Item. */ - function export() - { + function export() { global $charset; $head = ""; @@ -576,8 +568,7 @@ class ScormSection * Export the questions, as a succession of * @author Amand Tihon */ - function export_questions() - { + function export_questions() { $js = $html = ""; $js_id = 0; foreach ($this->exercise->selectQuestionList() as $q) @@ -591,9 +582,7 @@ class ScormSection } } -/*-------------------------------------------------------- - Functions - --------------------------------------------------------*/ +/* Functions */ /** * Send a complete exercise in SCORM format, from its ID @@ -602,8 +591,7 @@ class ScormSection * @param boolean $standalone Wether it should include XML tag and DTD line. * @return The XML as a string, or an empty string if there's no exercise with given ID. */ -function export_exercise($exerciseId, $standalone=true) -{ +function export_exercise($exerciseId, $standalone=true) { $exercise = new Exercise(); if (! $exercise->read($exerciseId)) { return ''; @@ -620,8 +608,7 @@ function export_exercise($exerciseId, $standalone=true) * @param bool standalone (ie including XML tag, DTD declaration, etc) * @param int The JavaScript ID for this question. Due to the nature of interactions, we must have a natural sequence for questions in the generated JavaScript. */ -function export_question($questionId, $standalone=true, $js_id) -{ +function export_question($questionId, $standalone=true, $js_id) { $question = new ScormQuestion(); $qst = $question->read($questionId); if( !$qst ) @@ -639,5 +626,4 @@ function export_question($questionId, $standalone=true, $js_id) $assessmentItem = new ScormAssessmentItem($question,$standalone); //echo "
".print_r($scorm,1)."
";exit; return $assessmentItem->export(); -} -?> +} \ No newline at end of file