4824: Footer variables are now replaced with the language bsaed on the user setting...
authorharris wong <hwong@ocad.ca>
Mon, 29 Aug 2011 21:15:19 +0000 (21:15 -0000)
committerharris wong <hwong@ocad.ca>
Mon, 29 Aug 2011 21:15:19 +0000 (21:15 -0000)
docs/mods/_core/imscp/ims_export.php
docs/mods/_core/imscp/include/footer.html [deleted file]
docs/mods/_core/imscp/include/ims_template.inc.php

index 5d517e7..10cfc19 100644 (file)
@@ -330,7 +330,21 @@ $html_mainheader = str_replace(array('{COURSE_TITLE}', '{COURSE_PRIMARY_LANGUAGE
                                                           array($ims_course_title, $course_language_charset, $course_language_code),
                                                           $html_mainheader);
 
-
+$footer = str_replace( 
+    array(
+        '{COURSE_PRIMARY_LANGUAGE_CODE}',      
+        '{CONTENT_PACKAGE_TITLE}', 
+        '{COURSE_PRIMARY_LANGUAGE_CHARSET}', 
+        '{CONTENT_PACKAGE_HOW_TO}'
+    ), 
+    array(
+        $course_language_code, 
+        _AT('content_package') . ' - ' . $ims_course_title,
+        $course_language_charset,
+         _AT('general_help', AT_GUIDES_PATH.'index_list.php?lang='.$_SESSION['lang'])
+    ),
+    $footer_html
+);
 
 /* append the Organizations and Resources to the imsmanifest */
 $imsmanifest_xml .= str_replace(       array('{ORGANIZATIONS}',        '{RESOURCES}', '{COURSE_TITLE}'),
@@ -358,6 +372,7 @@ $zipfile->add_file($frame,                   'index.html');
 $zipfile->add_file($toc_html,           'toc.html');
 $zipfile->add_file($imsmanifest_xml, 'imsmanifest.xml');
 $zipfile->add_file($html_mainheader, 'header.html');
+$zipfile->add_file($footer,          'footer.html');
 if ($glossary_xml) {
        $zipfile->add_file($glossary_xml,  'glossary.xml');
        $zipfile->add_file($glossary_html, 'glossary.html');
@@ -367,7 +382,6 @@ $zipfile->add_file(file_get_contents(AT_INCLUDE_PATH.'../mods/_core/imscp/includ
 $zipfile->add_file(file_get_contents(AT_INCLUDE_PATH.'../mods/_core/imscp/include/imscp_rootv1p1p2.xsd'), 'imscp_rootv1p1p2.xsd');
 $zipfile->add_file(file_get_contents(AT_INCLUDE_PATH.'../mods/_core/imscp/include/imsmd_rootv1p2p1.xsd'), 'imsmd_rootv1p2p1.xsd');
 $zipfile->add_file(file_get_contents(AT_INCLUDE_PATH.'../mods/_core/imscp/include/ims.css'), 'ims.css');
-$zipfile->add_file(file_get_contents(AT_INCLUDE_PATH.'../mods/_core/imscp/include/footer.html'), 'footer.html');
 $zipfile->add_file(file_get_contents('../../../images/logo.gif'), 'logo.gif');
 
 $zipfile->close(); // this is optional, since send_file() closes it anyway
@@ -386,4 +400,4 @@ $ims_course_title = preg_replace("{[^a-zA-Z0-9._-]}","", trim($ims_course_title)
 $zipfile->send_file($ims_course_title . '_ims');
 
 exit;
-?>
\ No newline at end of file
+?>
diff --git a/docs/mods/_core/imscp/include/footer.html b/docs/mods/_core/imscp/include/footer.html
deleted file mode 100644 (file)
index 7ec7e3e..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
-    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-<head>
-       <link rel="stylesheet" type="text/css" href="ims.css" />
-       <title>About this Content Package</title>
-       <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
-</head>
-<body class="footerbody"> 
-<table>
-<tr>
-       <td valign="middle" align="left"><a href="http://www.atutor.ca" target="_blank"><img src="logo.gif" border="0" alt="ATutor.ca - opens in a new window" width="84" height="29" align="left" title="ATutor.ca - opens in a new window" /></a></td>
-       <td><span class="footer"><small>For general help with using the ATutor system see the official <a href="http://help.atutor.ca/" title="ATutor Handbook - opens in a new window" target="_blank">ATutor <strong>Handbook</strong> </a>.</small></span></td>
-</tr>
-</table>
-</body>
-</html>
\ No newline at end of file
index b00a218..1a7dbe1 100644 (file)
@@ -536,7 +536,24 @@ $html_frame = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
 </frameset>
 </html>';
 
-
+//footer
+$footer_html = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{COURSE_PRIMARY_LANGUAGE_CODE}" lang="{COURSE_PRIMARY_LANGUAGE_CODE}">
+<head>
+       <link rel="stylesheet" type="text/css" href="ims.css" />
+       <title>{CONTENT_PACKAGE_TITLE}</title>
+       <meta http-equiv="Content-Type" content="text/html; charset={COURSE_PRIMARY_LANGUAGE_CHARSET}" />
+</head>
+<body class="footerbody"> 
+<table>
+<tr>
+       <td valign="middle" align="left"><a href="http://www.atutor.ca" target="_blank"><img src="logo.gif" border="0" alt="ATutor.ca - opens in a new window" width="84" height="29" align="left" title="ATutor.ca - opens in a new window" /></a></td>
+       <td><span class="footer">{CONTENT_PACKAGE_HOW_TO}</span></td>
+</tr>
+</table>
+</body>
+</html>';
 
 $glossary_xml = '<?xml version="1.0" encoding="{COURSE_PRIMARY_LANGUAGE_CHARSET}"?>
 <!--This is an ATutor Glossary terms document-->
@@ -566,4 +583,4 @@ $glossary_body_html = '<h2>Glossary</h2>
 $glossary_term_html = '        <li><a name="{ENCODED_TERM}"></a><strong>{TERM}</strong><br />
                {DEFINITION}<br /><br /></li>';
 
-?>
\ No newline at end of file
+?>