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;
317 $zipfile->add_file(@file_get_contents($file_path), $zip_path, $file_info['mtime']);
320 //a4a secondary files have mapping, save the ones that we want in order to add the tag in
321 $a4a_secondary_files = array();
322 foreach ($a4a_xml_array as $a4a_filename=>$a4a_filearray){
323 if (preg_match('/(.*)\sto\s(.*)/', $a4a_filename, $matches)){
324 //save the actual file name
325 $a4a_secondary_files[$matches[1]][] = $a4a_filename; //values are holders
330 * A hack to fix youtube links. one uses youtube.com?watch=xxx, the other uses youtube.com/v/xxx,
331 * in which both points to the same file, but needed different links to play.
332 * in A4a, these youtube links are always stored as "?watch=xxx", however, output.inc.php converted
333 * these to /v/xxx for rendering purposes. Convert it back if youtube exists in url.
334 * http://atutor.ca/atutor/mantis/view.php?id=4548
337 if (strpos($file, 'youtube.com')!==false){
338 //apply the conversion before linking the alternatives. Otherwise it will not be added.
339 $file = convert_youtube_playURL_to_watchURL($file);
341 // If this file has a4a alternatives, link it.
342 if (isset($a4a_xml_array[$file]) || isset($a4a_secondary_files[$file])){
343 //if this is an array, meaning that it has more than 1 alternatives, print all
344 if (substr($file, 0, 7) == 'http://' || substr($file, 0, 8) == 'https://') {
345 $name_in_file_meta = $file;
347 $name_in_file_meta = 'resources/'.$content['content_path'] . $file;
349 if (is_array($a4a_secondary_files[$file])){
350 $all_secondary_files_md = ''; //reinitialize string to null
351 foreach ($a4a_secondary_files[$file] as $v){
352 foreach($a4a_xml_array[$v] as $v2){
353 $all_secondary_files_md .= $v2; //all the meta data
356 $content_files .= str_replace( array('{FILE}', '{FILE_META_DATA}'),
357 array($name_in_file_meta, $all_secondary_files_md),
358 $ims_template_xml['file_meta']);
360 $content_files .= str_replace( array('{FILE}', '{FILE_META_DATA}'),
361 array($name_in_file_meta, $a4a_xml_array[$file]),
362 $ims_template_xml['file_meta']);
365 //if this file is in the test array, add an extra link to the direct file,
366 if (!empty($test_zipped_files) && in_array($file_path, $test_zipped_files)){
367 $content_files .= str_replace('{FILE}', $file, $ims_template_xml['file']);
369 if (preg_match('/^http[s]?\:/', $file) == 1){
371 $content_files .= str_replace('{FILE}', $file, $ims_template_xml['xml']);
373 } elseif (file_exists($file_path) && is_file($file_path)) {
374 //http://www.atutor.ca/atutor/mantis/view.php?id=4313
375 //relative link that goes beyond get.php shouldn't be added
376 //relative link that does not exist shouldn't be added.
377 $filepath_array = explode('/', $content['content_path'] . $file);
378 $new_filepath_array = array();
379 if (in_array('..', $filepath_array)){
380 while (!empty($filepath_array)){
381 $temp = array_shift($filepath_array);
383 array_pop($new_filepath_array);
385 array_push($new_filepath_array, $temp);
388 $file = implode('/', $new_filepath_array);
390 $file = $content['content_path'] . $file;
392 $content_files .= str_replace('{FILE}', $file, $ims_template_xml['file']);
396 /* check if this file is one of the test xml file, if so, we need to add the dependency
397 * Note: The file has already been added to the archieve before this is called.
399 if (preg_match('/tests\_[0-9]+\.xml$/', $file) && !in_array($file, $test_zipped_files)){
400 $content_files .= str_replace('{FILE}', 'QTI/'.$file, $ims_template_xml['xml']);
401 $test_zipped_files[] = $file;
404 /******************************
405 * http://www.atutor.ca/atutor/mantis/view.php?id=4383
409 /******************************/
410 //add it to the resources section if it hasn't been added.
411 //Weblinks have been added.
412 //Folders aren't resourecs, they shouldn't be added
413 if($content['content_type']==CONTENT_TYPE_CONTENT){
414 $resources .= str_replace( array('{CONTENT_ID}', '{PATH}', '{FILES}','{DEPENDENCY}'),
415 array($content['content_id'], $content['content_path'], $content_files, $forums_dependency),
416 $ims_template_xml['resource']);
419 for ($i=0; $i<$depth; $i++) {
423 if ( is_array($_menu[$content['content_id']]) ) {
426 $html_link = '<li>'.$html_link.'<ul>';
427 for ($i=0; $i<$depth; $i++) {
428 if ($children[$i] == 1) {
430 //$html_link = $space.$html_link;
433 //$html_link = $space.$html_link;
438 /* doesn't have children */
440 $html_link = '<li>'.$html_link.'</li>';
441 if ($counter == $num_items) {
442 for ($i=0; $i<$depth; $i++) {
443 if ($children[$i] == 1) {
445 //$html_link = $space.$html_link;
448 //$html_link = $space.$html_link;
452 for ($i=0; $i<$depth; $i++) {
454 //$html_link = $space.$html_link;
457 $title = $space.$title;
464 $string .= $html_link."\n";
467 print_organizations($content['content_id'],
476 for ($i=0; $i<$depth; $i++) {
479 //debug($_menu, $content['content_id']);
480 // if (!empty($_menu[$content['content_id']])){
481 echo $prefix.'</item>';
495 //TODO***************BOLOGNA******************REMOVE ME***************/
497 function print_resources_forum() {
499 global $forum_list, $zipfile, $resources; //$forum_list contiene tutti i forum DISTINTI associati ai contenuti. caricato in print_organizations()
501 $ims_template_xml['resource_forum'] =
503 '<resource identifier="Forum{FORUMID}_R" type="imsdt_xmlv1p0">
505 <file href="Forum{FORUMID}/FileDescriptorForum{FORUMID}.xml"/>
509 foreach ($forum_list as $f){
510 // per ogni forum associato ad uno o pi� contenuti del corso viene aggiunto un elemento resource in imsmanifest.xml
511 $resources .= str_replace("{FORUMID}", $f['id'], $ims_template_xml['resource_forum']);
513 //viene generato il file descrittore
514 //file Descrittore con la descrzione del forum
515 $fileDesDT_D = '<?xml version="1.0" encoding="UTF-8"?>
517 <dt:topic xmlns:dt="http://www.imsglobal.org/xsd/imsdt_v1p0" 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>
519 <text texttype="text/plain">{DescriptionDiscussionTopic}</text>
522 //file Descrittore senza la descrizione del forum
523 $fileDesDT = '<?xml version="1.0" encoding="UTF-8"?>
524 <dt:topic xmlns:dt="http://www.imsglobal.org/xsd/imsdt_v1p0" 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">
525 <title>{TitleDiscussionTopic}</title>
529 $f['title'] = htmlspecialchars($f['title']);
530 $f['description'] = htmlspecialchars($f['description']);
531 if (empty($f['description']))
532 $text_file_des_xml = str_replace (array('{TitleDiscussionTopic}', '{DescriptionDiscussionTopic}'), array($f['title'], $f['description']), $fileDesDT);
534 $text_file_des_xml = str_replace (array('{TitleDiscussionTopic}', '{DescriptionDiscussionTopic}'), array($f['title'], $f['description']), $fileDesDT_D);
536 $zipfile->add_file($text_file_des_xml, 'Forum'.$f['id'].'/'.'FileDescriptorForum'.$f['id'].'.xml');
538 //$zipfile->add_file(file_get_contents('../../images/home-forums_sm.png'), 'resources/home-forums_sm.png');
542 $ims_template_xml['header'] = '<?xml version="1.0" encoding="{COURSE_PRIMARY_LANGUAGE_CHARSET}"?>
543 <!--This is an ATutor IMS Common Cartridge 1.0 document-->
544 <!--Created from the ATutor Content Package Generator - http://www.atutor.ca-->
545 <manifest identifier="MANIFEST-'.md5($cid).'"
546 xmlns="http://www.imsglobal.org/xsd/imscc/imscp_v1p1"
547 xmlns:imsmd="http://ltsc.ieee.org/xsd/imscc/LOM"
548 xmlns:lomimscc="http://ltsc.ieee.org/xsd/imscc/LOM"
549 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
550 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">
552 <schema>IMS Common Cartridge</schema>
553 <schemaversion>1.0.0</schemaversion>
556 <lomimscc:identifier>
557 <lomimscc:catalog>ATutor</lomimscc:catalog>
558 <lomimscc:entry></lomimscc:entry>
559 </lomimscc:identifier>
561 <lomimscc:string language="{COURSE_PRIMARY_LANGUAGE_CODE}">{COURSE_TITLE}</lomimscc:string>
563 <lomimscc:language>en</lomimscc:language>
564 <lomimscc:description>
565 <lomimscc:string language="{COURSE_PRIMARY_LANGUAGE_CODE}">{COURSE_DESCRIPTION}</lomimscc:string>
566 </lomimscc:description>
568 <lomimscc:string language="{COURSE_PRIMARY_LANGUAGE_CODE}">{KEYWORDS}</lomimscc:string>
575 $ims_template_xml['resource'] = ' <resource identifier="MANIFEST01_RESOURCE{CONTENT_ID}" type="webcontent" href="resources/{PATH}{CONTENT_ID}.html">
577 <file href="resources/{PATH}{CONTENT_ID}.html"/>{FILES}
581 $ims_template_xml['resource_glossary'] = ' <resource identifier="MANIFEST01_RESOURCE_GLOSSARY" type="associatedcontent/imscc_xmlv1p0/learning-application-resource" href="resources/GlossaryItem/glossary.xml">
583 <file href="resources/GlossaryItem/glossary.xml"/>
586 $ims_template_xml['resource_test'] = ' <resource identifier="MANIFEST01_RESOURCE_QTI{TEST_ID}" type="imsqti_xmlv1p2/imscc_xmlv1p0/assessment">
588 <file href="QTI/{PATH}"/>{FILES}
591 $ims_template_xml['resource_weblink'] = ' <resource identifier="MANIFEST01_RESOURCE{CONTENT_ID}" type="imswl_xmlv1p0">
593 <file href="Weblinks/{PATH}"/>
596 $ims_template_xml['file'] = ' <file href="resources/{FILE}"/>'."\n";
597 $ims_template_xml['xml'] = ' <file href="{FILE}"/>'."\n";
598 $ims_template_xml['glossary'] = ' <item identifier="GlossaryItem" identifierref="MANIFEST01_RESOURCE_GLOSSARY">
599 <title>Glossary</title>
601 $ims_template_xml['test'] = ' <item identifier="QTI{TEST_ID}" identifierref="MANIFEST01_RESOURCE_QTI{TEST_ID}">
602 <title>Test {TEST_ID}</title>
604 $ims_template_xml['file_meta'] = ' <file href="{FILE}">
610 $ims_template_xml['final'] = '
612 <organization identifier="MANIFEST01_ORG1" structure="rooted-hierarchy">
613 <item identifier="resources">
623 $html_template = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
624 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
625 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{COURSE_PRIMARY_LANGUAGE_CODE}" lang="{COURSE_PRIMARY_LANGUAGE_CODE}">
627 <meta http-equiv="Content-Type" content="text/html; charset={COURSE_PRIMARY_LANGUAGE_CHARSET}" />
628 <title>{TITLE}</title>
629 <meta name="Generator" content="ATutor">
630 <meta name="Keywords" content="{KEYWORDS}">
632 <body>{CONTENT}</body>
635 $html_content_template = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
636 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
637 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{COURSE_PRIMARY_LANGUAGE_CODE}" lang="{COURSE_PRIMARY_LANGUAGE_CODE}">
639 <meta http-equiv="Content-Type" content="text/html; charset={COURSE_PRIMARY_LANGUAGE_CHARSET}" />
641 <title>{TITLE}</title>
642 <meta name="Generator" content="ATutor">
643 <meta name="Keywords" content="{KEYWORDS}">
645 <body>{CONTENT}</body>
648 $default_html_style = ' <style type="text/css">
649 body { font-family: Verdana, Arial, Helvetica, sans-serif;}
650 a.at-term { font-style: italic; }
653 //output this as header.html
654 $html_mainheader = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
655 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
656 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{COURSE_PRIMARY_LANGUAGE_CODE}" lang="{COURSE_PRIMARY_LANGUAGE_CODE}">
658 <meta http-equiv="Content-Type" content="text/html; charset={COURSE_PRIMARY_LANGUAGE_CHARSET}" />
659 <link rel="stylesheet" type="text/css" href="ims.css"/>
660 <title>{COURSE_TITLE}</title>
662 <body class="headerbody"><h3>{COURSE_TITLE}</h3></body></html>';
665 $html_toc = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
666 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
667 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{COURSE_PRIMARY_LANGUAGE_CODE}" lang="{COURSE_PRIMARY_LANGUAGE_CODE}">
669 <meta http-equiv="Content-Type" content="text/html; charset={COURSE_PRIMARY_LANGUAGE_CHARSET}" />
670 <link rel="stylesheet" type="text/css" href="ims.css" />
673 <body>{TOC}</body></html>';
676 $html_frame = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
677 "http://www.w3.org/TR/html4/frameset.dtd">
678 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{COURSE_PRIMARY_LANGUAGE_CODE}" lang="{COURSE_PRIMARY_LANGUAGE_CODE}">
679 <meta http-equiv="Content-Type" content="text/html; charset={COURSE_PRIMARY_LANGUAGE_CHARSET}" />
680 <title>{COURSE_TITLE}</title>
682 <frameset rows="50,*,50">
683 <frame src="header.html" name="header" title="header" scrolling="no">
684 <frameset cols="25%, *" frameborder="1" framespacing="3">
685 <frame frameborder="2" marginwidth="0" marginheight="0" src="toc.html" name="frame" title="TOC">
686 <frame frameborder="2" src="resources/{PATH}{FIRST_ID}.html" name="body" title="{COURSE_TITLE}">
688 <frame src="footer.html" name="footer" title="footer" scrolling="no">
690 <h1>{COURSE_TITLE}</h1>
691 <p><a href="toc.html">Table of Contents</a> | <a href="footer.html">About</a><br />
699 $glossary_xml = '<?xml version="1.0" encoding="{COURSE_PRIMARY_LANGUAGE_CHARSET}"?>
700 <!--This is an ATutor Glossary terms document-->
701 <!--Created from the ATutor Content Package Generator - http://www.atutor.ca-->
702 <glossary:glossary xmlns:glossary="http://www.atutor.ca/xsd/glossary" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
707 $glossary_term_xml = ' <item>
709 <definition>{DEFINITION}</definition>
712 $glossary_body_html = '<h2>Glossary</h2>
717 $glossary_term_html = ' <li><a name="{ENCODED_TERM}"></a><strong>{TERM}</strong><br />
718 {DEFINITION}<br /><br /></li>';