From 14d34527819ebe94f02f978c4a438a7924a53dc5 Mon Sep 17 00:00:00 2001 From: harris wong Date: Mon, 29 Aug 2011 21:15:19 +0000 Subject: [PATCH] 4824: Footer variables are now replaced with the language bsaed on the user setting. Removed the footer.html and added that to the template instead. --- docs/mods/_core/imscp/ims_export.php | 20 +++++++++++++++--- docs/mods/_core/imscp/include/footer.html | 17 --------------- .../_core/imscp/include/ims_template.inc.php | 21 +++++++++++++++++-- 3 files changed, 36 insertions(+), 22 deletions(-) delete mode 100644 docs/mods/_core/imscp/include/footer.html diff --git a/docs/mods/_core/imscp/ims_export.php b/docs/mods/_core/imscp/ims_export.php index 5d517e70c..10cfc199c 100644 --- a/docs/mods/_core/imscp/ims_export.php +++ b/docs/mods/_core/imscp/ims_export.php @@ -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 index 7ec7e3e14..000000000 --- a/docs/mods/_core/imscp/include/footer.html +++ /dev/null @@ -1,17 +0,0 @@ - - - - - About this Content Package - - - - - - - - -
ATutor.ca - opens in a new windowFor general help with using the ATutor system see the official ATutor Handbook .
- - \ No newline at end of file diff --git a/docs/mods/_core/imscp/include/ims_template.inc.php b/docs/mods/_core/imscp/include/ims_template.inc.php index b00a21881..1a7dbe1f8 100644 --- a/docs/mods/_core/imscp/include/ims_template.inc.php +++ b/docs/mods/_core/imscp/include/ims_template.inc.php @@ -536,7 +536,24 @@ $html_frame = ' '; - +//footer +$footer_html = ' + + + + {CONTENT_PACKAGE_TITLE} + + + + + + + + +
ATutor.ca - opens in a new window{CONTENT_PACKAGE_HOW_TO}
+ +'; $glossary_xml = ' @@ -566,4 +583,4 @@ $glossary_body_html = '

Glossary

$glossary_term_html = '
  • {TERM}
    {DEFINITION}

  • '; -?> \ No newline at end of file +?> -- 2.17.1