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 /* @See: include/lib/format_content.inc.php */
120 $content['text'] = str_replace('CONTENT_DIR/', '', $content['text']);
121 /* Commented by Cindy Qi Li on Jan 12, 2010
122 * AContent does not support glossary
123 // get all the glossary terms used
124 $terms = find_terms($content['text']);
125 if (is_array($terms)) {
126 foreach ($terms[2] as $term) {
127 $used_glossary_terms[] = $term;
131 $f_count = count($forum_list); //count all distinct forum_id associated to a content page
132 //la funzione è ricorsiva quindi lo devo ricavare attraverso la variabile globale forum_list
134 $contentForumsAssocDAO = new ContentForumsAssocDAO();
135 $forums = $contentForumsAssocDAO->getByContent($content[content_id]);
136 // $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";
137 // $result_cf = mysql_query($sql,$db);
140 $forums_dependency=''; //template for associate Discussion Topic to the current content into the manifest
141 if (is_array($forums)) {
142 foreach($forums as $current_forum) {
143 for($j=0;$j<$f_count;$j++) {
144 if($forum_list[$j]['id'] == $current_forum['forum_id']) $find= true;
147 $forum_list[$f_count]['id']=$current_forum['forum_id'];
148 $forum_list[$f_count]['title']=$current_forum['title'];
149 $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 require_once(TR_INCLUDE_PATH.'classes/DAO/ContentTestsAssocDAO.class.php');
159 $contentTestsAssocDAO = new ContentTestsAssocDAO();
161 // $sql = 'SELECT * FROM '.TABLE_PREFIX.'content_tests_assoc WHERE content_id='.$content['content_id'];
162 // $result = mysql_query($sql, $db);
163 // while ($row = mysql_fetch_assoc($result)){
164 $rows = $contentTestsAssocDAO->getByContent($content['content_id']);
165 if (is_array($rows)) {
166 //add test dependency on top of forum dependency
167 foreach ($rows as $row)
168 $forums_dependency .= $prefix.$space.'<dependency identifierref="MANIFEST01_RESOURCE_QTI'.$row['test_id'].'" />';
172 /* calculate how deep this page is: */
174 if ($content['content_path']) {
175 $depth = substr_count($content['content_path'], '/');
177 $path .= str_repeat('../', $depth);
180 $content['text'] = ContentUtility::formatContent($content['text'], $content['formatting']);
181 // add HTML header and footers to the files
182 // use default style if <style> is not in imported html head
184 if ($content['use_customized_head'])
186 if (strpos(strtolower($content['head']), '<style') > 0)
188 $head = $content['head'];
192 if (strlen($content['head']) > 0)
193 $head = $content['head'] . $default_html_style;
195 $head = $default_html_style;
199 $content['text'] = str_replace( array('{TITLE}', '{CONTENT}', '{KEYWORDS}', '{COURSE_PRIMARY_LANGUAGE_CHARSET}', '{COURSE_PRIMARY_LANGUAGE_CODE}', '{HEAD}'),
200 array($content['title'], $content['text'], $content['keywords'], $course_language_charset, $course_language_code, $head),
201 $html_content_template);
203 /* duplicate the paths in the content_path field in the zip file */
204 if ($content['content_path']) {
205 if (!in_array($content['content_path'], $paths)) {
206 $zipfile->create_dir('resources/'.$content['content_path'], time());
207 $paths[] = $content['content_path'];
210 //add the file iff it's a content file
211 if($content['content_type']==CONTENT_TYPE_CONTENT){
212 $zipfile->add_file($content['text'], 'resources/'.$content['content_path'].$content['content_id'].'.html', $content['u_ts']);
214 $content['title'] = htmlspecialchars($content['title']);
216 /* add the resource dependancies */
217 if ($my_files == null) $my_files = array();
218 $content_files = "\n";
219 $parser->parse($content['text']);
221 /* generate the IMS QTI resource and files */
222 //check if test export is allowed.
223 $content_test_rs = $contentManager->getContentTestsAssoc($content['content_id']);
224 $test_ids = array(); //reset test ids
225 //$my_files = array(); //reset myfiles.
226 if (is_array($content_test_rs)) {
227 foreach ($content_test_rs as $content_test_row){
229 $test_ids[] = $content_test_row['test_id'];
230 //the 'added_files' is for adding into the manifest file in this zip
231 $added_files = test_qti_export($content_test_row['test_id'], '', $zipfile);
232 foreach($added_files as $xml_file=>$chunk){
233 foreach ($chunk as $xml_filename){
234 $added_files_xml .= str_replace('{FILE}', 'resources/'.$xml_filename, $ims_template_xml['xml']);
237 //Save all the xml files in this array, and then print_organizations will add it to the manifest file.
238 $resources .= str_replace( array('{TEST_ID}', '{PATH}', '{FILES}'),
239 array($content_test_row['test_id'], 'tests_'.$content_test_row['test_id'].'.xml', $added_files_xml),
240 $ims_template_xml['resource_test']);
241 /* Taken out since we are gonna use dependency instead
242 $test_xml_items .= str_replace( array('{TEST_ID}'),
243 array($content_test_row['test_id']),
244 $ims_template_xml['test']);
246 foreach($test_files as $filename=>$realfilepath){
247 $zipfile->add_file(@file_get_contents($realfilepath), 'resources/'.$filename, filemtime($realfilepath));
252 /* generate the a4a files */
253 $a4a_xml_array = array();
254 if ($use_a4a == true){
255 $a4aExport = new A4aExport($content['content_id']);
256 // $a4aExport->setRelativePath('resources/'.$content['content_path']);
257 $secondary_files = $a4aExport->getAllSecondaryFiles();
258 $a4a_xml_array = $a4aExport->exportA4a();
259 $my_files = array_merge($my_files, $a4aExport->getAllSecondaryFiles());
263 $import_files = get_import_files($content['text']);
265 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) == '/')) {
280 if (substr($file, 0, 7) != 'http://' && substr($file, 0, 8) != 'https://') {
281 $file_path = realpath(TR_CONTENT_DIR . $course_id . '/' . $content['content_path'] . $file);
283 /* check if the path contains TR_CONTENT_DIR in it, if not, skip it, it's trying to scan through
285 if (strpos($file_path, TR_CONTENT_DIR)!==0){
289 /* check if this file exists in the content dir, if not don't include it */
290 if (file_exists($file_path) && is_file($file_path) && !in_array($file_path, $zipped_files)) {
291 $zipped_files[] = $file_path;
292 $dir = substr(dirname($file_path), strlen(TR_CONTENT_DIR . $course_id));
294 if (!in_array($dir, $paths) && $dir) {
295 $dir = str_replace('\\', '/', substr($dir, 1));
296 $zipfile->create_dir('resources/' . $dir, time());
301 $file_info = stat( $file_path );
303 //remove relative path in the content_path.
304 $filepath_array = explode('/', 'resources/' . $content['content_path'] . $file);
305 $new_filepath_array = array();
306 if (in_array('..', $filepath_array)){
307 while (!empty($filepath_array)){
308 $temp = array_shift($filepath_array);
310 array_pop($new_filepath_array);
312 array_push($new_filepath_array, $temp);
315 $zip_path = implode('/', $new_filepath_array);
317 $zip_path = 'resources/' . $content['content_path'] . $file;
320 $zipfile->add_file(@file_get_contents($file_path), $zip_path, $file_info['mtime']);
323 //a4a secondary files have mapping, save the ones that we want in order to add the tag in
324 $a4a_secondary_files = array();
325 foreach ($a4a_xml_array as $a4a_filename=>$a4a_filearray){
326 if (preg_match('/(.*)\sto\s(.*)/', $a4a_filename, $matches)){
327 //save the actual file name
328 $a4a_secondary_files[$matches[1]][] = $a4a_filename; //values are holders
332 // If this file has a4a alternatives, link it.
333 if (isset($a4a_xml_array[$file]) || isset($a4a_secondary_files[$file])){
334 //if this is an array, meaning that it has more than 1 alternatives, print all
335 if (substr($file, 0, 7) == 'http://' || substr($file, 0, 8) == 'https://') {
336 $name_in_file_meta = $file;
338 $name_in_file_meta = 'resources/'.$content['content_path'] . $file;
340 if (is_array($a4a_secondary_files[$file])){
341 $all_secondary_files_md = ''; //reinitialize string to null
342 foreach ($a4a_secondary_files[$file] as $v){
343 foreach($a4a_xml_array[$v] as $v2){
344 $all_secondary_files_md .= $v2; //all the meta data
347 $content_files .= str_replace( array('{FILE}', '{FILE_META_DATA}'),
348 array($name_in_file_meta, $all_secondary_files_md),
349 $ims_template_xml['file_meta']);
351 $content_files .= str_replace( array('{FILE}', '{FILE_META_DATA}'),
352 array($name_in_file_meta, $a4a_xml_array[$file]),
353 $ims_template_xml['file_meta']);
356 //if this file is in the test array, add an extra link to the direct file,
357 if (!empty($test_zipped_files) && in_array($file_path, $test_zipped_files)){
358 $content_files .= str_replace('{FILE}', $file, $ims_template_xml['file']);
360 if (preg_match('/^http[s]?\:/', $file) == 1){
361 $content_files .= str_replace('{FILE}', $file, $ims_template_xml['xml']);
362 } elseif (file_exists($file_path) && is_file($file_path)) {
363 //http://www.atutor.ca/atutor/mantis/view.php?id=4313
364 //relative link that goes beyond get.php shouldn't be added
365 //relative link that does not exist shouldn't be added.
366 $content_files .= str_replace('{FILE}', $content['content_path'] . $file, $ims_template_xml['file']);
370 /* check if this file is one of the test xml file, if so, we need to add the dependency
371 * Note: The file has already been added to the archieve before this is called.
373 if (preg_match('/tests\_[0-9]+\.xml$/', $file) && !in_array($file, $test_zipped_files)){
374 $content_files .= str_replace('{FILE}', 'QTI/'.$file, $ims_template_xml['xml']);
375 $test_zipped_files[] = $file;
379 /******************************
380 * http://www.atutor.ca/atutor/mantis/view.php?id=4383
384 /******************************/
385 //add it to the resources section if it hasn't been added.
386 //Weblinks have been added.
387 //Folders aren't resourecs, they shouldn't be added
388 if($content['content_type']==CONTENT_TYPE_CONTENT){
389 $resources .= str_replace( array('{CONTENT_ID}', '{PATH}', '{FILES}','{DEPENDENCY}'),
390 array($content['content_id'], $content['content_path'], $content_files, $forums_dependency),
391 $ims_template_xml['resource']);
395 for ($i=0; $i<$depth; $i++) {
399 if ( is_array($_menu[$content['content_id']]) ) {
402 $html_link = '<li>'.$html_link.'<ul>';
403 for ($i=0; $i<$depth; $i++) {
404 if ($children[$i] == 1) {
406 //$html_link = $space.$html_link;
409 //$html_link = $space.$html_link;
414 /* doesn't have children */
416 $html_link = '<li>'.$html_link.'</li>';
417 if ($counter == $num_items) {
418 for ($i=0; $i<$depth; $i++) {
419 if ($children[$i] == 1) {
421 //$html_link = $space.$html_link;
424 //$html_link = $space.$html_link;
428 for ($i=0; $i<$depth; $i++) {
430 //$html_link = $space.$html_link;
433 $title = $space.$title;
440 $string .= $html_link."\n";
443 print_organizations($content['content_id'],
452 for ($i=0; $i<$depth; $i++) {
456 // if (!empty($_menu[$content['content_id']])){
457 echo $prefix.'</item>';
471 //TODO***************BOLOGNA******************REMOVE ME***************/
473 function print_resources_forum() {
475 global $forum_list, $zipfile, $resources; //$forum_list contiene tutti i forum DISTINTI associati ai contenuti. caricato in print_organizations()
477 $ims_template_xml['resource_forum'] =
479 '<resource identifier="Forum{FORUMID}_R" type="imsdt_xmlv1p0">
481 <file href="Forum{FORUMID}/FileDescriptorForum{FORUMID}.xml"/>
485 if (is_array($forum_list)) {
486 foreach ($forum_list as $f){
487 // per ogni forum associato ad uno o pi� contenuti del corso viene aggiunto un elemento resource in imsmanifest.xml
488 $resources .= str_replace("{FORUMID}", $f['id'], $ims_template_xml['resource_forum']);
490 //viene generato il file descrittore
491 //file Descrittore con la descrzione del forum
492 $fileDesDT_D = '<?xml version="1.0" encoding="UTF-8"?>
496 xmlns:dt="http://www.imsglobal.org/xsd/imsdt_v1p0"
498 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
500 <title>{TitleDiscussionTopic}</title>
502 <text texttype="text/plain">{DescriptionDiscussionTopic}</text>
506 //file Descrittore senza la descrizione del forum
507 $fileDesDT = '<?xml version="1.0" encoding="UTF-8"?>
511 xmlns:dt="http://www.imsglobal.org/xsd/imsdt_v1p0"
513 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
515 <title>{TitleDiscussionTopic}</title>
521 $f['title'] = htmlspecialchars($f['title']);
522 $f['description'] = htmlspecialchars($f['description']);
523 if (empty($f['description']))
524 $text_file_des_xml = str_replace (array('{TitleDiscussionTopic}', '{DescriptionDiscussionTopic}'), array($f['title'], $f['description']), $fileDesDT);
526 $text_file_des_xml = str_replace (array('{TitleDiscussionTopic}', '{DescriptionDiscussionTopic}'), array($f['title'], $f['description']), $fileDesDT_D);
528 $zipfile->add_file($text_file_des_xml, 'Forum'.$f['id'].'/'.'FileDescriptorForum'.$f['id'].'.xml');
531 //$zipfile->add_file(file_get_contents('../../images/home-forums_sm.png'), 'resources/home-forums_sm.png');
535 $ims_template_xml['header'] = '<?xml version="1.0" encoding="{COURSE_PRIMARY_LANGUAGE_CHARSET}"?>
536 <!--This is an ATutor 1.0 Common Cartridge document-->
537 <!--Created from the ATutor Content Package Generator - http://www.atutor.ca-->
538 <manifest identifier="MANIFEST-2415ad93fc44817acbe40edfd1ffb1ee" xmlns="http://www.imsglobal.org/xsd/imscc/imscp_v1p1" xmlns:imsmd="http://www.imsglobal.org/xsd/imsmd_rootv1p2p1" xmlns:lomimscc="http://ltsc.ieee.org/xsd/imscc/LOM" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:adlcp="http://www.adlnet.org/xsd/adlcp_rootv1p2" xsi:schemaLocation="http://www.imsglobal.org/xsd/imscc/imscp_v1p1 imscp_v1p2_localised.xsd http://ltsc.ieee.org/xsd/imscc/LOM domainProfile_1/lomLoose_localised.xsd">
540 <schema>IMS Common Cartridge</schema>
541 <schemaversion>1.0.0</schemaversion>
544 <lomimscc:identifier>
545 <lomimscc:catalog>ATutor</lomimscc:catalog>
546 <lomimscc:entry></lomimscc:entry>
547 </lomimscc:identifier>
549 <lomimscc:string language="{COURSE_PRIMARY_LANGUAGE_CODE}">{COURSE_TITLE}</lomimscc:string>
551 <lomimscc:language>en</lomimscc:language>
552 <lomimscc:description>
553 <lomimscc:string language="{COURSE_PRIMARY_LANGUAGE_CODE}">{COURSE_DESCRIPTION}</lomimscc:string>
554 </lomimscc:description>
556 <lomimscc:string language="{COURSE_PRIMARY_LANGUAGE_CODE}">{KEYWORDS}</lomimscc:string>
563 $ims_template_xml['resource'] = ' <resource identifier="MANIFEST01_RESOURCE{CONTENT_ID}" type="webcontent" href="resources/{PATH}{CONTENT_ID}.html">
565 <file href="resources/{PATH}{CONTENT_ID}.html"/>{FILES}
569 $ims_template_xml['resource_glossary'] = ' <resource identifier="MANIFEST01_RESOURCE_GLOSSARY" type="associatedcontent/imscc_xmlv1p0/learning-application-resource" href="resources/GlossaryItem/glossary.xml">
571 <file href="resources/GlossaryItem/glossary.xml"/>
574 $ims_template_xml['resource_test'] = ' <resource identifier="MANIFEST01_RESOURCE_QTI{TEST_ID}" type="imsqti_xmlv1p2/imscc_xmlv1p0/assessment">
576 <file href="QTI/{PATH}"/>{FILES}
579 $ims_template_xml['resource_weblink'] = ' <resource identifier="MANIFEST01_RESOURCE{CONTENT_ID}" type="imswl_xmlv1p0">
581 <file href="Weblinks/{PATH}"/>
584 $ims_template_xml['file'] = ' <file href="resources/{FILE}"/>'."\n";
585 $ims_template_xml['xml'] = ' <file href="{FILE}"/>'."\n";
586 $ims_template_xml['glossary'] = ' <item identifier="GlossaryItem" identifierref="MANIFEST01_RESOURCE_GLOSSARY">
587 <title>Glossary</title>
589 $ims_template_xml['test'] = ' <item identifier="QTI{TEST_ID}" identifierref="MANIFEST01_RESOURCE_QTI{TEST_ID}">
590 <title>Test {TEST_ID}</title>
592 $ims_template_xml['file_meta'] = ' <file href="{FILE}">
598 $ims_template_xml['final'] = '
600 <organization identifier="MANIFEST01_ORG1" structure="rooted-hierarchy">
601 <item identifier="resources">
611 $html_template = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
612 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
613 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{COURSE_PRIMARY_LANGUAGE_CODE}" lang="{COURSE_PRIMARY_LANGUAGE_CODE}">
615 <meta http-equiv="Content-Type" content="text/html; charset={COURSE_PRIMARY_LANGUAGE_CHARSET}" />
616 <title>{TITLE}</title>
617 <meta name="Generator" content="ATutor">
618 <meta name="Keywords" content="{KEYWORDS}">
620 <body>{CONTENT}</body>
623 $html_content_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}" />
629 <title>{TITLE}</title>
630 <meta name="Generator" content="ATutor">
631 <meta name="Keywords" content="{KEYWORDS}">
633 <body>{CONTENT}</body>
636 $default_html_style = ' <style type="text/css">
637 body { font-family: Verdana, Arial, Helvetica, sans-serif;}
638 a.at-term { font-style: italic; }
641 //output this as header.html
642 $html_mainheader = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
643 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
644 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{COURSE_PRIMARY_LANGUAGE_CODE}" lang="{COURSE_PRIMARY_LANGUAGE_CODE}">
646 <meta http-equiv="Content-Type" content="text/html; charset={COURSE_PRIMARY_LANGUAGE_CHARSET}" />
647 <link rel="stylesheet" type="text/css" href="ims.css"/>
648 <title>{COURSE_TITLE}</title>
650 <body class="headerbody"><h3>{COURSE_TITLE}</h3></body></html>';
653 $html_toc = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
654 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
655 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{COURSE_PRIMARY_LANGUAGE_CODE}" lang="{COURSE_PRIMARY_LANGUAGE_CODE}">
657 <meta http-equiv="Content-Type" content="text/html; charset={COURSE_PRIMARY_LANGUAGE_CHARSET}" />
658 <link rel="stylesheet" type="text/css" href="ims.css" />
661 <body>{TOC}</body></html>';
664 $html_frame = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
665 "http://www.w3.org/TR/html4/frameset.dtd">
666 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{COURSE_PRIMARY_LANGUAGE_CODE}" lang="{COURSE_PRIMARY_LANGUAGE_CODE}">
667 <meta http-equiv="Content-Type" content="text/html; charset={COURSE_PRIMARY_LANGUAGE_CHARSET}" />
668 <title>{COURSE_TITLE}</title>
670 <frameset rows="50,*,50">
671 <frame src="header.html" name="header" title="header" scrolling="no">
672 <frameset cols="25%, *" frameborder="1" framespacing="3">
673 <frame frameborder="2" marginwidth="0" marginheight="0" src="toc.html" name="frame" title="TOC">
674 <frame frameborder="2" src="resources/{PATH}{FIRST_ID}.html" name="body" title="{COURSE_TITLE}">
676 <frame src="footer.html" name="footer" title="footer" scrolling="no">
678 <h1>{COURSE_TITLE}</h1>
679 <p><a href="toc.html">Table of Contents</a> | <a href="footer.html">About</a><br />
687 $glossary_xml = '<?xml version="1.0" encoding="{COURSE_PRIMARY_LANGUAGE_CHARSET}"?>
688 <!--This is an ATutor Glossary terms document-->
689 <!--Created from the ATutor Content Package Generator - http://www.atutor.ca-->
690 <glossary:glossary xmlns:glossary="http://www.atutor.ca/xsd/glossary" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
695 $glossary_term_xml = ' <item>
697 <definition>{DEFINITION}</definition>
700 $glossary_body_html = '<h2>Glossary</h2>
705 $glossary_term_html = ' <li><a name="{ENCODED_TERM}"></a><strong>{TERM}</strong><br />
706 {DEFINITION}<br /><br /></li>';