Skip to content

Commit

Permalink
remove unnecessary config file inclusions; reindent etc (merge of cha…
Browse files Browse the repository at this point in the history
…nges in trunk)

git-svn-id: https://xerteonlinetoolkits.googlecode.com/svn/branches/1.8@192 912cdd6b-5c7d-d5a7-a2ba-d0f0cdb91641
  • Loading branch information
Dave Goodwin committed Oct 25, 2011
1 parent ccaa387 commit dedcfa7
Show file tree
Hide file tree
Showing 3 changed files with 173 additions and 177 deletions.
79 changes: 40 additions & 39 deletions modules/xerte/module_functions.php
@@ -1,53 +1,54 @@
<?PHP /**
*
* module functions page, shared functions for this module
*
* @author Patrick Lockley
* @version 1.0
* @copyright Copyright (c) 2008,2009 University of Nottingham
* @package
*/
<?php
/**
*
* module functions page, shared functions for this module
*
* @author Patrick Lockley
* @version 1.0
* @copyright Copyright (c) 2008,2009 University of Nottingham
* @package
*/

require_once(dirname(__FILE__) . '/../../config.php');

/**
*
* Function dont_show_template
* This function outputs the HTML for people have no rights to this template
* @version 1.0
* @author Patrick Lockley
*/
*
* Function dont_show_template
* This function outputs the HTML for people have no rights to this template
* @version 1.0
* @author Patrick Lockley
*/

function dont_show_template(){

require("config.php");

_load_language_file("/modules/xerte/module_functions.inc");

?><!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">
<head>
<script src="modules/Xerte/javascript/swfobject.js"></script>
<script src="website_code/scripts/opencloseedit.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="website_code/styles/frontpage.css" media="screen" type="text/css" rel="stylesheet" />
</head>
_load_language_file("/modules/xerte/module_functions.inc");

?><!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">
<head>
<script src="modules/Xerte/javascript/swfobject.js"></script>
<script src="website_code/scripts/opencloseedit.js"></script>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="website_code/styles/frontpage.css" media="screen" type="text/css" rel="stylesheet" />
</head>

<body>

<body>
<div style="margin:0 auto; width:800px">
<div class="edit_topbar" style="width:800px">
<img src="website_code/images/edit_xerteLogo.jpg" style="margin-left:10px; float:left" />
<img src="website_code/images/edit_UofNLogo.jpg" style="margin-right:10px; float:right" />
</div>
<div style="margin:0 auto">
<?PHP

<div style="margin:0 auto; width:800px">
<div class="edit_topbar" style="width:800px">
<img src="website_code/images/edit_xerteLogo.jpg" style="margin-left:10px; float:left" />
<img src="website_code/images/edit_UofNLogo.jpg" style="margin-right:10px; float:right" />
</div>
<div style="margin:0 auto">
<?PHP
echo XERTE_DISPLAY_FAIL;

echo XERTE_DISPLAY_FAIL;

?></div></div></body></html><?PHP
?></div></div></body></html><?PHP

die();
die();

}

?>
?>
108 changes: 53 additions & 55 deletions modules/xerte/peer.php
@@ -1,72 +1,70 @@
<?PHP /**
*
* peer page, allows the site to make a peer review page for a xerte module
*
* @author Patrick Lockley
* @version 1.0
* @copyright Copyright (c) 2008,2009 University of Nottingham
* @package
*/
<?php
/**
*
* peer page, allows the site to make a peer review page for a xerte module
*
* @author Patrick Lockley
* @version 1.0
* @copyright Copyright (c) 2008,2009 University of Nottingham
* @package
*/

/**
*
* Function show template
* This function creates folders needed when creating a template
* @param array $row_play - an array from the last mysql query
* @version 1.0
* @author Patrick Lockley
*/
*
* Function show template
* This function creates folders needed when creating a template
* @param array $row_play - an array from the last mysql query
* @version 1.0
* @author Patrick Lockley
*/

