2 /************************************************************************/
4 /************************************************************************/
5 /* Copyright (c) 2010 */
6 /* Inclusive Design Institute */
8 /* This program is free software. You can redistribute it and/or */
9 /* modify it under the terms of the GNU General Public License */
10 /* as published by the Free Software Foundation. */
11 /************************************************************************/
13 if (!defined('TR_INCLUDE_PATH')) { exit; }
15 // This function gets files from html tag @import
16 function get_import_files($text)
18 $text = strtolower($text);
22 while (strpos(strtolower($text), strtolower($tag)) > 0)
24 $start_pos = strpos($text, $tag);
25 if ($start_pos !== false)
27 $text = substr($text, $start_pos);
28 $start_pos = strlen($tag);
29 $len = strpos($text, ';') - strlen($tag);
31 $file = substr(trim($text), $start_pos, $len);
33 // remove these characters from file name: url, (, ), ", '
34 $file = trim(preg_replace('/(\'|\"|url|\(|\))/', '', $file));
36 // strip processed tag
37 $text = substr($text, $start_pos);
38 array_push($files, $file);
46 function print_organizations($parent_id,
53 global $html_content_template, $default_html_style, $zipfile, $resources, $ims_template_xml, $parser, $my_files;
54 global $used_glossary_terms, $course_id, $course_language_charset, $course_language_code;
55 static $paths, $zipped_files;
57 global $test_list, $test_zipped_files, $test_files, $test_xml_items, $use_a4a;
58 global $contentManager;
59 /* added by bologna*///TODO***********BOLOGNA**************REMOVE ME*****************/
60 global $db,$forum_list;//forum_list contiene tutti i forum distinti associati ai contenuti. poich� la funzione in questione � ricorsiva deve essere globale in modo che in fase di creazione dell'archivio zip i file descrittori dei forum non vengano ripetuti
62 require_once(TR_INCLUDE_PATH.'../home/classes/ContentUtility.class.php');
63 require_once(TR_INCLUDE_PATH.'classes/DAO/ContentForumsAssocDAO.class.php');
71 $top_level = $_menu[$parent_id];
72 if (!is_array($paths)) {
75 if (!is_array($zipped_files)) {
76 $zipped_files = array();
78 if ( is_array($top_level) ) {
81 $num_items = count($top_level);
83 foreach ($top_level as $garbage => $content) {
85 //XSL characters handling
86 $content['title'] = str_replace('&', '&', $content['title']);
88 if ($content['content_path'] && (substr($content['content_path'],-1)!='/')) {
89 $content['content_path'] .= '/';
94 * Reason to put it here is cause we don't want the content to be overwrittened.
96 if ($content['content_type']==CONTENT_TYPE_WEBLINK){
97 $wl = new Weblinks($content['title'], $content['text']);
98 $wlexport = new WeblinksExport($wl);
99 $wl_xml = $wlexport->export();
100 $wl_filename = 'weblinks_'.$content['content_id'].'.xml';
101 $zipfile->add_file($wl_xml , 'Weblinks/'.$wl_filename, $content['u_ts']);
102 $resources .= str_replace( array('{PATH}', '{CONTENT_ID}'),
103 array($wl_filename, $content['content_id']),
104 $ims_template_xml['resource_weblink']);
109 if ($content['content_type']==CONTENT_TYPE_FOLDER){
110 $link .= $prefix.'<item identifier="MANIFEST01_FOLDER'.$content['content_id'].'">'."\n";
111 $link .= $prefix.$space.'<title>'.$content['title'].'</title>'."\n";
113 $link .= '<item identifier="MANIFEST01_ITEM'.$content['content_id'].'" identifierref="MANIFEST01_RESOURCE'.$content['content_id'].'">'."\n";
114 $link .= $prefix.$space.'<title>'.$content['title'].'</title>'."\n$prefix$space";
116 $html_link = '<a href="resources/'.$content['content_path'].$content['content_id'].'.html" target="body">'.$content['title'].'</a>';
118 /* save the content as HTML files */
119 $content['text'] = str_replace('CONTENT_DIR/', '', $content['text']);
120 /* Commented by Cindy Qi Li on Jan 12, 2010
121 * AContent does not support glossary
122 // get all the glossary terms used
123 $terms = find_terms($content['text']);
124 if (is_array($terms)) {
125 foreach ($terms[2] as $term) {
126 $used_glossary_terms[] = $term;
130 $f_count = count($forum_list); //count all distinct forum_id associated to a content page
131 //la funzione è ricorsiva quindi lo devo ricavare attraverso la variabile globale forum_list
133 $contentForumsAssocDAO = new ContentForumsAssocDAO();
134 $forums = $contentForumsAssocDAO->getByContent($content[content_id]);
135 // $sql = "SELECT cf.forum_id, f.title, f.description FROM (SELECT * FROM ".TABLE_PREFIX."content_forums_assoc WHERE content_id=$content[content_id]) AS cf LEFT JOIN ".TABLE_PREFIX."forums f ON cf.forum_id=f.forum_id";
136 // $result_cf = mysql_query($sql,$db);
139 $forums_dependency=''; //template for associate Discussion Topic to the current content into the manifest
140 if (is_array($forums)) {
141 foreach($forums as $current_forum) {
142 for($j=0;$j<$f_count;$j++) {
143 if($forum_list[$j]['id'] == $current_forum['forum_id']) $find= true;
146 $forum_list[$f_count]['id']=$current_forum['forum_id'];
147 $forum_list[$f_count]['title']=$current_forum['title'];
148 $forum_list[$f_count]['description']=$current_forum['description'];
153 $forums_dependency .= $prefix.$space.'<dependency identifierref="Forum'.$current_forum['forum_id'].'_R" />';
156 /** Test dependency **/
157 require_once(TR_INCLUDE_PATH.'classes/DAO/ContentTestsAssocDAO.class.php');
158 $contentTestsAssocDAO = new ContentTestsAssocDAO();
160 // $sql = 'SELECT * FROM '.TABLE_PREFIX.'content_tests_assoc WHERE content_id='.$content['content_id'];
161 // $result = mysql_query($sql, $db);
162 // while ($row = mysql_fetch_assoc($result)){
163 $rows = $contentTestsAssocDAO->getByContent($content['content_id']);
164 if (is_array($rows)) {
165 //add test dependency on top of forum dependency
166 foreach ($rows as $row)
167 $forums_dependency .= $prefix.$space.'<dependency identifierref="MANIFEST01_RESOURCE_QTI'.$row['test_id'].'" />';
171 /* calculate how deep this page is: */
173 if ($content['content_path']) {
174 $depth = substr_count($content['content_path'], '/');
176 $path .= str_repeat('../', $depth);
179 $content['text'] = ContentUtility::formatContent($content['text'], $content['formatting']);
180 // add HTML header and footers to the files
181 // use default style if <style> is not in imported html head
183 if ($content['use_customized_head'])
185 if (strpos(strtolower($content['head']), '<style') > 0)
187 $head = $content['head'];
191 if (strlen($content['head']) > 0)
192 $head = $content['head'] . $default_html_style;
194 $head = $default_html_style;
198 $content['text'] = str_replace( array('{TITLE}', '{CONTENT}', '{KEYWORDS}', '{COURSE_PRIMARY_LANGUAGE_CHARSET}', '{COURSE_PRIMARY_LANGUAGE_CODE}', '{HEAD}'),
199 array($content['title'], $content['text'], $content['keywords'], $course_language_charset, $course_language_code, $head),
200 $html_content_template);
202 /* duplicate the paths in the content_path field in the zip file */
203 if ($content['content_path']) {
204 if (!in_array($content['content_path'], $paths)) {
205 $zipfile->create_dir('resources/'.$content['content_path'], time());
206 $paths[] = $content['content_path'];
209 //add the file iff it's a content file
210 if($content['content_type']==CONTENT_TYPE_CONTENT){
211 $zipfile->add_file($content['text'], 'resources/'.$content['content_path'].$content['content_id'].'.html', $content['u_ts']);
213 $content['title'] = htmlspecialchars($content['title']);
215 /* add the resource dependancies */
216 if ($my_files == null) $my_files = array();
217 $content_files = "\n";
218 $parser->parse($content['text']);
220 /* generate the IMS QTI resource and files */
221 //check if test export is allowed.
222 $content_test_rs = $contentManager->getContentTestsAssoc($content['content_id']);
223 $test_ids = array(); //reset test ids
224 //$my_files = array(); //reset myfiles.
225 if (is_array($content_test_rs)) {
226 foreach ($content_test_rs as $content_test_row){
228 $test_ids[] = $content_test_row['test_id'];
229 //the 'added_files' is for adding into the manifest file in this zip
230 $added_files = test_qti_export($content_test_row['test_id'], '', $zipfile);
231 foreach($added_files as $xml_file=>$chunk){
232 foreach ($chunk as $xml_filename){
233 $added_files_xml .= str_replace('{FILE}', 'resources/'.$xml_filename, $ims_template_xml['xml']);
236 //Save all the xml files in this array, and then print_organizations will add it to the manifest file.
237 $resources .= str_replace( array('{TEST_ID}', '{PATH}', '{FILES}'),
238 array($content_test_row['test_id'], 'tests_'.$content_test_row['test_id'].'.xml', $added_files_xml),
239 $ims_template_xml['resource_test']);
240 /* Taken out since we are gonna use dependency instead
241 $test_xml_items .= str_replace( array('{TEST_ID}'),
242 array($content_test_row['test_id']),
243 $ims_template_xml['test']);
245 foreach($test_files as $filename=>$realfilepath){
246 $zipfile->add_file(@file_get_contents($realfilepath), 'resources/'.$filename, filemtime($realfilepath));
251 /* generate the a4a files */
252 $a4a_xml_array = array();
253 //http://atutor.ca/atutor/mantis/view.php?id=4593
254 if ($content['formatting']===0){
257 if ($use_a4a == true){
258 $a4aExport = new A4aExport($content['content_id']);
259 // $a4aExport->setRelativePath('resources/'.$content['content_path']);
260 $secondary_files = $a4aExport->getAllSecondaryFiles();
261 $a4a_xml_array = $a4aExport->exportA4a();
262 $my_files = array_merge($my_files, $a4aExport->getAllSecondaryFiles());
266 $import_files = get_import_files($content['text']);
268 if (count($import_files) > 0) $my_files = array_merge($my_files, $import_files);
270 foreach ($my_files as $file) {
271 /* filter out full urls */
272 $url_parts = @parse_url($file);
273 // if (isset($url_parts['scheme'])) {
277 /* file should be relative to content. let's double check */
278 if ((substr($file, 0, 1) == '/')) {
283 if (substr($file, 0, 7) != 'http://' && substr($file, 0, 8) != 'https://') {
284 $file_path = realpath(TR_CONTENT_DIR . $course_id . '/' . $content['content_path'] . $file);
286 /* check if the path contains TR_CONTENT_DIR in it, if not, skip it, it's trying to scan through
288 if (strpos($file_path, TR_CONTENT_DIR)!==0){
292 /* check if this file exists in the content dir, if not don't include it */
293 if (file_exists($file_path) && is_file($file_path) && !in_array($file_path, $zipped_files)) {
294 $zipped_files[] = $file_path;
295 $dir = substr(dirname($file_path), strlen(TR_CONTENT_DIR . $course_id));
297 if (!in_array($dir, $paths) && $dir) {
298 $dir = str_replace('\\', '/', substr($dir, 1));
299 $zipfile->create_dir('resources/' . $dir, time());
304 $file_info = stat( $file_path );
306 //remove relative path in the content_path.
307 $filepath_array = explode('/', 'resources/' . $content['content_path'] . $file);
308 $new_filepath_array = array();
309 if (in_array('..', $filepath_array)){
310 while (!empty($filepath_array)){
311 $temp = array_shift($filepath_array);
313 array_pop($new_filepath_array);
315 array_push($new_filepath_array, $temp);
318 $zip_path = implode('/', $new_filepath_array);
320 $zip_path = 'resources/' . $content['content_path'] . $file;
323 $zipfile->add_file(@file_get_contents($file_path), $zip_path, $file_info['mtime']);
326 //a4a secondary files have mapping, save the ones that we want in order to add the tag in
327 $a4a_secondary_files = array();
328 foreach ($a4a_xml_array as $a4a_filename=>$a4a_filearray){
329 if (preg_match('/(.*)\sto\s(.*)/', $a4a_filename, $matches)){
330 //save the actual file name
331 $a4a_secondary_files[$matches[1]][] = $a4a_filename; //values are holders
336 * A hack to fix youtube links. one uses youtube.com?watch=xxx, the other uses youtube.com/v/xxx,
337 * in which both points to the same file, but needed different links to play.
338 * in A4a, these youtube links are always stored as "?watch=xxx", however, output.inc.php converted
339 * these to /v/xxx for rendering purposes. Convert it back if youtube exists in url.
340 * http://atutor.ca/atutor/mantis/view.php?id=4548
343 if (strpos($file, 'youtube.com')!==false){
344 //apply the conversion before linking the alternatives. Otherwise it will not be added.
345 $file = ContentUtility::convertYoutubePlayURLToWatchURL($file);
347 // If this file has a4a alternatives, link it.
348 if (isset($a4a_xml_array[$file]) || isset($a4a_secondary_files[$file])){
349 //if this is an array, meaning that it has more than 1 alternatives, print all
350 if (substr($file, 0, 7) == 'http://' || substr($file, 0, 8) == 'https://') {
351 $name_in_file_meta = $file;
353 $name_in_file_meta = 'resources/'.$content['content_path'] . $file;
355 if (is_array($a4a_secondary_files[$file])){
356 $all_secondary_files_md = ''; //reinitialize string to null
357 foreach ($a4a_secondary_files[$file] as $v){
358 foreach($a4a_xml_array[$v] as $v2){
359 $all_secondary_files_md .= $v2; //all the meta data
362 $content_files .= str_replace( array('{FILE}', '{FILE_META_DATA}'),
363 array($name_in_file_meta, $all_secondary_files_md),
364 $ims_template_xml['file_meta']);
366 $content_files .= str_replace( array('{FILE}', '{FILE_META_DATA}'),
367 array($name_in_file_meta, $a4a_xml_array[$file]),
368 $ims_template_xml['file_meta']);
371 //if this file is in the test array, add an extra link to the direct file,
372 if (!empty($test_zipped_files) && in_array($file_path, $test_zipped_files)){
373 $content_files .= str_replace('{FILE}', $file, $ims_template_xml['file']);
375 if (preg_match('/^http[s]?\:/', $file) == 1){
376 $content_files .= str_replace('{FILE}', $file, $ims_template_xml['xml']);
377 } elseif (file_exists($file_path) && is_file($file_path)) {
378 //http://www.atutor.ca/atutor/mantis/view.php?id=4313
379 //relative link that goes beyond get.php shouldn't be added
380 //relative link that does not exist shouldn't be added.
381 $content_files .= str_replace('{FILE}', $content['content_path'] . $file, $ims_template_xml['file']);
385 /* check if this file is one of the test xml file, if so, we need to add the dependency
386 * Note: The file has already been added to the archieve before this is called.
388 if (preg_match('/tests\_[0-9]+\.xml$/', $file) && !in_array($file, $test_zipped_files)){
389 $content_files .= str_replace('{FILE}', 'QTI/'.$file, $ims_template_xml['xml']);
390 $test_zipped_files[] = $file;
394 /******************************
395 * http://www.atutor.ca/atutor/mantis/view.php?id=4383
399 /******************************/
400 //add it to the resources section if it hasn't been added.
401 //Weblinks have been added.
402 //Folders aren't resourecs, they shouldn't be added
403 if($content['content_type']==CONTENT_TYPE_CONTENT){
404 $resources .= str_replace( array('{CONTENT_ID}', '{PATH}', '{FILES}','{DEPENDENCY}'),
405 array($content['content_id'], $content['content_path'], $content_files, $forums_dependency),
406 $ims_template_xml['resource']);
410 for ($i=0; $i<$depth; $i++) {
414 if ( is_array($_menu[$content['content_id']]) ) {
417 $html_link = '<li>'.$html_link.'<ul>';
418 for ($i=0; $i<$depth; $i++) {
419 if ($children[$i] == 1) {
421 //$html_link = $space.$html_link;
424 //$html_link = $space.$html_link;
429 /* doesn't have children */
431 $html_link = '<li>'.$html_link.'</li>';
432 if ($counter == $num_items) {
433 for ($i=0; $i<$depth; $i++) {
434 if ($children[$i] == 1) {
436 //$html_link = $space.$html_link;
439 //$html_link = $space.$html_link;
443 for ($i=0; $i<$depth; $i++) {
445 //$html_link = $space.$html_link;
448 $title = $space.$title;
455 $string .= $html_link."\n";
458 print_organizations($content['content_id'],
467 for ($i=0; $i<$depth; $i++) {
471 // if (!empty($_menu[$content['content_id']])){
472 echo $prefix.'</item>';
486 //TODO***************BOLOGNA******************REMOVE ME***************/
488 function print_resources_forum() {
490 global $forum_list, $zipfile, $resources; //$forum_list contiene tutti i forum DISTINTI associati ai contenuti. caricato in print_organizations()
492 $ims_template_xml['resource_forum'] =
494 '<resource identifier="Forum{FORUMID}_R" type="imsdt_xmlv1p0">
496 <file href="Forum{FORUMID}/FileDescriptorForum{FORUMID}.xml"/>
500 if (is_array($forum_list)) {
501 foreach ($forum_list as $f){
502 // per ogni forum associato ad uno o pi� contenuti del corso viene aggiunto un elemento resource in imsmanifest.xml
503 $resources .= str_replace("{FORUMID}", $f['id'], $ims_template_xml['resource_forum']);
505 //viene generato il file descrittore
506 //file Descrittore con la descrzione del forum
507 $fileDesDT_D = '<?xml version="1.0" encoding="UTF-8"?>
510 xmlns="http://www.imsglobal.org/xsd/imsdt_v1p0"
511 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.imsglobal.org/xsd/imsdt_v1p0 http://www.imsglobal.org/profile/cc/ccv1p0/derived_schema/domainProfile_6/imsdt_v1p0_localised.xsd">
513 <title>{TitleDiscussionTopic}</title>
515 <text texttype="text/plain">{DescriptionDiscussionTopic}</text>
519 //file Descrittore senza la descrizione del forum
520 $fileDesDT = '<?xml version="1.0" encoding="UTF-8"?>
523 xmlns="http://www.imsglobal.org/xsd/imsdt_v1p0"
524 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.imsglobal.org/xsd/imsdt_v1p0 http://www.imsglobal.org/profile/cc/ccv1p0/derived_schema/domainProfile_6/imsdt_v1p0_localised.xsd">
526 <title>{TitleDiscussionTopic}</title>
532 $f['title'] = htmlspecialchars($f['title']);
533 $f['description'] = htmlspecialchars($f['description']);
534 if (empty($f['description']))
535 $text_file_des_xml = str_replace (array('{TitleDiscussionTopic}', '{DescriptionDiscussionTopic}'), array($f['title'], $f['description']), $fileDesDT);
537 $text_file_des_xml = str_replace (array('{TitleDiscussionTopic}', '{DescriptionDiscussionTopic}'), array($f['title'], $f['description']), $fileDesDT_D);
539 $zipfile->add_file($text_file_des_xml, 'Forum'.$f['id'].'/'.'FileDescriptorForum'.$f['id'].'.xml');
542 //$zipfile->add_file(file_get_contents('../../images/home-forums_sm.png'), 'resources/home-forums_sm.png');
546 $ims_template_xml['header'] = '<?xml version="1.0" encoding="{COURSE_PRIMARY_LANGUAGE_CHARSET}"?>
547 <!--This is an AContent IMS Common Cartridge 1.0 document-->
548 <!--Created from the AContent Content Package Generator - http://www.atutor.ca-->
549 <manifest identifier="MANIFEST-'.md5($cid).'"
550 xmlns="http://www.imsglobal.org/xsd/imscc/imscp_v1p1"
551 xmlns:imsmd="http://ltsc.ieee.org/xsd/imscc/LOM"
552 xmlns:lomimscc="http://ltsc.ieee.org/xsd/imscc/LOM"
553 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
554 xsi:schemaLocation="http://www.imsglobal.org/xsd/imscc/imscp_v1p1 http://www.imsglobal.org/profile/cc/ccv1p0/derived_schema/imscp_v1p2_localised.xsd http://ltsc.ieee.org/xsd/imscc/LOM http://www.imsglobal.org/profile/cc/ccv1p0/derived_schema/domainProfile_1/lomLoose_localised.xsd" version="IMS Common Cartridge 1.0.0"> <metadata>
555 <schema>IMS Common Cartridge</schema>
556 <schemaversion>1.0.0</schemaversion>
559 <lomimscc:identifier>
560 <lomimscc:catalog>ATutor</lomimscc:catalog>
561 <lomimscc:entry></lomimscc:entry>
562 </lomimscc:identifier>
564 <lomimscc:string language="{COURSE_PRIMARY_LANGUAGE_CODE}">{COURSE_TITLE}</lomimscc:string>
566 <lomimscc:language>en</lomimscc:language>
567 <lomimscc:description>
568 <lomimscc:string language="{COURSE_PRIMARY_LANGUAGE_CODE}">{COURSE_DESCRIPTION}</lomimscc:string>
569 </lomimscc:description>
571 <lomimscc:string language="{COURSE_PRIMARY_LANGUAGE_CODE}">{KEYWORDS}</lomimscc:string>
578 $ims_template_xml['resource'] = ' <resource identifier="MANIFEST01_RESOURCE{CONTENT_ID}" type="webcontent" href="resources/{PATH}{CONTENT_ID}.html">
580 <file href="resources/{PATH}{CONTENT_ID}.html"/>{FILES}
584 $ims_template_xml['resource_glossary'] = ' <resource identifier="MANIFEST01_RESOURCE_GLOSSARY" type="associatedcontent/imscc_xmlv1p0/learning-application-resource" href="resources/GlossaryItem/glossary.xml">
586 <file href="resources/GlossaryItem/glossary.xml"/>
589 $ims_template_xml['resource_test'] = ' <resource identifier="MANIFEST01_RESOURCE_QTI{TEST_ID}" type="imsqti_xmlv1p2/imscc_xmlv1p0/assessment">
591 <file href="QTI/{PATH}"/>{FILES}
594 $ims_template_xml['resource_weblink'] = ' <resource identifier="MANIFEST01_RESOURCE{CONTENT_ID}" type="imswl_xmlv1p0">
596 <file href="Weblinks/{PATH}"/>
599 $ims_template_xml['file'] = ' <file href="resources/{FILE}"/>'."\n";
600 $ims_template_xml['xml'] = ' <file href="{FILE}"/>'."\n";
601 $ims_template_xml['glossary'] = ' <item identifier="GlossaryItem" identifierref="MANIFEST01_RESOURCE_GLOSSARY">
602 <title>Glossary</title>
604 $ims_template_xml['test'] = ' <item identifier="QTI{TEST_ID}" identifierref="MANIFEST01_RESOURCE_QTI{TEST_ID}">
605 <title>Test {TEST_ID}</title>
607 $ims_template_xml['file_meta'] = ' <file href="{FILE}">
613 $ims_template_xml['final'] = '
615 <organization identifier="MANIFEST01_ORG1" structure="rooted-hierarchy">
616 <item identifier="resources">
626 $html_template = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
627 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
628 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{COURSE_PRIMARY_LANGUAGE_CODE}" lang="{COURSE_PRIMARY_LANGUAGE_CODE}">
630 <meta http-equiv="Content-Type" content="text/html; charset={COURSE_PRIMARY_LANGUAGE_CHARSET}" />
631 <title>{TITLE}</title>
632 <meta name="Generator" content="ATutor">
633 <meta name="Keywords" content="{KEYWORDS}">
635 <body>{CONTENT}</body>
638 $html_content_template = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
639 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
640 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{COURSE_PRIMARY_LANGUAGE_CODE}" lang="{COURSE_PRIMARY_LANGUAGE_CODE}">
642 <meta http-equiv="Content-Type" content="text/html; charset={COURSE_PRIMARY_LANGUAGE_CHARSET}" />
644 <title>{TITLE}</title>
645 <meta name="Generator" content="ATutor">
646 <meta name="Keywords" content="{KEYWORDS}">
648 <body>{CONTENT}</body>
651 $default_html_style = ' <style type="text/css">
652 body { font-family: Verdana, Arial, Helvetica, sans-serif;}
653 a.at-term { font-style: italic; }
656 //output this as header.html
657 $html_mainheader = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
658 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
659 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{COURSE_PRIMARY_LANGUAGE_CODE}" lang="{COURSE_PRIMARY_LANGUAGE_CODE}">
661 <meta http-equiv="Content-Type" content="text/html; charset={COURSE_PRIMARY_LANGUAGE_CHARSET}" />
662 <link rel="stylesheet" type="text/css" href="ims.css"/>
663 <title>{COURSE_TITLE}</title>
665 <body class="headerbody"><h3>{COURSE_TITLE}</h3></body></html>';
668 $html_toc = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
669 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
670 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{COURSE_PRIMARY_LANGUAGE_CODE}" lang="{COURSE_PRIMARY_LANGUAGE_CODE}">
672 <meta http-equiv="Content-Type" content="text/html; charset={COURSE_PRIMARY_LANGUAGE_CHARSET}" />
673 <link rel="stylesheet" type="text/css" href="ims.css" />
676 <body>{TOC}</body></html>';
679 $html_frame = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
680 "http://www.w3.org/TR/html4/frameset.dtd">
681 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{COURSE_PRIMARY_LANGUAGE_CODE}" lang="{COURSE_PRIMARY_LANGUAGE_CODE}">
682 <meta http-equiv="Content-Type" content="text/html; charset={COURSE_PRIMARY_LANGUAGE_CHARSET}" />
683 <title>{COURSE_TITLE}</title>
685 <frameset rows="50,*,50">
686 <frame src="header.html" name="header" title="header" scrolling="no">
687 <frameset cols="25%, *" frameborder="1" framespacing="3">
688 <frame frameborder="2" marginwidth="0" marginheight="0" src="toc.html" name="frame" title="TOC">
689 <frame frameborder="2" src="resources/{PATH}{FIRST_ID}.html" name="body" title="{COURSE_TITLE}">
691 <frame src="footer.html" name="footer" title="footer" scrolling="no">
693 <h1>{COURSE_TITLE}</h1>
694 <p><a href="toc.html">Table of Contents</a> | <a href="footer.html">About</a><br />
702 $glossary_xml = '<?xml version="1.0" encoding="{COURSE_PRIMARY_LANGUAGE_CHARSET}"?>
703 <!--This is an ATutor Glossary terms document-->
704 <!--Created from the ATutor Content Package Generator - http://www.atutor.ca-->
705 <glossary:glossary xmlns:glossary="http://www.atutor.ca/xsd/glossary" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
710 $glossary_term_xml = ' <item>
712 <definition>{DEFINITION}</definition>
715 $glossary_body_html = '<h2>Glossary</h2>
720 $glossary_term_html = ' <li><a name="{ENCODED_TERM}"></a><strong>{TERM}</strong><br />
721 {DEFINITION}<br /><br /></li>';