2 /************************************************************************/
4 /************************************************************************/
5 /* Copyright (c) 2002 - 2009 */
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 /************************************************************************/
14 if (!defined('AT_INCLUDE_PATH')) { exit; }
16 // This function gets files from html tag @import
17 function get_import_files($text)
19 $text = strtolower($text);
23 while (strpos(strtolower($text), strtolower($tag)) > 0)
25 $start_pos = strpos($text, $tag);
26 if ($start_pos !== false)
28 $text = substr($text, $start_pos);
29 $start_pos = strlen($tag);
30 $len = strpos($text, ';') - strlen($tag);
32 $file = substr(trim($text), $start_pos, $len);
34 // remove these characters from file name: url, (, ), ", '
35 $file = trim(preg_replace('/(\'|\"|url|\(|\))/', '', $file));
37 // strip processed tag
38 $text = substr($text, $start_pos);
39 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 /* added by bologna*///TODO***********BOLOGNA**************REMOVE ME*****************/
59 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
67 $top_level = $_menu[$parent_id];
68 if (!is_array($paths)) {
71 if (!is_array($zipped_files)) {
72 $zipped_files = array();
74 if ( is_array($top_level) ) {
77 $num_items = count($top_level);
79 foreach ($top_level as $garbage => $content) {
81 //XSL characters handling
82 $content['title'] = str_replace('&', '&', $content['title']);
84 if ($content['content_path'] && (substr($content['content_path'],-1)!='/')) {
85 $content['content_path'] .= '/';
90 * Reason to put it here is cause we don't want the content to be overwrittened.
92 if ($content['content_type']==CONTENT_TYPE_WEBLINK){
93 $wl = new Weblinks($content['title'], $content['text']);
94 $wlexport = new WeblinksExport($wl);
95 $wl_xml = $wlexport->export();
96 $wl_filename = 'weblinks_'.$content['content_id'].'.xml';
97 $zipfile->add_file($wl_xml , 'Weblinks/'.$wl_filename, $content['u_ts']);
98 $resources .= str_replace( array('{PATH}', '{CONTENT_ID}'),
99 array($wl_filename, $content['content_id']),
100 $ims_template_xml['resource_weblink']);
105 if ($content['content_type']==CONTENT_TYPE_FOLDER){
106 $link .= $prefix.'<item identifier="MANIFEST01_FOLDER'.$content['content_id'].'">'."\n";
107 $link .= $prefix.$space.'<title>'.$content['title'].'</title>'."\n";
109 $link .= '<item identifier="MANIFEST01_ITEM'.$content['content_id'].'" identifierref="MANIFEST01_RESOURCE'.$content['content_id'].'">'."\n";
110 $link .= $prefix.$space.'<title>'.$content['title'].'</title>'."\n$prefix$space";
112 $html_link = '<a href="resources/'.$content['content_path'].$content['content_id'].'.html" target="body">'.$content['title'].'</a>';
114 /* save the content as HTML files */
115 /* @See: include/lib/format_content.inc.php */
116 $content['text'] = str_replace('CONTENT_DIR/', '', $content['text']);
117 /* get all the glossary terms used */
118 $terms = find_terms($content['text']);
119 if (is_array($terms)) {
120 foreach ($terms[2] as $term) {
121 $used_glossary_terms[] = $term;
126 //TODO**************BOLOGNA****************REMOVE ME************/
127 $f_count = count($forum_list); //count all distinct forum_id associated to a content page
128 //la funzione è ricorsiva quindi lo devo ricavare attraverso la variabile globale forum_list
130 /* TODO *************BOLOGNA*************REMOVE ME*********/
131 //recupero i forum associati al contenuto corrente
132 $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";
133 $result_cf = mysql_query($sql,$db);
134 $cf_count = mysql_num_rows($result_cf);
136 //per ogni forum ottenuto controllo se è già stato caricato nell'array
137 //necessario mantenerlo distinto poichè NON si prevedono funzioni sul
138 //controllo dei nomi nell'inserimento di file nell'archivio.
140 $forums_dependency=''; //template for associate Discussion Topic to the current content into the manifest
141 while($current_forum = mysql_fetch_assoc($result_cf)) {
142 for($j=0;$j<$f_count;$j++) {
143 if($forum_list[$j]['id'] == $current_forum['forum_id'])
148 $forum_list[$f_count]['id']=$current_forum['forum_id'];
149 $forum_list[$f_count]['title']=$current_forum['title'];
150 $forum_list[$f_count]['description']=$current_forum['description'];
154 $forums_dependency .= $prefix.$space.'<dependency identifierref="Forum'.$current_forum['forum_id'].'_R" />';
157 /** Test dependency **/
158 $sql = 'SELECT * FROM '.TABLE_PREFIX.'content_tests_assoc WHERE content_id='.$content['content_id'];
159 $result = mysql_query($sql, $db);
160 while ($row = mysql_fetch_assoc($result)){
161 //add test dependency on top of forum dependency
162 $forums_dependency .= $prefix.$space.'<dependency identifierref="MANIFEST01_RESOURCE_QTI'.$row['test_id'].'" />';
166 /* calculate how deep this page is: */
168 if ($content['content_path']) {
169 $depth = substr_count($content['content_path'], '/');
171 $path .= str_repeat('../', $depth);
173 $content['text'] = format_content($content['text'], $content['formatting'], $glossary, $path);
175 /* add HTML header and footers to the files */
177 /* use default style if <style> is not in imported html head */
179 if ($content['use_customized_head'])
181 if (strpos(strtolower($content['head']), '<style') > 0)
183 $head = $content['head'];
187 if (strlen($content['head']) > 0)
188 $head = $content['head'] . $default_html_style;
190 $head = $default_html_style;
194 $content['text'] = str_replace( array('{TITLE}', '{CONTENT}', '{KEYWORDS}', '{COURSE_PRIMARY_LANGUAGE_CHARSET}', '{COURSE_PRIMARY_LANGUAGE_CODE}', '{HEAD}'),
195 array($content['title'], $content['text'], $content['keywords'], $course_language_charset, $course_language_code, $head),
196 $html_content_template);
198 /* duplicate the paths in the content_path field in the zip file */
199 if ($content['content_path']) {
200 if (!in_array($content['content_path'], $paths)) {
201 $zipfile->create_dir('resources/'.$content['content_path'], time());
202 $paths[] = $content['content_path'];
205 //add the file iff it's a content file
206 if($content['content_type']==CONTENT_TYPE_CONTENT){
207 $zipfile->add_file($content['text'], 'resources/'.$content['content_path'].$content['content_id'].'.html', $content['u_ts']);
209 $content['title'] = htmlspecialchars($content['title']);
211 /* add the resource dependancies */
212 if ($my_files == null) $my_files = array();
213 $content_files = "\n";
214 $parser->parse($content['text']);
216 /* generate the IMS QTI resource and files */
217 global $contentManager;
218 //check if test export is allowed.
219 if ($contentManager->allowTestExport($content['content_id'])){
220 $content_test_rs = $contentManager->getContentTestsAssoc($content['content_id']);
221 $test_ids = array(); //reset test ids
222 //$my_files = array(); //reset myfiles.
223 while ($content_test_row = mysql_fetch_assoc($content_test_rs)){
225 $test_ids[] = $content_test_row['test_id'];
226 //the 'added_files' is for adding into the manifest file in this zip
227 $added_files = test_qti_export($content_test_row['test_id'], '', $zipfile);
228 foreach($added_files as $xml_file=>$chunk){
229 foreach ($chunk as $xml_filename){
230 $added_files_xml .= str_replace('{FILE}', 'resources/'.$xml_filename, $ims_template_xml['xml']);
233 //Save all the xml files in this array, and then print_organizations will add it to the manifest file.
234 $resources .= str_replace( array('{TEST_ID}', '{PATH}', '{FILES}'),
235 array($content_test_row['test_id'], 'tests_'.$content_test_row['test_id'].'.xml', $added_files_xml),
236 $ims_template_xml['resource_test']);
237 /* Taken out since we are gonna use dependency instead
238 $test_xml_items .= str_replace( array('{TEST_ID}'),
239 array($content_test_row['test_id']),
240 $ims_template_xml['test']);
242 foreach($test_files as $filename=>$realfilepath){
243 $zipfile->add_file(@file_get_contents($realfilepath), 'resources/'.$filename, filemtime($realfilepath));
248 /* generate the a4a files */
249 $a4a_xml_array = array();
250 //don't export a4a if this is in plain text, plain text has no media
251 //http://atutor.ca/atutor/mantis/view.php?id=4593
252 if ($content['formatting']===0){
255 if ($use_a4a == true){
256 $a4aExport = new A4aExport($content['content_id']);
257 // $a4aExport->setRelativePath('resources/'.$content['content_path']);
258 $secondary_files = $a4aExport->getAllSecondaryFiles();
259 $a4a_xml_array = $a4aExport->exportA4a();
260 $my_files = array_merge($my_files, $a4aExport->getAllSecondaryFiles());
264 $import_files = get_import_files($content['text']);
266 if (count($import_files) > 0) $my_files = array_merge($my_files, $import_files);
267 foreach ($my_files as $file) {
268 /* filter out full urls */
269 $url_parts = @parse_url($file);
270 // if (isset($url_parts['scheme'])) {
274 /* file should be relative to content. let's double check */
275 if ((substr($file, 0, 1) == '/')) {
279 if (substr($file, 0, 7) != 'http://' && substr($file, 0, 8) != 'https://') {
280 $file_path = realpath(AT_CONTENT_DIR . $course_id . '/' . $content['content_path'] . $file);
281 /* check if the path contains AT_CONTENT_DIR in it, if not, skip it, it's trying to scan through
283 if (strpos($file_path, AT_CONTENT_DIR)!==0){
287 /* check if this file exists in the content dir, if not don't include it */
288 if (file_exists($file_path) && is_file($file_path) && !in_array($file_path, $zipped_files)) {
289 $zipped_files[] = $file_path;
290 $dir = substr(dirname($file_path), strlen(AT_CONTENT_DIR . $course_id));
292 if (!in_array($dir, $paths) && $dir) {
293 $dir = str_replace('\\', '/', substr($dir, 1));
294 $zipfile->create_dir('resources/' . $dir, time());
299 $file_info = stat( $file_path );
301 //remove relative path in the content_path.
302 $filepath_array = explode('/', 'resources/' . $content['content_path'] . $file);
303 $new_filepath_array = array();
304 if (in_array('..', $filepath_array)){
305 while (!empty($filepath_array)){
306 $temp = array_shift($filepath_array);
308 array_pop($new_filepath_array);
310 array_push($new_filepath_array, $temp);
313 $zip_path = implode('/', $new_filepath_array);
315 $zip_path = 'resources/' . $content['content_path'] . $file;
318 $zipfile->add_file(@file_get_contents($file_path), $zip_path, $file_info['mtime']);
321 //a4a secondary files have mapping, save the ones that we want in order to add the tag in
322 $a4a_secondary_files = array();
323 foreach ($a4a_xml_array as $a4a_filename=>$a4a_filearray){
324 if (preg_match('/(.*)\sto\s(.*)/', $a4a_filename, $matches)){
325 //save the actual file name
326 $a4a_secondary_files[$matches[1]][] = $a4a_filename; //values are holders
331 * A hack to fix youtube links. one uses youtube.com?watch=xxx, the other uses youtube.com/v/xxx,
332 * in which both points to the same file, but needed different links to play.
333 * in A4a, these youtube links are always stored as "?watch=xxx", however, output.inc.php converted
334 * these to /v/xxx for rendering purposes. Convert it back if youtube exists in url.
335 * http://atutor.ca/atutor/mantis/view.php?id=4548
338 if (strpos($file, 'youtube.com')!==false){
339 //apply the conversion before linking the alternatives. Otherwise it will not be added.
340 $file = convert_youtube_playURL_to_watchURL($file);
342 // If this file has a4a alternatives, link it.
343 if (isset($a4a_xml_array[$file]) || isset($a4a_secondary_files[$file])){
344 //if this is an array, meaning that it has more than 1 alternatives, print all
345 if (substr($file, 0, 7) == 'http://' || substr($file, 0, 8) == 'https://') {
346 $name_in_file_meta = $file;
348 $name_in_file_meta = 'resources/'.$content['content_path'] . $file;
350 if (is_array($a4a_secondary_files[$file])){
351 $all_secondary_files_md = ''; //reinitialize string to null
352 foreach ($a4a_secondary_files[$file] as $v){
353 foreach($a4a_xml_array[$v] as $v2){
354 $all_secondary_files_md .= $v2; //all the meta data
357 $content_files .= str_replace( array('{FILE}', '{FILE_META_DATA}'),
358 array($name_in_file_meta, $all_secondary_files_md),
359 $ims_template_xml['file_meta']);
361 $content_files .= str_replace( array('{FILE}', '{FILE_META_DATA}'),
362 array($name_in_file_meta, $a4a_xml_array[$file]),
363 $ims_template_xml['file_meta']);
366 //if this file is in the test array, add an extra link to the direct file,
367 if (!empty($test_zipped_files) && in_array($file_path, $test_zipped_files)){
368 $content_files .= str_replace('{FILE}', $file, $ims_template_xml['file']);
370 if (preg_match('/^http[s]?\:/', $file) == 1){
371 $content_files .= str_replace('{FILE}', $file, $ims_template_xml['xml']);
372 } elseif (file_exists($file_path) && is_file($file_path)) {
373 //http://www.atutor.ca/atutor/mantis/view.php?id=4313
374 //relative link that goes beyond get.php shouldn't be added
375 //relative link that does not exist shouldn't be added.
376 $content_files .= str_replace('{FILE}', $content['content_path'] . $file, $ims_template_xml['file']);
380 /* check if this file is one of the test xml file, if so, we need to add the dependency
381 * Note: The file has already been added to the archieve before this is called.
383 if (preg_match('/tests\_[0-9]+\.xml$/', $file) && !in_array($file, $test_zipped_files)){
384 $content_files .= str_replace('{FILE}', 'QTI/'.$file, $ims_template_xml['xml']);
385 $test_zipped_files[] = $file;
388 /******************************
389 * http://www.atutor.ca/atutor/mantis/view.php?id=4383
393 /******************************/
394 //add it to the resources section if it hasn't been added.
395 //Weblinks have been added.
396 //Folders aren't resourecs, they shouldn't be added
397 if($content['content_type']==CONTENT_TYPE_CONTENT){
398 $resources .= str_replace( array('{CONTENT_ID}', '{PATH}', '{FILES}','{DEPENDENCY}'),
399 array($content['content_id'], $content['content_path'], $content_files, $forums_dependency),
400 $ims_template_xml['resource']);
403 for ($i=0; $i<$depth; $i++) {
407 if ( is_array($_menu[$content['content_id']]) ) {
410 $html_link = '<li>'.$html_link.'<ul>';
411 for ($i=0; $i<$depth; $i++) {
412 if ($children[$i] == 1) {
414 //$html_link = $space.$html_link;
417 //$html_link = $space.$html_link;
422 /* doesn't have children */
424 $html_link = '<li>'.$html_link.'</li>';
425 if ($counter == $num_items) {
426 for ($i=0; $i<$depth; $i++) {
427 if ($children[$i] == 1) {
429 //$html_link = $space.$html_link;
432 //$html_link = $space.$html_link;
436 for ($i=0; $i<$depth; $i++) {
438 //$html_link = $space.$html_link;
441 $title = $space.$title;
448 $string .= $html_link."\n";
451 print_organizations($content['content_id'],
460 for ($i=0; $i<$depth; $i++) {
463 //debug($_menu, $content['content_id']);
464 // if (!empty($_menu[$content['content_id']])){
465 echo $prefix.'</item>';
479 //TODO***************BOLOGNA******************REMOVE ME***************/
481 function print_resources_forum() {
483 global $forum_list, $zipfile, $resources; //$forum_list contiene tutti i forum DISTINTI associati ai contenuti. caricato in print_organizations()
485 $ims_template_xml['resource_forum'] =
487 '<resource identifier="Forum{FORUMID}_R" type="imsdt_xmlv1p0">
489 <file href="Forum{FORUMID}/FileDescriptorForum{FORUMID}.xml"/>
493 foreach ($forum_list as $f){
494 // per ogni forum associato ad uno o pi� contenuti del corso viene aggiunto un elemento resource in imsmanifest.xml
495 $resources .= str_replace("{FORUMID}", $f['id'], $ims_template_xml['resource_forum']);
497 //viene generato il file descrittore
498 //file Descrittore con la descrzione del forum
499 $fileDesDT_D = '<?xml version="1.0" encoding="UTF-8"?>
502 xmlns="http://www.imsglobal.org/xsd/imsdt_v1p0"
503 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">
505 <title>{TitleDiscussionTopic}</title>
507 <text texttype="text/plain">{DescriptionDiscussionTopic}</text>
511 //file Descrittore senza la descrizione del forum
512 $fileDesDT = '<?xml version="1.0" encoding="UTF-8"?>
515 xmlns="http://www.imsglobal.org/xsd/imsdt_v1p0"
516 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">
518 <title>{TitleDiscussionTopic}</title>
524 $f['title'] = htmlspecialchars($f['title']);
525 $f['description'] = htmlspecialchars($f['description']);
526 if (empty($f['description']))
527 $text_file_des_xml = str_replace (array('{TitleDiscussionTopic}', '{DescriptionDiscussionTopic}'), array($f['title'], $f['description']), $fileDesDT);
529 $text_file_des_xml = str_replace (array('{TitleDiscussionTopic}', '{DescriptionDiscussionTopic}'), array($f['title'], $f['description']), $fileDesDT_D);
531 $zipfile->add_file($text_file_des_xml, 'Forum'.$f['id'].'/'.'FileDescriptorForum'.$f['id'].'.xml');
533 //$zipfile->add_file(file_get_contents('../../images/home-forums_sm.png'), 'resources/home-forums_sm.png');
537 $ims_template_xml['header'] = '<?xml version="1.0" encoding="{COURSE_PRIMARY_LANGUAGE_CHARSET}"?>
538 <!--This is an ATutor IMS Common Cartridge 1.0 document-->
539 <!--Created from the ATutor Content Package Generator - http://www.atutor.ca-->
540 <manifest identifier="MANIFEST-'.md5($cid).'"
541 xmlns="http://www.imsglobal.org/xsd/imscc/imscp_v1p1"
542 xmlns:imsmd="http://ltsc.ieee.org/xsd/imscc/LOM"
543 xmlns:lomimscc="http://ltsc.ieee.org/xsd/imscc/LOM"
544 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
545 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">
547 <schema>IMS Common Cartridge</schema>
548 <schemaversion>1.0.0</schemaversion>
551 <lomimscc:identifier>
552 <lomimscc:catalog>ATutor</lomimscc:catalog>
553 <lomimscc:entry></lomimscc:entry>
554 </lomimscc:identifier>
556 <lomimscc:string language="{COURSE_PRIMARY_LANGUAGE_CODE}">{COURSE_TITLE}</lomimscc:string>
558 <lomimscc:language>en</lomimscc:language>
559 <lomimscc:description>
560 <lomimscc:string language="{COURSE_PRIMARY_LANGUAGE_CODE}">{COURSE_DESCRIPTION}</lomimscc:string>
561 </lomimscc:description>
563 <lomimscc:string language="{COURSE_PRIMARY_LANGUAGE_CODE}">{KEYWORDS}</lomimscc:string>
570 $ims_template_xml['resource'] = ' <resource identifier="MANIFEST01_RESOURCE{CONTENT_ID}" type="webcontent" href="resources/{PATH}{CONTENT_ID}.html">
572 <file href="resources/{PATH}{CONTENT_ID}.html"/>{FILES}
576 $ims_template_xml['resource_glossary'] = ' <resource identifier="MANIFEST01_RESOURCE_GLOSSARY" type="associatedcontent/imscc_xmlv1p0/learning-application-resource" href="resources/GlossaryItem/glossary.xml">
578 <file href="resources/GlossaryItem/glossary.xml"/>
581 $ims_template_xml['resource_test'] = ' <resource identifier="MANIFEST01_RESOURCE_QTI{TEST_ID}" type="imsqti_xmlv1p2/imscc_xmlv1p0/assessment">
583 <file href="QTI/{PATH}"/>{FILES}
586 $ims_template_xml['resource_weblink'] = ' <resource identifier="MANIFEST01_RESOURCE{CONTENT_ID}" type="imswl_xmlv1p0">
588 <file href="Weblinks/{PATH}"/>
591 $ims_template_xml['file'] = ' <file href="resources/{FILE}"/>'."\n";
592 $ims_template_xml['xml'] = ' <file href="{FILE}"/>'."\n";
593 $ims_template_xml['glossary'] = ' <item identifier="GlossaryItem" identifierref="MANIFEST01_RESOURCE_GLOSSARY">
594 <title>Glossary</title>
596 $ims_template_xml['test'] = ' <item identifier="QTI{TEST_ID}" identifierref="MANIFEST01_RESOURCE_QTI{TEST_ID}">
597 <title>Test {TEST_ID}</title>
599 $ims_template_xml['file_meta'] = ' <file href="{FILE}">
605 $ims_template_xml['final'] = '
607 <organization identifier="MANIFEST01_ORG1" structure="rooted-hierarchy">
608 <item identifier="resources">
618 $html_template = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
619 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
620 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{COURSE_PRIMARY_LANGUAGE_CODE}" lang="{COURSE_PRIMARY_LANGUAGE_CODE}">
622 <meta http-equiv="Content-Type" content="text/html; charset={COURSE_PRIMARY_LANGUAGE_CHARSET}" />
623 <title>{TITLE}</title>
624 <meta name="Generator" content="ATutor">
625 <meta name="Keywords" content="{KEYWORDS}">
627 <body>{CONTENT}</body>
630 $html_content_template = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
631 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
632 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{COURSE_PRIMARY_LANGUAGE_CODE}" lang="{COURSE_PRIMARY_LANGUAGE_CODE}">
634 <meta http-equiv="Content-Type" content="text/html; charset={COURSE_PRIMARY_LANGUAGE_CHARSET}" />
636 <title>{TITLE}</title>
637 <meta name="Generator" content="ATutor">
638 <meta name="Keywords" content="{KEYWORDS}">
640 <body>{CONTENT}</body>
643 $default_html_style = ' <style type="text/css">
644 body { font-family: Verdana, Arial, Helvetica, sans-serif;}
645 a.at-term { font-style: italic; }
648 //output this as header.html
649 $html_mainheader = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
650 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
651 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{COURSE_PRIMARY_LANGUAGE_CODE}" lang="{COURSE_PRIMARY_LANGUAGE_CODE}">
653 <meta http-equiv="Content-Type" content="text/html; charset={COURSE_PRIMARY_LANGUAGE_CHARSET}" />
654 <link rel="stylesheet" type="text/css" href="ims.css"/>
655 <title>{COURSE_TITLE}</title>
657 <body class="headerbody"><h3>{COURSE_TITLE}</h3></body></html>';
660 $html_toc = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
661 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
662 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{COURSE_PRIMARY_LANGUAGE_CODE}" lang="{COURSE_PRIMARY_LANGUAGE_CODE}">
664 <meta http-equiv="Content-Type" content="text/html; charset={COURSE_PRIMARY_LANGUAGE_CHARSET}" />
665 <link rel="stylesheet" type="text/css" href="ims.css" />
668 <body>{TOC}</body></html>';
671 $html_frame = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
672 "http://www.w3.org/TR/html4/frameset.dtd">
673 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{COURSE_PRIMARY_LANGUAGE_CODE}" lang="{COURSE_PRIMARY_LANGUAGE_CODE}">
674 <meta http-equiv="Content-Type" content="text/html; charset={COURSE_PRIMARY_LANGUAGE_CHARSET}" />
675 <title>{COURSE_TITLE}</title>
677 <frameset rows="50,*,50">
678 <frame src="header.html" name="header" title="header" scrolling="no">
679 <frameset cols="25%, *" frameborder="1" framespacing="3">
680 <frame frameborder="2" marginwidth="0" marginheight="0" src="toc.html" name="frame" title="TOC">
681 <frame frameborder="2" src="resources/{PATH}{FIRST_ID}.html" name="body" title="{COURSE_TITLE}">
683 <frame src="footer.html" name="footer" title="footer" scrolling="no">
685 <h1>{COURSE_TITLE}</h1>
686 <p><a href="toc.html">Table of Contents</a> | <a href="footer.html">About</a><br />
694 $glossary_xml = '<?xml version="1.0" encoding="{COURSE_PRIMARY_LANGUAGE_CHARSET}"?>
695 <!--This is an ATutor Glossary terms document-->
696 <!--Created from the ATutor Content Package Generator - http://www.atutor.ca-->
697 <glossary:glossary xmlns:glossary="http://www.atutor.ca/xsd/glossary" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
702 $glossary_term_xml = ' <item>
704 <definition>{DEFINITION}</definition>
707 $glossary_body_html = '<h2>Glossary</h2>
712 $glossary_term_html = ' <li><a name="{ENCODED_TERM}"></a><strong>{TERM}</strong><br />
713 {DEFINITION}<br /><br /></li>';