function show_template($row_play){
global $xerte_toolkits_site;

require("config.php");
_load_language_file("/modules/xerte/peer.inc");

_load_language_file("/modules/xerte/peer.inc");
$string_for_flash_xml = $xerte_toolkits_site->users_file_area_short . $row_play['template_id'] . "-" . $row_play['username'] . "-" . $row_play['template_name'] . "/data.xml";

$string_for_flash_xml = $xerte_toolkits_site->users_file_area_short . $row_play['template_id'] . "-" . $row_play['username'] . "-" . $row_play['template_name'] . "/data.xml";
$string_for_flash = $xerte_toolkits_site->users_file_area_short . $row_play['template_id'] . "-" . $row_play['username'] . "-" . $row_play['template_name'] . "/";

$string_for_flash = $xerte_toolkits_site->users_file_area_short . $row_play['template_id'] . "-" . $row_play['username'] . "-" . $row_play['template_name'] . "/";
list($x, $y) = explode("~",get_template_screen_size($row_play['template_name'],$row_play['template_framework']));

list($x, $y) = explode("~",get_template_screen_size($row_play['template_name'],$row_play['template_framework']));
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html lang="en">
<head>
<title>Interactive Learning Content</title>
<script src = "rloObject.js"></script>
<script type="text/javascript" language="Javascript" src="website_code/scripts/peer.js"></script>
<script type="text/javascript" language="Javascript" src="website_code/scripts/ajax_management.js"></script>
<script type="text/javascript">
function enableTTS(){
if (navigator.appName.indexOf("Microsoft") != -1){
VoiceObj = new ActiveXObject("Sapi.SpVoice");
}
}
</script>
</head>
<body style="#ffffff; font-family:verdana,tahoma,arial; font-size:80%;">
<div style="width:900px; margin:0 auto;">
<p style="margin 0px; padding:0px">
<b><?PHP echo XERTE_PEER_DESCRIPTION; ?></b><br><?PHP echo XERTE_PEER_GUIDANCE;?>
</p>
<script type="text/javascript" language="JavaScript">

?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html lang="en">
<head>
<title>Interactive Learning Content</title>
<script src = "rloObject.js"></script>
<script type="text/javascript" language="Javascript" src="website_code/scripts/peer.js"></script>
<script type="text/javascript" language="Javascript" src="website_code/scripts/ajax_management.js"></script>
<script type="text/javascript">
function enableTTS(){
if (navigator.appName.indexOf("Microsoft") != -1){
VoiceObj = new ActiveXObject("Sapi.SpVoice");
}
}
</script>
</head>
<body style="#ffffff; font-family:verdana,tahoma,arial; font-size:80%;">
<div style="width:900px; margin:0 auto;">
<p style="margin 0px; padding:0px">
<b><?PHP echo XERTE_PEER_DESCRIPTION; ?></b><br><?PHP echo XERTE_PEER_GUIDANCE;?>
</p>
<script type="text/javascript" language="JavaScript">

<?PHP
<?PHP

/*
* slightly modified xerte preview code to allow for flash vars
*/
/*
* slightly modified xerte preview code to allow for flash vars
*/

echo "myRLO = new rloObject('" . $x . "','" . $y . "','modules/" . $row_play['template_framework'] . "/parent_templates/" . $row_play['template_name'] . "/" . $row_play['template_name'] . ".rlt','$string_for_flash', '$string_for_flash_xml', '$xerte_toolkits_site->site_url')";
echo "myRLO = new rloObject('" . $x . "','" . $y . "','modules/" . $row_play['template_framework'] . "/parent_templates/" . $row_play['template_name'] . "/" . $row_play['template_name'] . ".rlt','$string_for_flash', '$string_for_flash_xml', '$xerte_toolkits_site->site_url')";

echo "</script>";

echo "<a name=\"feedbackform\"><p style=\"width:250px; color:red;\" id=\"feedback\"></p></a>";
echo "</script>";

echo "<br><form name=\"peer\" action=\"javascript:send_review('" . $row_play['username'] . "','" . $row_play['template_id'] . "')\" method=\"post\" enctype=\"text/plain\"><textarea style=\"width:800px; height:300px;\" name=\"response\">You have been asked to provide some feedback on this learning object. Please enter your feedback and click save when you have finished. This feedback is anonymous.</textarea><br/><input type=\"image\" src=\"website_code/images/Bttn_SaveOff.gif\" onmouseover=\"this.src='website_code/images/Bttn_SaveOn.gif'\" onmousedown=\"this.src='website_code/images/Bttn_SaveClick.gif'\" onmouseout=\"this.src='website_code/images/Bttn_SaveOff.gif'\" /></form><a name=\"feedbackform\"><p style=\"width:250px;\" id=\"feedback\"></p></a></div>";
echo "<a name=\"feedbackform\"><p style=\"width:250px; color:red;\" id=\"feedback\"></p></a>";

echo "</body></html>";
echo "<br><form name=\"peer\" action=\"javascript:send_review('" . $row_play['username'] . "','" . $row_play['template_id'] . "')\" method=\"post\" enctype=\"text/plain\"><textarea style=\"width:800px; height:300px;\" name=\"response\">You have been asked to provide some feedback on this learning object. Please enter your feedback and click save when you have finished. This feedback is anonymous.</textarea><br/><input type=\"image\" src=\"website_code/images/Bttn_SaveOff.gif\" onmouseover=\"this.src='website_code/images/Bttn_SaveOn.gif'\" onmousedown=\"this.src='website_code/images/Bttn_SaveClick.gif'\" onmouseout=\"this.src='website_code/images/Bttn_SaveOff.gif'\" /></form><a name=\"feedbackform\"><p style=\"width:250px;\" id=\"feedback\"></p></a></div>";

}
echo "</body></html>";

