[svn r10571] cleanup

skala
Patrick Cool 19 years ago
parent cb40016577
commit 73e36a90a0
  1. 4
      main/survey/addanother.php
  2. 302
      main/survey/blank.php
  3. 170
      main/survey/bluebreeze.php

@ -23,7 +23,7 @@
==============================================================================
* @package dokeos.survey
* @author
* @version $Id: addanother.php 10567 2006-12-28 23:10:27Z pcool $
* @version $Id: addanother.php 10571 2006-12-29 15:35:13Z pcool $
==============================================================================
*/
@ -221,8 +221,6 @@ if(isset($group_id))
</td>
</tr>
<tr></tr>
<tr></tr>
<tr></tr>
<tr>
<td>&nbsp;</td>
<td>

@ -20,190 +20,166 @@
/**
* @package dokeos.survey
* @author
* @version $Id: blank.php 10223 2006-11-27 14:45:59Z pcool $
* @version $Id: blank.php 10571 2006-12-29 15:35:13Z pcool $
*/
// name of the language file that needs to be included
$language_file = 'survey';
$temp = $_REQUEST['temp'];
require ('../inc/global.inc.php');
// including the global dokeos file
require_once ('../inc/global.inc.php');
// including additional libraries
/** @todo check if these are all needed */
/** @todo check if the starting / is needed. api_get_path probably ends with an / */
require_once (api_get_path(LIBRARY_PATH)."/surveymanager.lib.php");
require_once (api_get_path(LIBRARY_PATH)."/course.lib.php");
/** @todo replace this with the correct code */
$status = surveymanager::get_status();
if($status==5)
{
api_protect_admin_script();
api_protect_admin_script();
}
// $_GET and $_POST
/** @todo replace $_REQUEST with $_GET or $_POST */
$cidReq = $_REQUEST['cidReq'];
require_once (api_get_path(LIBRARY_PATH)."/course.lib.php");
$temp = $_REQUEST['temp'];
$ques = $_REQUEST['ques'];
$ans = $_REQUEST['ans'];
$answers = explode("|",$ans);
$count = count($answers);
$qtype = $_REQUEST['qtype'];
$answers = explode("|",$ans);
$count = count($answers);
Display :: display_header();
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Blank template</title>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.style5 {font-size: 12px; font-weight: bold; font-family: Arial, Helvetica, sans-serif;}
-->
</style>
<link href="file:///D|/EasyPHP1-8/www/dokeosIFA/main/css/default.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="69%" height="29" bgcolor="#264269"><font face="Verdana">&nbsp;&nbsp;<font color="#FFFFFF" size="2"><strong>My Portal - My Organisation</strong></font></font></td>
<td width="31%" align="right" bgcolor="#264269" class="bg-1">&nbsp;&nbsp;</td>
</tr>
<tr>
<td height="24" bgcolor="#90AFDD" class="bg-3">&nbsp;</td>
<td height="24" align="right" bgcolor="#90AFDD" class="topBanner"><span class="text"></span>&nbsp;&nbsp;</td>
</tr>
<tr bordercolor="#6699FF">
<td colspan="2" align="center" valign="top"><br><br>
<table width="707" border="0" cellspacing="0" cellpadding="0">
<tr>
<?
<table width="707" border="0" cellspacing="0" cellpadding="0">
<tr>
<?
switch ($qtype)
{
case "Yes/No":
{?>
<td width="100%" bgcolor="F6F5F5"><p><font face="Verdana"><strong><font size="2">Question:</font> </strong><br>
<?php echo html_entity_decode($ques);?><br>
<font size="2"><strong>Answers:</strong></font><br>
<textarea cols="50" rows="3" disabled='true'><?echo $answers[0];?></textarea>
&nbsp;
<input name="radiobutton" type="radio" value="radiobutton">
</font></p>
<p><font face="Verdana">
<textarea cols="50" rows="3" disabled='true'><?echo $answers[1];?></textarea>
&nbsp;
<input name="radiobutton" type="radio" value="radiobutton">
</font></p></td>
<td width="10" height="161" bgcolor="F6F5F5">&nbsp;</td>
<?
break;
/** @todo switch statement with hard coded language string => won't work in a language that is not English */
case "Yes/No":
{
?>
<td width="100%" bgcolor="F6F5F5"><p><strong><?php echo get_lang('Question'); ?>: </strong><br />
<?php echo html_entity_decode($ques);?><br />
<strong><?php echo get_lang('Answers'); ?>:</strong>><br />
<textarea cols="50" rows="3" disabled='true'><?echo $answers[0];?></textarea>
<input name="radiobutton" type="radio" value="radiobutton">
<textarea cols="50" rows="3" disabled='true'><?echo $answers[1];?></textarea>
<input name="radiobutton" type="radio" value="radiobutton">
</td>
<td width="10" height="161" bgcolor="F6F5F5">&nbsp;</td>
<?
break;
}
/** @todo switch statement with hard coded language string => won't work in a language that is not English */
case "Multiple Choice (multiple answer)":
{
?>
<td width="100%" bgcolor="F6F5F5"><strong><?php echo get_lang('Question'); ?>:</strong><br />
<?php echo $ques;?><br />
<br />
<strong><?php echo get_lang('Answers'); ?>: </strong><br />
<?
$i=0;
for($p=1;$p<$count;$i++,$p++)
{
?>
<textarea cols="50" rows="3" disabled="true"><?php echo $answers[$i]; ?></textarea>
<input type="checkbox" name="checkbox" value="checkbox">
<br />
<?
}
?>
</td>
<td width="8" height="161" bgcolor="F6F5F5">&nbsp;</td>
<?
break;
}
/** @todo switch statement with hard coded language string => won't work in a language that is not English */
case "Multiple Choice (single answer)":
{
?>
<td width="100%" bgcolor="F6F5F5"><strong><?php echo get_lang('Question'); ?>:</strong><br />
<?php echo $ques;?><br />
<br />
<strong><?php echo get_lang('Answers'); ?>:</strong><br />
<?
$i=0;
for($p=1;$p<$count;$i++,$p++)
{
?>
<textarea cols="50" rows="3" disabled='true'><?php echo $answers[$i]; ?></textarea>
<input name="radiobutton" type="radio" value="radiobutton">
<br />
<?
}
?>
</td>
<td width="8" height="161" bgcolor="F6F5F5">&nbsp;</td>
<?
break;
}
/** @todo switch statement with hard coded language string => won't work in a language that is not English */
case "Open":
{
?>
<td width="87" bgcolor="F6F5F5"><strong><?php echo get_lang('Question'); ?>:</strong><br />
<?php echo $ques;?><br />
<br />
<strong><?php echo get_lang('Answers'); ?>:</strong><br />
<textarea style="width: 100%" name="defaultext" rows=3 cols=60></textarea>
</td>
<?
break;
}
/** @todo switch statement with hard coded language string => won't work in a language that is not English */
case "Numbered":
{
?>
<td width="144" bgcolor="F6F5F5"><strong><?php echo get_lang('Question'); ?>:</strong><br />
<?php echo $ques;?><br />
<br />
<strong><?php echo get_lang('Answers'); ?>: </strong><br />
<?
$i=0;
for($p=1;$p<$count;$i++,$p++)
{
?>
<textarea cols="50" rows="3" disabled='true'><?php echo $answers[$i]; ?></textarea>
<select>
<option value="not applicable"><?php echo get_lang('NotApplicable'); ?></option>
<option value="<?php echo $i; ?>">1</option>
<option value="<?php echo $i; ?>">2</option>
<option value="<?php echo $i; ?>">3</option>
<option value="<?php echo $i; ?>">4</option>
<option value="<?php echo $i; ?>">5</option>
<option value="<?php echo $i; ?>">6</option>
<option value="<?php echo $i; ?>">7</option>
<option value="<?php echo $i; ?>">8</option>
<option value="<?php echo $i; ?>">9</option>
<option value="<?php echo $i; ?>">10</option>
</select>
<br />
<?
}
echo '</td>';
break;
}
}
case "Multiple Choice (multiple answer)":
{?>
<td width="100%" bgcolor="F6F5F5"><font face="Verdana"><strong><font size="2">Question:</font> </strong><br>
<?php echo $ques;?><br>
<br>
<strong><font size="2">Answers: </font></strong><br>
<?
$i=0;
for($p=1;$p<$count;$i++,$p++)
{
?>
<textarea cols="50" rows="3" disabled='true'><?php echo $answers[$i]; ?></textarea>&nbsp;
<input type="checkbox" name="checkbox" value="checkbox"></font>
<br>
<?
}
?>
</td>
<td width="8" height="161" bgcolor="F6F5F5">&nbsp;</td>
<?
break;
}
case "Multiple Choice (single answer)":
{?>
<td width="100%" bgcolor="F6F5F5"><font face="Verdana"><strong><font size="2">Question:</font> </strong><br>
<?php echo $ques;?><br>
<br>
<strong><font size="2">Answers: </font></strong><br>
<?
$i=0;
for($p=1;$p<$count;$i++,$p++)
{
?>
<textarea cols="50" rows="3" disabled='true'><?php echo $answers[$i]; ?></textarea>
<input name="radiobutton" type="radio" value="radiobutton"> </font>
<br>
<?
}
?>
</td>
<td width="8" height="161" bgcolor="F6F5F5">&nbsp;</td>
<?
break;
}
case "Open":
{?>
<td width="87" bgcolor="F6F5F5"><font face="Verdana"><strong><font size="2">Question:</font> </strong><br>
<?php echo $ques;?><br>
<br>
<strong><font size="2">Answers: </font></strong><br></font>
<textarea style="WIDTH: 100%" name="defaultext" rows=3 cols=60>
</textarea>
</td>
<?
break;
}
case "Numbered":
{?>
<td width="144" bgcolor="F6F5F5"><font face="Verdana"><strong><font size="2">Question:</font> </strong><br>
<?php echo $ques;?><br>
<br>
<strong><font size="2">Answers: </font></strong><br>
<?
$i=0;
for($p=1;$p<$count;$i++,$p++)
{
?>
<textarea cols="50" rows="3" disabled='true'><?php echo $answers[$i]; ?></textarea>
<select>
<option value="not applicable">Not Applicable</option>
<option value="$i">1</option>
<option value="$i">2</option>
<option value="$i">3</option>
<option value="$i">4</option>
<option value="$i">5</option>
<option value="$i">6</option>
<option value="$i">7</option>
<option value="$i">8</option>
<option value="$i">9</option>
<option value="$i">10</option></font>
</select>
<br>
<?
}
?>
</td>
<?
break;
}
}
?>
</tr>
</table>
<p>&nbsp;</p></td>
</tr>
<tr align="right">
<td height="31" align="left" bgcolor="#E5EDF9" class="bg-4"><font face="Verdana">&nbsp;&nbsp;<span class="text"><font size="2">Manager : <font color="#4171B5"><strong>user admin</strong></font></font></span> </font></td>
<td height="31" bgcolor="#E5EDF9" class="bg-4"><span class="text"><font size="2" face="Verdana">Platform <font color="#4171B5"><strong>Dokeos 1.6.3</strong></font></font> <font size="2" face="Verdana">&copy; 2006</font></span>&nbsp;&nbsp;</td>
</tr>
</table>
</body>
</html>
<?php
Display :: display_footer();
?>

