made a copy
[atutor.git] / include / ims / ims_template.inc.php
1 <?php
2 /************************************************************************/
3 /* ATutor                                                               */
4 /************************************************************************/
5 /* Copyright (c) 2002 - 2009                                            */
6 /* Adaptive Technology Resource Centre / University of Toronto          */
7 /*                                                                      */
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 /************************************************************************/
12 // $Id$
13
14 if (!defined('AT_INCLUDE_PATH')) { exit; }
15
16 // This function gets files from html tag @import
17 function get_import_files($text)
18 {
19         $text = strtolower($text);
20         $tag = '@import';
21         $files = array();
22         
23         while (strpos(strtolower($text), strtolower($tag)) > 0)
24         {
25                 $start_pos      = strpos($text, $tag);
26                 if ($start_pos !== false) 
27                 {
28                         $text = substr($text, $start_pos);
29                         $start_pos = strlen($tag);
30                         $len = strpos($text, ';') - strlen($tag);
31                         
32                         $file = substr(trim($text), $start_pos, $len);
33                         
34                         // remove these characters from file name: url, (, ), ", '
35                         $file = trim(preg_replace('/(\'|\"|url|\(|\))/', '', $file));
36                         
37                         // strip processed tag
38                         $text = substr($text, $start_pos);
39                         array_push($files, $file);
40                 }
41         
42         }
43         
44         return $files;
45 }
46         
47 function print_organizations($parent_id,
48                                                          &$_menu, 
49                                                          $depth, 
50                                                          $path='',
51                                                          $children,
52                                                          &$string) {
53         
54         global $html_content_template, $default_html_style, $zipfile, $resources, $ims_template_xml, $parser, $my_files;
55         global $used_glossary_terms, $course_id, $course_language_charset, $course_language_code;
56         static $paths, $zipped_files;
57         global $glossary;
58         global $test_zipped_files, $use_a4a, $db;
59
60         $space  = '    ';
61         $prefix = '                    ';
62
63         if ($depth == 0) {
64                 $string .= '<ul>';
65         }
66         $top_level = $_menu[$parent_id];
67         if (!is_array($paths)) {
68                 $paths = array();
69         }
70         if (!is_array($zipped_files)) {
71                 $zipped_files = array();
72         }
73         if ( is_array($top_level) ) {
74                 
75                 $counter = 1;
76                 $num_items = count($top_level);
77                
78                 foreach ($top_level as $garbage => $content) {
79                         $link = '';
80                                 
81                         if ($content['content_path']) {
82                                 $content['content_path'] .= '/';
83                         }
84                         //if this is a folder, export it without identifierref
85                         if ($content['content_type']==CONTENT_TYPE_FOLDER){
86                                 $link = $prevfix.'<item identifier="MANIFEST01_ITEM'.$content['content_id'].'">'."\n";
87                         } else {
88                                 $link = $prevfix.'<item identifier="MANIFEST01_ITEM'.$content['content_id'].'" identifierref="MANIFEST01_RESOURCE'.$content['content_id'].'" parameters="'.htmlentities($content['test_message'], ENT_QUOTES, 'UTF-8').'">'."\n";
89                         }
90                         $html_link = '<a href="resources/'.$content['content_path'].$content['content_id'].'.html" target="body">'.$content['title'].'</a>';    
91                         
92                         /* save the content as HTML files */
93                         /* @See: include/lib/format_content.inc.php */
94                         $content['text'] = str_replace('CONTENT_DIR/', '', $content['text']);
95                         /* get all the glossary terms used */
96                         $terms = find_terms($content['text']);
97                         if (is_array($terms)) {
98                                 foreach ($terms[2] as $term) {
99                                         $used_glossary_terms[] = $term;
100                                 }
101                         }
102
103                         /** Test dependency **/
104                         $test_dependency = '';  //Template for test
105                         $sql = 'SELECT * FROM '.TABLE_PREFIX.'content_tests_assoc WHERE content_id='.$content['content_id'];
106                         $result = mysql_query($sql, $db);
107                         while ($row = mysql_fetch_assoc($result)){
108                                 //add test dependency ontop to forums dependency
109                                 $test_dependency .= $prefix.$space.'<dependency identifierref="MANIFEST01_RESOURCE_QTI'.$row['test_id'].'" />';
110                         }
111
112                         /* calculate how deep this page is: */
113                         $path = '../';
114                         if ($content['content_path']) {
115                                 $depth = substr_count($content['content_path'], '/');
116
117                                 $path .= str_repeat('../', $depth);
118                         }
119                         
120                         $content['text'] = format_content($content['text'], $content['formatting'], $glossary, $path);
121
122                         /* add HTML header and footers to the files */
123                         
124                         /* use default style if <style> is not in imported html head */
125                         $head = '';
126                         if ($content['use_customized_head'])
127                         {
128                                 if (strpos(strtolower($content['head']), '<style') > 0)
129                                 {
130                                         $head = $content['head'];
131                                 }
132                                 else
133                                 {
134                                         if (strlen($content['head']) > 0)  
135                                                 $head = $content['head'] . $default_html_style;
136                                         else 
137                                                 $head = $default_html_style;
138                                 }
139                         }
140
141                         $content['text'] = str_replace( array('{TITLE}',        '{CONTENT}', '{KEYWORDS}', '{COURSE_PRIMARY_LANGUAGE_CHARSET}', '{COURSE_PRIMARY_LANGUAGE_CODE}', '{HEAD}'),
142                                                                         array($content['title'],        $content['text'], $content['keywords'], $course_language_charset, $course_language_code, $head),
143                                                                         $html_content_template);
144                                                                 
145                         /* duplicate the paths in the content_path field in the zip file */
146                         if ($content['content_path']) {
147                                 if (!in_array($content['content_path'], $paths)) {
148                                         $zipfile->create_dir('resources/'.$content['content_path'], time());
149                                         $paths[] = $content['content_path'];
150                                 }
151                         }
152
153                         $zipfile->add_file($content['text'], 'resources/'.$content['content_path'].$content['content_id'].'.html', $content['u_ts']);
154                         $content['title'] = htmlspecialchars($content['title']);
155
156                         /* add the resource dependancies */
157                         if ($my_files == null) $my_files = array();
158                         $content_files = "\n";
159                         $parser->parse($content['text']);
160
161                         /* generate the IMS QTI resource and files */
162                         global $contentManager;
163                         //check if test export is allowed.
164                         if ($contentManager->allowTestExport($content['content_id'])){
165                                 $content_test_rs = $contentManager->getContentTestsAssoc($content['content_id']);       
166                                 $test_ids = array();            //reset test ids
167                                 //$my_files = array();          //reset myfiles.
168                                 while ($content_test_row = mysql_fetch_assoc($content_test_rs)){
169                                         //export
170                                         $test_ids[] = $content_test_row['test_id'];
171                                         //the 'added_files' is for adding into the manifest file in this zip
172                                         $added_files = test_qti_export($content_test_row['test_id'], '', $zipfile);
173
174                                         //Save all the xml files in this array, and then print_organizations will add it to the manifest file.
175                                         foreach($added_files as $filename=>$file_array){
176                                                 $my_files[] = $filename;
177                                                 foreach ($file_array as $garbage=>$filename2){
178                                                         if (!in_array($filename2, $my_files)){
179                                                                 $my_files[] = $filename2;
180                                                         }
181                                                 }
182                                         }
183
184                                         //Save all the xml files in this array, and then print_organizations will add it to the manifest file.
185                                         $resources .= str_replace(      array('{TEST_ID}', '{PATH}', '{FILES}'),
186                                                                                                 array($content_test_row['test_id'], 'tests_'.$content_test_row['test_id'].'.xml', $added_files_xml),
187                                                                                                 $ims_template_xml['resource_test']); 
188                                 }
189                         }
190
191                         /* generate the a4a files */
192                         $a4a_xml_array = array();
193                         if ($use_a4a == true){
194                                 $a4aExport = new A4aExport($content['content_id']);
195 //                              $a4aExport->setRelativePath('resources/'.$content['content_path']);
196                                 $secondary_files = $a4aExport->getAllSecondaryFiles();
197                                 $a4a_xml_array = $a4aExport->exportA4a();
198                                 $my_files = array_merge($my_files, $a4aExport->getAllSecondaryFiles());
199                         }
200
201                         /* handle @import */
202                         $import_files = get_import_files($content['text']);
203
204                         if (count($import_files) > 0) $my_files = array_merge($my_files, $import_files);
205
206                         foreach ($my_files as $file) {
207                                 /* filter out full urls */
208                                 $url_parts = @parse_url($file);
209                                 if (isset($url_parts['scheme'])) {
210                                         continue;
211                                 }
212
213                                 /* file should be relative to content. let's double check */
214                                 if ((substr($file, 0, 1) == '/')) {
215                                         continue;
216                                 }
217
218                                 $file_path = realpath(AT_CONTENT_DIR . $course_id . '/' . $content['content_path'] . $file);
219
220                                 /* check if this file exists in the content dir, if not don't include it */
221                                 if (file_exists($file_path) &&  is_file($file_path) && !in_array($file_path, $zipped_files)) {
222                                         $zipped_files[] = $file_path;
223                                         $dir = substr(dirname($file_path), strlen(AT_CONTENT_DIR . $course_id));
224
225                                         if (!in_array($dir, $paths) && $dir) {
226                                                 $dir = str_replace('\\', '/', substr($dir, 1));
227                                                 $zipfile->create_dir('resources/' . $dir, time());
228                                                 
229                                                 $paths[] = $dir;
230                                         }
231
232                                         $file_info = stat( $file_path );
233
234                                         //Fixes relative paths, so folder1/folder2/../file.jpg will become just folder1/file.jpg
235                                         $file_save_path = str_replace(AT_CONTENT_DIR . $course_id . DIRECTORY_SEPARATOR, '', $file_path);
236                                         $file_save_path = str_replace('\\', '/', $file_save_path);
237
238                                         //condition checks if the file has been added, so then the test won't be added to all the subchildren
239                                         //leads to normal images not capable to be extracted.
240                                         if ( (empty($test_zipped_files) || (is_array($test_zipped_files) && !in_array($file_path, $test_zipped_files))) 
241                                                  && file_exists($file_path)){
242                                                 $zipfile->add_file(@file_get_contents($file_path), 'resources/' . $file_save_path, $file_info['mtime']);
243 //                                              $test_zipped_files[] = $content['content_path'] . $file;
244                                                 $test_zipped_files[] = $file_path;
245                                         } elseif (!is_array($test_zipped_files) && file_exists($file_path) && !in_array($file_path, $zipped_files)){
246                                                 $zipfile->add_file(@file_get_contents($file_path), 'resources/' . $file_save_path, $file_info['mtime']);
247                                         } 
248
249                                         //a4a secondary files have mapping, save the ones that we want in order to add the tag in
250                                         $a4a_secondary_files = array();
251                                         foreach ($a4a_xml_array as $a4a_filename=>$a4a_filearray){
252                                                 if (preg_match('/(.*)\sto\s(.*)/', $a4a_filename, $matches)){
253                                                         //save the actual file name
254                                                         $a4a_secondary_files[$matches[1]][] = $a4a_filename;    //values are holders
255                                                 }
256                                         }
257
258                                         // If this file has a4a alternatives, link it.
259                                         if (isset($a4a_xml_array[$file]) || isset($a4a_secondary_files[$file])){
260                                                 //if this is an array, meaning that it has more than 1 alternatives, print all
261                                                 if (is_array($a4a_secondary_files[$file])){
262                                                         $all_secondary_files_md = '';   //reinitialize string to null
263                                                         foreach ($a4a_secondary_files[$file] as $v){
264                                                                 $all_secondary_files_md .= $a4a_xml_array[$v];  //all the meta data                                                             
265                                                         }
266                                                         $content_files .= str_replace(  array('{FILE}', '{FILE_META_DATA}'), 
267                                                                                                                         array('resources/'.$file_save_path, $all_secondary_files_md), 
268                                                                                                                         $ims_template_xml['file_meta']);
269                                                 } else {        
270                                                         $content_files .= str_replace(  array('{FILE}', '{FILE_META_DATA}'), 
271                                                                                                                         array('resources/'.$file_save_path, $a4a_xml_array[$file]), 
272                                                                                                                         $ims_template_xml['file_meta']);
273                                                 }
274                                         } else {
275                                                 //if this file is in the test array, add an extra link to the direct file, 
276                                                 if (!empty($test_zipped_files) && in_array($file_path, $test_zipped_files)){
277                                                         $content_files .= str_replace('{FILE}', $file_save_path, $ims_template_xml['file']);
278                                                 } else {
279                                                         $content_files .= str_replace('{FILE}', $file_save_path, $ims_template_xml['file']);
280                                                 }
281                                         }
282                                 }
283
284                                 /* check if this file is one of the test xml file, if so, we need to add the dependency
285                                  * Note:  The file has already been added to the archieve before this is called.
286                                  */
287 /* taken out as of nov 17th, used dependency instead
288                                 if (preg_match('/tests\_[0-9]+\.xml$/', $file) && !in_array($file, $test_zipped_files)){
289                                         $content_files .= str_replace('{FILE}', $file, $ims_template_xml['xml']);
290                                         $test_zipped_files[] = $file;
291                                 }
292 */
293                         }
294
295                         /******************************/
296                         $resources .= str_replace(      array('{CONTENT_ID}', '{PATH}', '{FILES}', '{DEPENDENCY}'),
297                                                                                 array($content['content_id'], $content['content_path'], $content_files, $test_dependency),
298                                                                                 $ims_template_xml['resource']);
299
300
301                         for ($i=0; $i<$depth; $i++) {
302                                 $link .= $space;
303                         }
304                         
305                         $title = $prefix.$space.'<title>'.$content['title'].'</title>';
306
307                         if ( is_array($_menu[$content['content_id']]) ) {
308                                 /* has children */
309
310                                 $html_link = '<li>'.$html_link.'<ul>';
311                                 for ($i=0; $i<$depth; $i++) {
312                                         if ($children[$i] == 1) {
313                                                 echo $space;
314                                                 //$html_link = $space.$html_link;
315                                         } else {
316                                                 echo $space;
317                                                 //$html_link = $space.$html_link;
318                                         }
319                                 }
320
321                         } else {
322                                 /* doesn't have children */
323
324                                 $html_link = '<li>'.$html_link.'</li>';
325                                 if ($counter == $num_items) {
326                                         for ($i=0; $i<$depth; $i++) {
327                                                 if ($children[$i] == 1) {
328                                                         echo $space;
329                                                         //$html_link = $space.$html_link;
330                                                 } else {
331                                                         echo $space;
332                                                         //$html_link = $space.$html_link;
333                                                 }
334                                         }
335                                 } else {
336                                         for ($i=0; $i<$depth; $i++) {
337                                                 echo $space;
338                                                 //$html_link = $space.$html_link;
339                                         }
340                                 }
341                                 $title = $space.$title;
342                         }
343
344                         echo $prefix.$link;
345                         echo $title;
346                         echo "\n";
347
348                         $string .= $html_link."\n";
349
350                         $depth ++;
351                         print_organizations($content['content_id'],
352                                                                 $_menu, 
353                                                                 $depth, 
354                                                                 $path.$counter.'.', 
355                                                                 $children,
356                                                                 $string);
357                         $depth--;
358
359                         $counter++;
360                         for ($i=0; $i<$depth; $i++) {
361                                 echo $space;
362                         }
363                         echo $prefix.'</item>';
364                         echo "\n";
365                 }  
366
367                 $string .= '</ul>';
368                 if ($depth > 0) {
369                         $string .= '</li>';
370                 }
371
372         }
373 }
374
375 $ims_template_xml['header'] = '<?xml version="1.0" encoding="{COURSE_PRIMARY_LANGUAGE_CHARSET}"?>
376 <!--This is an ATutor SCORM 1.2 Content Package document-->
377 <!--Created from the ATutor Content Package Generator - http://www.atutor.ca-->
378 <manifest xmlns="http://www.imsproject.org/xsd/imscp_rootv1p1p2" xmlns:imsmd="http://www.imsglobal.org/xsd/imsmd_rootv1p2p1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:adlcp="http://www.adlnet.org/xsd/adlcp_rootv1p2" identifier="MANIFEST-'.md5(time()).'" 
379 xsi:schemaLocation="http://www.imsglobal.org/xsd/imscp_v1p1 http://www.imsglobal.org/xsd/imscp_v1p1p4.xsd http://www.imsglobal.org/xsd/imsmd_v1p2 http://www.imsglobal.org/xsd/imsmd_v1p2p2.xsd http://www.imsglobal.org/xsd/imsqti_item_v2p0 http://www.imsglobal.org/xsd/imsqti_item_v2p0.xsd" 
380 version = "CP 1.1.4">
381         <metadata>
382                 <schema>ADL SCORM</schema> 
383             <schemaversion>1.2</schemaversion>
384                 <imsmd:lom>
385                   <imsmd:general>
386                         <imsmd:title>
387                           <imsmd:langstring xml:lang="{COURSE_PRIMARY_LANGUAGE_CODE}">{COURSE_TITLE}</imsmd:langstring>
388                         </imsmd:title>
389                         <imsmd:description>
390                           <imsmd:langstring xml:lang="{COURSE_PRIMARY_LANGUAGE_CODE}">{COURSE_DESCRIPTION}</imsmd:langstring>
391                         </imsmd:description>
392                   </imsmd:general>
393                   <imsmd:lifecycle>
394                         <imsmd:contribute>
395                           <imsmd:role>
396                             <imsmd:source>
397                               <imsmd:langstring xml:lang="x-none">LOMv1.0</imsmd:langstring> 
398                             </imsmd:source>
399                             <imsmd:value>
400                               <imsmd:langstring xml:lang="x-none">Author</imsmd:langstring> 
401                             </imsmd:value>
402                           </imsmd:role>
403                           <imsmd:centity>
404                             <imsmd:vcard>{VCARD}</imsmd:vcard> 
405                           </imsmd:centity>
406                         </imsmd:contribute>
407                   </imsmd:lifecycle>
408                   <imsmd:educational>
409                         <imsmd:learningresourcetype>
410                           <imsmd:source>
411                                 <imsmd:langstring xml:lang="x-none">ATutor</imsmd:langstring>
412                           </imsmd:source>
413                           <imsmd:value>
414                                 <imsmd:langstring xml:lang="x-none">Content Module</imsmd:langstring>
415                           </imsmd:value>
416                         </imsmd:learningresourcetype>
417                   </imsmd:educational>
418                   <imsmd:rights>
419                   </imsmd:rights>
420                 </imsmd:lom>
421         </metadata>
422 ';
423
424 $ims_template_xml['resource'] = '               <resource identifier="MANIFEST01_RESOURCE{CONTENT_ID}" type="webcontent" href="resources/{PATH}{CONTENT_ID}.html"  adlcp:scormtype="asset">
425                         <metadata/>
426                         <file href="resources/{PATH}{CONTENT_ID}.html"/>{FILES}
427                         {DEPENDENCY}
428                 </resource>
429 '."\n";
430 $ims_template_xml['resource_test'] = '          <resource identifier="MANIFEST01_RESOURCE_QTI{TEST_ID}" type="imsqti_xmlv1p2/imscc_xmlv1p0/assessment">
431                         <metadata/>
432                         <file href="{PATH}"/>{FILES}
433                 </resource>
434 '."\n";
435
436 $ims_template_xml['file'] = '                   <file href="resources/{FILE}"/>'."\n";
437 $ims_template_xml['xml'] = '                    <file href="{FILE}"/>'."\n";
438 $ims_template_xml['file_meta'] = '                      <file href="{FILE}">
439                                 <metadata>
440                                 {FILE_META_DATA}
441                                 </metadata>
442                         </file>'."\n";
443 $ims_template_xml['final'] = '
444         <organizations default="MANIFEST01_ORG1">
445                 <organization identifier="MANIFEST01_ORG1" structure="hierarchical">
446                         <title>{COURSE_TITLE}</title>
447 {ORGANIZATIONS}
448                 </organization>
449         </organizations>
450         <resources>
451 {RESOURCES}
452         </resources>
453 </manifest>';
454
455 $html_template = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
456     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
457 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{COURSE_PRIMARY_LANGUAGE_CODE}" lang="{COURSE_PRIMARY_LANGUAGE_CODE}">
458 <head>
459         <meta http-equiv="Content-Type" content="text/html; charset={COURSE_PRIMARY_LANGUAGE_CHARSET}" />
460         <style type="text/css">
461         body { font-family: Verdana, Arial, Helvetica, sans-serif;}
462         a.at-term {     font-style: italic; }
463         </style>
464         <title>{TITLE}</title>
465         <meta name="Generator" content="ATutor">
466         <meta name="Keywords" content="{KEYWORDS}">
467 </head>
468 <body>{CONTENT}</body>
469 </html>';
470
471 $html_content_template = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
472     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
473 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{COURSE_PRIMARY_LANGUAGE_CODE}" lang="{COURSE_PRIMARY_LANGUAGE_CODE}">
474 <head>
475         <meta http-equiv="Content-Type" content="text/html; charset={COURSE_PRIMARY_LANGUAGE_CHARSET}" />
476         {HEAD}
477         <title>{TITLE}</title>
478         <meta name="Generator" content="ATutor">
479         <meta name="Keywords" content="{KEYWORDS}">
480 </head>
481 <body>{CONTENT}</body>
482 </html>';
483
484 $default_html_style = ' <style type="text/css">
485         body { font-family: Verdana, Arial, Helvetica, sans-serif;}
486         a.at-term {     font-style: italic; }
487         </style>';
488         
489 //output this as header.html
490 $html_mainheader = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
491     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
492 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{COURSE_PRIMARY_LANGUAGE_CODE}" lang="{COURSE_PRIMARY_LANGUAGE_CODE}">
493 <head>
494         <meta http-equiv="Content-Type" content="text/html; charset={COURSE_PRIMARY_LANGUAGE_CHARSET}" />
495         <link rel="stylesheet" type="text/css" href="ims.css"/>
496         <title>{COURSE_TITLE}</title>
497 </head>
498 <body class="headerbody"><h3>{COURSE_TITLE}</h3></body></html>';
499
500
501 $html_toc = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
502     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
503 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{COURSE_PRIMARY_LANGUAGE_CODE}" lang="{COURSE_PRIMARY_LANGUAGE_CODE}">
504 <head>
505         <meta http-equiv="Content-Type" content="text/html; charset={COURSE_PRIMARY_LANGUAGE_CHARSET}" />
506         <link rel="stylesheet" type="text/css" href="ims.css" />
507         <title></title>
508 </head>
509 <body>{TOC}</body></html>';
510
511 // index.html
512 $html_frame = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
513    "http://www.w3.org/TR/html4/frameset.dtd">
514 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{COURSE_PRIMARY_LANGUAGE_CODE}" lang="{COURSE_PRIMARY_LANGUAGE_CODE}">
515         <meta http-equiv="Content-Type" content="text/html; charset={COURSE_PRIMARY_LANGUAGE_CHARSET}" />
516         <title>{COURSE_TITLE}</title>
517 </head>
518 <frameset rows="50,*,50">
519 <frame src="header.html" name="header" title="header" scrolling="no">
520         <frameset cols="25%, *" frameborder="1" framespacing="3">
521                 <frame frameborder="2" marginwidth="0" marginheight="0" src="toc.html" name="frame" title="TOC">
522                 <frame frameborder="2" src="resources/{PATH}{FIRST_ID}.html" name="body" title="{COURSE_TITLE}">
523         </frameset>
524 <frame src="footer.html" name="footer" title="footer" scrolling="no">
525         <noframes>
526                 <h1>{COURSE_TITLE}</h1>
527       <p><a href="toc.html">Table of Contents</a> | <a href="footer.html">About</a><br />
528           </p>
529   </noframes>
530 </frameset>
531 </html>';
532
533
534
535 $glossary_xml = '<?xml version="1.0" encoding="{COURSE_PRIMARY_LANGUAGE_CHARSET}"?>
536 <!--This is an ATutor Glossary terms document-->
537 <!--Created from the ATutor Content Package Generator - http://www.atutor.ca-->
538
539 <!DOCTYPE glossary [
540    <!ELEMENT item (term, definition)>
541    <!ELEMENT term (#PCDATA)>
542    <!ELEMENT definition (#PCDATA)>
543 ]>
544
545 <glossary>
546       {GLOSSARY_TERMS}
547 </glossary>
548 ';
549
550 $glossary_term_xml = '  <item>
551                 <term>{TERM}</term>
552                 <definition>{DEFINITION}</definition>
553         </item>';
554
555 $glossary_body_html = '<h2>Glossary</h2>
556         <ul>
557 {BODY}
558 </ul>';
559
560 $glossary_term_html = ' <li><a name="{ENCODED_TERM}"></a><strong>{TERM}</strong><br />
561                 {DEFINITION}<br /><br /></li>';
562
563 ?>