?>
}
163 changes: 80 additions & 83 deletions modules/xerte/play.php
@@ -1,4 +1,5 @@
<?PHP require("module_functions.php");
<?php
require("module_functions.php");

//Function show_template
//
Expand All @@ -8,87 +9,83 @@

function show_template($row_play){

require("config.php");

$string_for_flash_xml = $xerte_toolkits_site->users_file_area_short . $row_play['template_id'] . "-" . $row_play['username'] . "-" . $row_play['template_name'] . "/data.xml?time=" . time();

$string_for_flash = $xerte_toolkits_site->users_file_area_short . $row_play['template_id'] . "-" . $row_play['username'] . "-" . $row_play['template_name'] . "/";

list($x, $y) = explode("~",get_template_screen_size($row_play['template_name'],$row_play['template_framework']));

_load_language_file("/modules/xerte/preview.inc");

?>

<!--
University of Nottingham Xerte Online Toolkits
HTML to use at the top of the Xerte preview and play windows
Version 1.0
-->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html style="width:100%; height:100%; min-height:100%;">
<head>
<title><?PHP echo XERTE_PREVIEW_TITLE; ?></title>
<script type="text/javascript">
function enableTTS(){
if (navigator.appName.indexOf("Microsoft") != -1){
VoiceObj = new ActiveXObject("Sapi.SpVoice");
}
}
function openWindow(params){
window.open(params.url,'xerte_window',"status=0,toolbar=0,location=0,menubar=0,directories=0,resizable=0,scrollbars=0,left=" + String((screen.width / 2) - (params.width / 2)) + ",top=" + String((screen.height / 2) - (params.height / 2)) + ",height=" + params.height + ",width=" + params.width);
}
</script>
<SCRIPT LANGUAGE=JavaScript1.1>
<!--
var MM_contentVersion = 6;

var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
var words = navigator.plugins["Shockwave Flash"].description.split(" ");
for (var i = 0; i < words.length; ++i)
{
if (isNaN(parseInt(words[i])))
continue;
var MM_PluginVersion = words[i];
}
var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0
&& (navigator.appVersion.indexOf("Win") != -1)) {
document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
document.write('on error resume next \n');
document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
document.write('</SCR' + 'IPT\> \n');
}
if (! MM_FlashCanPlay ) {
document.write("You don't have Adobe Flash installed. Please visit <a href=\"http://get.adobe.com/flashplayer/?promoid=BUIGP\">The Adobe Website</a> to download it.");
}
//-->

