[svn r20933] Added Display::display_reduced_header()

Changed exercise_show and exercice_submit to use correct HTML header (use course stylesheet instead of platform stylesheet)
skala
Yannick Warnier 17 years ago
parent a416df17c1
commit 96965deeec
  1. 29
      main/exercice/exercice_submit.php
  2. 5
      main/exercice/exercise_show.php
  3. 10
      main/inc/lib/display.lib.php

@ -1,5 +1,5 @@
<?php
// $Id: exercice_submit.php 20913 2009-05-20 16:48:25Z aportugal $
// $Id: exercice_submit.php 20933 2009-05-21 19:28:16Z yannoo $
/*
==============================================================================
@ -43,7 +43,7 @@
* @package dokeos.exercise
* @author Olivier Brouckaert
* @author Julio Montoya multiple fill in blank option added
* @version $Id: exercice_submit.php 20913 2009-05-20 16:48:25Z aportugal $
* @version $Id: exercice_submit.php 20933 2009-05-21 19:28:16Z yannoo $
*/
include ('exercise.class.php');
@ -882,32 +882,11 @@ if ($origin != 'learnpath') { //so we are not in learnpath tool
if (empty ($charset)) {
$charset = 'ISO-8859-15';
}
header('Content-Type: text/html; charset=' . $charset);
@ $document_language = Database :: get_language_isocode($language_interface);
if (empty ($document_language)) {
//if there was no valid iso-code, use the english one
$document_language = 'en';
}
echo '<div style="height:10px">&nbsp;</div>';
/*
* HTML HEADER
*/
?>
<!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="<?php echo $document_language; ?>" lang="<?php echo $document_language; ?>">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charset; ?>" />
</head>
<body>
<link rel="stylesheet" type="text/css" href="<?php echo api_get_path(WEB_CODE_PATH).'css/'.api_get_setting('stylesheets').'/frames.css'; ?>" />
<link rel="stylesheet" type="text/css" href="<?php echo api_get_path(WEB_CODE_PATH).'css/'.api_get_setting('stylesheets').'/default.css'; ?>" />
<?php
Display::display_reduced_header();
echo '<div style="height:10px">&nbsp;</div>';
}
// I'm in a preview mode

@ -4,7 +4,7 @@
*
* @package dokeos.exercise
* @author Julio Montoya Armas Added switchable fill in blank option added
* @version $Id: exercise_show.php 20843 2009-05-19 17:19:12Z cvargas1 $
* @version $Id: exercise_show.php 20933 2009-05-21 19:28:16Z yannoo $
*
* @todo remove the debug code and use the general debug library
* @todo use the Database:: functions
@ -118,6 +118,8 @@ if($origin=='user_course') {
if ($origin != 'learnpath') {
Display::display_header($nameTools,"Exercise");
} else {
Display::display_reduced_header();
}
$emailId = $_REQUEST['email'];
$user_name = $_REQUEST['user'];
@ -139,7 +141,6 @@ $id = $_REQUEST['id'];
-->
</style>
<link rel="stylesheet" type="text/css" href="<?php echo api_get_path(WEB_CODE_PATH).'css/'.api_get_setting('stylesheets').'/default.css'; ?>" />
<script language="javascript">
function showfck(sid,marksid)
{

@ -558,6 +558,16 @@ class Display {
global $menu_navigation;
include (api_get_path(INCLUDE_PATH)."header.inc.php");
}
/**
* Display the reduced page header (without banner)
*/
public function display_reduced_header()
{
global $_plugins,$lp_theme_css,$mycoursetheme,$user_theme,$platform_theme;
global $httpHeadXtra, $htmlHeadXtra, $htmlIncHeadXtra, $_course, $_user, $clarolineRepositoryWeb, $text_dir, $plugins, $_user, $rootAdminWeb, $_cid, $interbreadcrumb, $charset, $language_file, $noPHP_SELF, $language_interface;
global $menu_navigation;
include (api_get_path(INCLUDE_PATH)."reduced_header.inc.php");
}
/**
* Display the page footer
*/

Loading…
Cancel
Save