Fixing hot spot colors see BT#2974

skala
Julio Montoya 14 years ago
parent 3cdd8460bf
commit 7edeafeb55
  1. 8
      main/exercice/answer_admin.inc.php
  2. 47
      main/exercice/exercise.class.php
  3. 2
      main/exercice/exercise_admin.php
  4. 4
      main/exercice/hotspot_admin.inc.php
  5. 4
      main/inc/lib/exercise_show_functions.lib.php
  6. BIN
      main/plugin/hotspot/hotspot_admin.fla
  7. BIN
      main/plugin/hotspot/hotspot_admin.swf

@ -1310,14 +1310,12 @@ if($modifyAnswers)
</form>
<?php
}
elseif ($answerType == HOT_SPOT || $answerType == HOT_SPOT_ORDER)
{
} elseif ($answerType == HOT_SPOT || $answerType == HOT_SPOT_ORDER) {
if($debug>0){echo str_repeat('&nbsp;',4).'$answerType is HOT_SPOT'."<br />\n";}
$hotspot_colors = array("", // $i starts from 1 on next loop (ugly fix)
"#4271B5",
"#FE8E16",
"#3B3B3B",
"#45C7F0",
"#BCD631",
"#D63173",
"#D7D7D7",
@ -1326,7 +1324,7 @@ if($modifyAnswers)
"#4F9242",
"#F4EB24",
"#ED2024",
"#45C7F0",
"#3B3B3B",
"#F7BDE2");
?>

@ -879,24 +879,24 @@ class Exercise {
$form -> addElement('html','<div id="options" style="display:none">');
if($type=='full') {
// feedback type
$radios_feedback = array();
$radios_feedback[] = FormValidator :: createElement ('radio', 'exerciseFeedbackType', null, get_lang('ExerciseAtTheEndOfTheTest'),'0',array('id' =>'exerciseType_0', 'onclick' => 'check_feedback()'));
if (api_get_setting('enable_quiz_scenario') == 'true') {
$radios_feedback[] = FormValidator :: createElement ('radio', 'exerciseFeedbackType', null, get_lang('DirectFeedback'),'1',array('id' =>'exerciseType_1' , 'onclick' => 'check_direct_feedback()'));
}
$radios_feedback[] = FormValidator :: createElement ('radio', 'exerciseFeedbackType', null, get_lang('NoFeedback'),'2',array('id' =>'exerciseType_2'));
$form -> addGroup($radios_feedback, null, get_lang('FeedbackType'));
$feedback_option[0]=get_lang('ExerciseAtTheEndOfTheTest');
/*$feedback_option[0]=get_lang('ExerciseAtTheEndOfTheTest');
$feedback_option[1]=get_lang('DirectFeedback');
$feedback_option[2]=get_lang('NoFeedback');
*/
//Can't modify a DirectFeedback question
if ($this->selectFeedbackType() != 1 ) {
//$form -> addElement('select', 'exerciseFeedbackType',get_lang('FeedbackType'),$feedback_option,'onchange="javascript:feedbackselection()"');
if ($this->selectFeedbackType() != EXERCISE_FEEDBACK_TYPE_DIRECT ) {
// feedback type
$radios_feedback = array();
$radios_feedback[] = FormValidator :: createElement ('radio', 'exerciseFeedbackType', null, get_lang('ExerciseAtTheEndOfTheTest'),'0',array('id' =>'exerciseType_0', 'onclick' => 'check_feedback()'));
if (api_get_setting('enable_quiz_scenario') == 'true') {
$radios_feedback[] = FormValidator :: createElement ('radio', 'exerciseFeedbackType', null, get_lang('DirectFeedback'),'1',array('id' =>'exerciseType_1' , 'onclick' => 'check_direct_feedback()'));
}
$radios_feedback[] = FormValidator :: createElement ('radio', 'exerciseFeedbackType', null, get_lang('NoFeedback'),'2',array('id' =>'exerciseType_2'));
$form->addGroup($radios_feedback, null, get_lang('FeedbackType'));
//$form -> addElement('select', 'exerciseFeedbackType',get_lang('FeedbackType'),$feedback_option,'onchange="javascript:feedbackselection()"');
// test type
$radios = array();
$radios[] = FormValidator :: createElement ('radio', 'exerciseType', null, get_lang('QuestionsPerPageOne'),'2',array('onclick' => 'check_per_page_one()', 'id'=>'option_page_one'));
@ -905,8 +905,19 @@ class Exercise {
$form -> addGroup($radios, null, get_lang('QuestionsPerPage'));
} else {
// if is Directfeedback but has not questions we can allow to modify the question type
if ($this->selectNbrQuestions()== 0) {
$form -> addElement('select', 'exerciseFeedbackType',get_lang('FeedbackType'),$feedback_option,'onchange="javascript:feedbackselection()"');
if ($this->selectNbrQuestions() == 0) {
// feedback type
$radios_feedback = array();
$radios_feedback[] = FormValidator :: createElement ('radio', 'exerciseFeedbackType', null, get_lang('ExerciseAtTheEndOfTheTest'),'0',array('id' =>'exerciseType_0', 'onclick' => 'check_feedback()'));
if (api_get_setting('enable_quiz_scenario') == 'true') {
$radios_feedback[] = FormValidator :: createElement ('radio', 'exerciseFeedbackType', null, get_lang('DirectFeedback'),'1',array('id' =>'exerciseType_1' , 'onclick' => 'check_direct_feedback()'));
}
$radios_feedback[] = FormValidator :: createElement ('radio', 'exerciseFeedbackType', null, get_lang('NoFeedback'),'2',array('id' =>'exerciseType_2'));
$form->addGroup($radios_feedback, null, get_lang('FeedbackType'));
//$form -> addElement('select', 'exerciseFeedbackType',get_lang('FeedbackType'),$feedback_option,'onchange="javascript:feedbackselection()"');
// test type
$radios = array();
$radios[] = FormValidator :: createElement ('radio', 'exerciseType', null, get_lang('SimpleExercise'),'1');
@ -914,8 +925,8 @@ class Exercise {
$form -> addGroup($radios, null, get_lang('ExerciseType'));
} else {
//we force the options to the DirectFeedback exercisetype
$form -> addElement('hidden', 'exerciseFeedbackType','1');
$form -> addElement('hidden', 'exerciseType','2');
$form -> addElement('hidden', 'exerciseFeedbackType',EXERCISE_FEEDBACK_TYPE_DIRECT);
$form -> addElement('hidden', 'exerciseType',ONE_PER_PAGE);
}
}

@ -162,7 +162,7 @@ if(isset($_GET['exerciseId'])) {
$form->addElement('hidden','edit','false');
}
$objExercise->createForm ($form);
$objExercise->createForm($form);
// VALIDATE FORM
if ($form->validate()) {

@ -468,7 +468,7 @@ if ($modifyAnswers) {
$hotspot_colors = array("", // $i starts from 1 on next loop (ugly fix)
"#4271B5",
"#FE8E16",
"#3B3B3B",
"#45C7F0",
"#BCD631",
"#D63173",
"#D7D7D7",
@ -477,7 +477,7 @@ if ($modifyAnswers) {
"#4F9242",
"#F4EB24",
"#ED2024",
"#45C7F0",
"#3B3B3B",
"#F7BDE2");
}

@ -104,7 +104,7 @@ class ExerciseShowFunctions {
$hotspot_colors = array("", // $i starts from 1 on next loop (ugly fix)
"#4271B5",
"#FE8E16",
"#3B3B3B",
"#45C7F0",
"#BCD631",
"#D63173",
"#D7D7D7",
@ -113,7 +113,7 @@ class ExerciseShowFunctions {
"#4F9242",
"#F4EB24",
"#ED2024",
"#45C7F0",
"#3B3B3B",
"#F7BDE2");
?>
<tr>

Loading…
Cancel
Save