</SCRIPT>
<script type="text/javascript" src = "rloObject.js"></script>
</head>

<body style="margin:0; width:100%; height:100%; min-height:100%;">

<!--<div style="margin:0px auto;">-->

<div style="min-height:100%; width:100%; height:100%;">

<script type="text/javascript" language="JavaScript">
<?PHP

// slightly modified xerte preview code to allow for flash vars

echo "myRLO = new rloObject('" . $x . "','" . $y . "','modules/" . $row_play['template_framework'] . "/parent_templates/" . $row_play['template_name'] . "/" . $row_play['template_name'] . ".rlt','$string_for_flash', '$string_for_flash_xml', '$xerte_toolkits_site->site_url')";

echo "</script></div><div id=\"popup_parent\"></body></html>";
$string_for_flash_xml = $xerte_toolkits_site->users_file_area_short . $row_play['template_id'] . "-" . $row_play['username'] . "-" . $row_play['template_name'] . "/data.xml?time=" . time();

}
$string_for_flash = $xerte_toolkits_site->users_file_area_short . $row_play['template_id'] . "-" . $row_play['username'] . "-" . $row_play['template_name'] . "/";

list($x, $y) = explode("~",get_template_screen_size($row_play['template_name'],$row_play['template_framework']));

_load_language_file("/modules/xerte/preview.inc");

?>

<!--
University of Nottingham Xerte Online Toolkits
HTML to use at the top of the Xerte preview and play windows
Version 1.0
-->

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html style="width:100%; height:100%; min-height:100%;">
<head>
<title><?PHP echo XERTE_PREVIEW_TITLE; ?></title>
<script type="text/javascript">
function enableTTS(){
if (navigator.appName.indexOf("Microsoft") != -1){
VoiceObj = new ActiveXObject("Sapi.SpVoice");
}
}
function openWindow(params){
window.open(params.url,'xerte_window',"status=0,toolbar=0,location=0,menubar=0,directories=0,resizable=0,scrollbars=0,left=" + String((screen.width / 2) - (params.width / 2)) + ",top=" + String((screen.height / 2) - (params.height / 2)) + ",height=" + params.height + ",width=" + params.width);
}
</script>
<SCRIPT LANGUAGE=JavaScript1.1>
<!--
var MM_contentVersion = 6;

var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0;
if ( plugin ) {
var words = navigator.plugins["Shockwave Flash"].description.split(" ");
for (var i = 0; i < words.length; ++i)
{
if (isNaN(parseInt(words[i])))
continue;
var MM_PluginVersion = words[i];
}
var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion;
}
else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0
&& (navigator.appVersion.indexOf("Win") != -1)) {
document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag
document.write('on error resume next \n');
document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n');
document.write('</SCR' + 'IPT\> \n');
}
if (! MM_FlashCanPlay ) {
document.write("You don't have Adobe Flash installed. Please visit <a href=\"http://get.adobe.com/flashplayer/?promoid=BUIGP\">The Adobe Website</a> to download it.");
}
//-->

?>
</SCRIPT>
<script type="text/javascript" src = "rloObject.js"></script>
</head>

<body style="margin:0; width:100%; height:100%; min-height:100%;">

<!--<div style="margin:0px auto;">-->

<div style="min-height:100%; width:100%; height:100%;">

<script type="text/javascript" language="JavaScript">
<?PHP

// slightly modified xerte preview code to allow for flash vars

echo "myRLO = new rloObject('" . $x . "','" . $y . "','modules/" . $row_play['template_framework'] . "/parent_templates/" . $row_play['template_name'] . "/" . $row_play['template_name'] . ".rlt','$string_for_flash', '$string_for_flash_xml', '$xerte_toolkits_site->site_url')";

echo "</script></div><div id=\"popup_parent\"></body></html>";

}

0 comments on commit dedcfa7

Please sign in to comment.