[svn r19511] minor - style changes - allow changed style when using ie - (partial FS#3937)

skala
Isaac Flores 16 years ago
parent f81c5681c5
commit 10d471a963
  1. 33
      main/exercice/exercise.lib.php

@ -1,4 +1,4 @@
<?php // $Id: exercise.lib.php 19504 2009-04-02 16:12:27Z iflorespaz $ <?php // $Id: exercise.lib.php 19511 2009-04-02 18:06:07Z iflorespaz $
/* /*
============================================================================== ==============================================================================
@ -29,7 +29,7 @@
* shows a question and its answers * shows a question and its answers
* @package dokeos.exercise * @package dokeos.exercise
* @author Olivier Brouckaert <oli.brouckaert@skynet.be> * @author Olivier Brouckaert <oli.brouckaert@skynet.be>
* @version $Id: exercise.lib.php 19504 2009-04-02 16:12:27Z iflorespaz $ * @version $Id: exercise.lib.php 19511 2009-04-02 18:06:07Z iflorespaz $
*/ */
/** /**
@ -42,8 +42,11 @@
require("../inc/lib/fckeditor/fckeditor.php") ; require("../inc/lib/fckeditor/fckeditor.php") ;
function showQuestion($questionId, $onlyAnswers=false, $origin=false,$current_item, $total_item) function showQuestion($questionId, $onlyAnswers=false, $origin=false,$current_item, $total_item)
{ {
//echo '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.js" type="text/javascript"></script>'; if (!ereg("MSIE", $_SERVER["HTTP_USER_AGENT"])) {
//echo '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.corners.min.js" type="text/javascript"></script>'; echo '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.js" type="text/javascript"></script>';
echo '<script src="'.api_get_path(WEB_LIBRARY_PATH).'javascript/jquery.corners.min.js" type="text/javascript"></script>';
}
// reads question informations // reads question informations
if(!$objQuestionTmp = Question::read($questionId)) if(!$objQuestionTmp = Question::read($questionId))
@ -91,12 +94,17 @@ function showQuestion($questionId, $onlyAnswers=false, $origin=false,$current_it
} }
$s.= '</table>'; $s.= '</table>';
/*$s.="<script>$(document).ready( function(){ if (!ereg("MSIE",$_SERVER["HTTP_USER_AGENT"])) {
$('.rounded').corners(); $s.="<script>$(document).ready( function(){
$('.exercise_options').corners(); $('.rounded').corners();
});</script>";*/ $('.exercise_options').corners();
//$s.="<div class=\"rounded exercise_questions\" style=\"width: 720px; padding: 3px; background-color:#ccc;\"> });</script>";
$s.="<table width=\"720\" class='exercise_options' style=\"width: 720px;margin-left:10px; background-color:#fff;\">"; $s.="<div class=\"rounded exercise_questions\" style=\"width: 720px; padding: 3px; background-color:#ccc;\">";
} else {
$option_ie="margin-left:10px";
}
$s.="<table width=\"720\" class='exercise_options' style=\"width: 720px;$option_ie background-color:#fff;\">";
// construction of the Answer object // construction of the Answer object
$objAnswerTmp=new Answer($questionId); $objAnswerTmp=new Answer($questionId);
@ -118,7 +126,7 @@ function showQuestion($questionId, $onlyAnswers=false, $origin=false,$current_it
$oFCKeditor->ToolbarSet = "FreeAnswer"; $oFCKeditor->ToolbarSet = "FreeAnswer";
$oFCKeditor->Width = '100%'; $oFCKeditor->Width = '100%';
$oFCKeditor->Height = '300'; $oFCKeditor->Height = '200';
$oFCKeditor->Value = '' ; $oFCKeditor->Value = '' ;
$s .= "<tr><td colspan='2'>".$oFCKeditor->CreateHtml()."</td></tr>"; $s .= "<tr><td colspan='2'>".$oFCKeditor->CreateHtml()."</td></tr>";
@ -255,6 +263,9 @@ function showQuestion($questionId, $onlyAnswers=false, $origin=false,$current_it
} }
} }
} // end for() } // end for()
if (!ereg("MSIE", $_SERVER["HTTP_USER_AGENT"])) {
$s .= '</table>';
}
$s .= '</div>'; $s .= '</div>';
// destruction of the Answer object // destruction of the Answer object

Loading…
Cancel
Save