@ -20,122 +20,102 @@
/**
* @package dokeos.survey
* @author
* @version $Id: bluebreeze.php 10223 2006-11-27 14:45:59Z pcool $
* @version $Id: bluebreeze.php 10571 2006-12-29 15:35:13Z pcool $
*/
// name of the language file that needs to be included
$language_file = 'survey';
$temp = $_REQUEST['temp'];
require ('../inc/global.inc.php');
// including the global dokeos file
require_once ('../inc/global.inc.php');
// including additional libraries
/** @todo check if these are all needed */
/** @todo check if the starting / is needed. api_get_path probably ends with an / */
require_once (api_get_path(LIBRARY_PATH)."/surveymanager.lib.php");
require_once (api_get_path(LIBRARY_PATH)."/course.lib.php");
/** @todo replace this with the correct code */
$status = surveymanager::get_status();
if($status==5)
{
api_protect_admin_script();
api_protect_admin_script();
}
// $_GET and $_POST
/** @todo replace $_REQUEST with $_GET or $_POST */
$temp = $_REQUEST['temp'];
$cidReq = $_REQUEST['cidReq'];
require_once (api_get_path(LIBRARY_PATH)."/course.lib.php");
$ques = $_REQUEST['ques'];
$ans = $_REQUEST['ans'];
$qtype = $_REQUEST['qtype'];
$answers = explode("|",$ans);
$count = count($answers);
$qtype = $_REQUEST['qtype'];
Display :: display_header();
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>White Template</title>
<link href="../survey/css_white/style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
.style5 {font-size: 12px; font-weight: bold; font-family: Arial, Helvetica, sans-serif;}
-->
</style>
</head>
<body>
<table width="100%" cellpadding="0" cellspacing="0">
<tr>
<td height="85" colspan="2" align=left><img src="../cssimg/logo_ifa.gif" border=0></td>
</tr>
<tr>
<td width="66%" bgcolor="#999999">&nbsp;&nbsp;<span class="text">My Portal &gt; My Organisation</span></td>
<td width="34%" align="right" bgcolor="#949A9C"><span class="text"></span>&nbsp;</td>
</tr>
<tr>
<td width="66%" bgcolor="#F7EBEF" colspan="2">&nbsp;&nbsp;<span class="text"></span></td>
</tr>
<tr>
<td width="66%" bgcolor="949A9C">&nbsp;&nbsp;<span class="text">My Portal &gt; Course Home &gt; Survey</span></td>
<td width="34%" align="right" bgcolor="#949A9C"><span class="text"></span>&nbsp;</td>
</tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
<tr bgcolor="#FFFFFF">
<td colspan="2" align="center" valign="top"><br>
<br>
<table width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="23" height="21"><img src="../survey/images_white/top-1.gif" width="23" height="21"></td>
<td height="21" background="../survey/images_white/top-2.gif">&nbsp;</td>
<td width="20" height="21"><img src="../survey/images_white/top-3.gif" width="20" height="21"></td>
</tr>
<tr>
<?
switch ($qtype)
{
<table width="600" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="23" height="21"><img src="../survey/images_white/top-1.gif" width="23" height="21"></td>
<td height="21" background="../survey/images_white/top-2.gif">&nbsp;</td>
<td width="20" height="21"><img src="../survey/images_white/top-3.gif" width="20" height="21"></td>
</tr>
<tr>
<?
switch ($qtype)
{
/** @todo switch statement with hard coded language string => won't work in a language that is not English */
case "Yes/No":
{?>
<td height="39" background="../survey/images_white/left.gif">&nbsp;</td>
<td><strong>Question: </strong><br><?php echo $ques;?><br><br><strong>Answers: </strong><br>
<textarea cols="50" rows="3" disabled='true'><?echo $answers[0];?></textarea>
<input name="radiobutton" type="radio" value="radiobutton"><br><textarea cols="50" rows="3" disabled='true'><?echo $answers[1];?></textarea>
<input name="radiobutton" type="radio" value="radiobutton"></td>
<td background="../survey/images_white/right.gif">&nbsp;</td>
<?
break;
}
case "Multiple Choice (multiple answer)":
{?>
<td height="39" background="../survey/images_white/left.gif">&nbsp;</td>
<td><strong>Question: </strong><br><?php echo $ques;?><br><br><strong>Answers: </strong><br>
<?
$i=0;
for($p=1;$p<$count;$i++,$p++)
{
?>
<textarea cols="50" rows="3" disabled='true'><?php echo $answers[$i]; ?></textarea>
<input type="checkbox" name="checkbox" value="checkbox"><br>
<?
<td height="39" background="images_white/left.gif">&nbsp;</td>
<td><strong><?php echo get_lang('Question'); ?>: </strong><br />
<?php echo $ques;?><br /><br /><strong><?php echo get_lang('Answers'); ?>: </strong><br />
<textarea cols="50" rows="3" disabled='true'><?echo $answers[0];?></textarea>
<input name="radiobutton" type="radio" value="radiobutton"><br /><textarea cols="50" rows="3" disabled='true'><?echo $answers[1];?></textarea>
<input name="radiobutton" type="radio" value="radiobutton"></td>
<td background="images_white/right.gif">&nbsp;</td>
<?
break;
}
/** @todo switch statement with hard coded language string => won't work in a language that is not English */
case "Multiple Choice (multiple answer)":
{
?>
</td>
<td background="../survey/images_white/right.gif">&nbsp;</td>
<?
break;
<td height="39" background="images_white/left.gif">&nbsp;</td>
<td><strong><?php echo get_lang('Question'); ?>: </strong><br />
<?php echo $ques;?><br />
<br /><strong><?php echo get_lang('Answers'); ?>: </strong><br />
<?
$i=0;
for($p=1;$p<$count;$i++,$p++)
{
?>
<textarea cols="50" rows="3" disabled='true'><?php echo $answers[$i]; ?></textarea>
<input type="checkbox" name="checkbox" value="checkbox"><br />
<?
}
?>
</td>
<td background="images_white/right.gif">&nbsp;</td>
<?
break;
}
/** @todo switch statement with hard coded language string => won't work in a language that is not English */
case "Multiple Choice (single answer)":
{?>
<td height="39" background="../survey/images_white/left.gif">&nbsp;</td>
<td><strong>Question: </strong><br><?php echo $ques;?><br><br><strong>Answers: </strong><br>
<td><strong><?php echo get_lang('Question'); ?>: </strong><br /><?php echo $ques;?><br /><br /><strong><?php echo get_lang('Answers'); ?>: </strong><br />
<?
$i=0;
for($p=1;$p<$count;$i++,$p++)
{
?>
<textarea cols="50" rows="3" disabled='true'><?php echo $answers[$i]; ?></textarea>
<input name="radiobutton" type="radio" value="radiobutton"><br>
<input name="radiobutton" type="radio" value="radiobutton"><br />
<?
}
?>
@ -147,7 +127,7 @@ body {
case "Open":
{?>
<td height="39" background="../survey/images_white/left.gif">&nbsp;</td>
<td><strong>Question: </strong><br><?php echo $ques;?><br><br><strong>Answer: </strong><br>
<td><strong><?php echo get_lang('Question'); ?>: </strong><br /><?php echo $ques;?><br /><br /><strong>Answer: </strong><br />
<TEXTAREA style="WIDTH: 100%" name="defaultext" rows=3 cols=60>
</TEXTAREA>
</td>
@ -158,7 +138,7 @@ body {
case "Numbered":
{?>
<td height="39" background="../survey/images_white/left.gif">&nbsp;</td>
<td><strong>Question: </strong><br><?php echo $ques;?><br><br><strong>Answers: </strong><br>
<td><strong><?php echo get_lang('Question'); ?>: </strong><br /><?php echo $ques;?><br /><br /><strong><?php echo get_lang('Answers'); ?>: </strong><br />
<?
$i=0;
for($p=1;$p<$count;$i++,$p++)
@ -177,7 +157,7 @@ body {
<option value="$i">8</option>
<option value="$i">9</option>
<option value="$i">10</option>
</select><br>
</select><br />
<?
}
?>
@ -203,16 +183,6 @@ body {
<td><img src="../survey/images_white/bottom-3.gif" width="20" height="21"></td>
</tr>
</table>
<p><br>
<br>
</p>
<p>&nbsp;</p>
<p>&nbsp; </p></td>
</tr>
<tr align="right" bgcolor="#942039">
<td height="30" align="left" bgcolor="#999999" class="bg-4">&nbsp;&nbsp;<span class="text">Manager : </span><span class="text-2">user admin</span> </td>
<td height="30" bgcolor="#999999" class="bg-4"><span class="text">Platform</span> <span class="text-2">Dokeos 1.6.3</span> <span class="text">&copy; 2006&nbsp;&nbsp;</span></td>
</tr>
</table>
</body>
</html>
<?php
Display :: display_footer();
?>

Loading…
Cancel
Save