From 9a3dac14c09f5c3fbcfaf169c4d5718206d080b0 Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Wed, 13 May 2009 22:21:49 +0200 Subject: [PATCH] [svn r20603] Fixing the tag button bug of ie6 in the Quiz tool see FS#4174 --- main/exercice/hotspot_admin.inc.php | 17 ++++++++++++++++- main/exercice/multiple_answer.class.php | 20 ++++++++++++++------ main/exercice/unique_answer.class.php | 23 ++++++++++++++--------- 3 files changed, 44 insertions(+), 16 deletions(-) diff --git a/main/exercice/hotspot_admin.inc.php b/main/exercice/hotspot_admin.inc.php index 06557583a7..f0b4476de3 100644 --- a/main/exercice/hotspot_admin.inc.php +++ b/main/exercice/hotspot_admin.inc.php @@ -262,13 +262,28 @@ if($modifyAnswers)
- diff --git a/main/exercice/multiple_answer.class.php b/main/exercice/multiple_answer.class.php index d5f39260c8..883278e66d 100644 --- a/main/exercice/multiple_answer.class.php +++ b/main/exercice/multiple_answer.class.php @@ -150,12 +150,20 @@ class MultipleAnswer extends Question { $form -> add_multiple_required_rule ($boxes_names , get_lang('ChooseAtLeastOneCheckbox') , 'multiple_required'); - $form->addElement('style_submit_button', 'lessAnswers', get_lang('LessAnswer'),'class="minus"'); - $form->addElement('style_submit_button', 'moreAnswers', get_lang('PlusAnswer'),'class="plus"'); - - global $text, $class; - // setting the save button here and not in the question class.php - $form->addElement('style_submit_button','submitQuestion',$text, 'class="'.$class.'"'); + + $navigator_info = api_get_navigator(); + global $text, $class; + //ie6 fix + if ($navigator_info['name']=='Internet Explorer' && $navigator_info['version']=='6') { + $form->addElement('submit', 'lessAnswers', get_lang('LessAnswer'),'class="minus"'); + $form->addElement('submit', 'moreAnswers', get_lang('PlusAnswer'),'class="plus"'); + $form->addElement('submit','submitQuestion',$text, 'class="'.$class.'"'); + } else { + $form->addElement('style_submit_button', 'lessAnswers', get_lang('LessAnswer'),'class="minus"'); + $form->addElement('style_submit_button', 'moreAnswers', get_lang('PlusAnswer'),'class="plus"'); + // setting the save button here and not in the question class.php + $form->addElement('style_submit_button','submitQuestion',$text, 'class="'.$class.'"'); + } $renderer->setElementTemplate('{element} ','lessAnswers'); $renderer->setElementTemplate('{element} ','submitQuestion'); diff --git a/main/exercice/unique_answer.class.php b/main/exercice/unique_answer.class.php index b5143cb150..23f5340af4 100644 --- a/main/exercice/unique_answer.class.php +++ b/main/exercice/unique_answer.class.php @@ -257,15 +257,20 @@ class UniqueAnswer extends Question { $form -> addElement ('html', '
+ + + + + + + +
'); $form -> addElement ('html', '
'); - - $form->addElement('style_submit_button', 'lessAnswers', get_lang('LessAnswer'),'class="minus"'); - $form->addElement('style_submit_button', 'moreAnswers', get_lang('PlusAnswer'),'class="plus"'); - - global $text, $class; - // setting the save button here and not in the question class.php - $form->addElement('style_submit_button','submitQuestion',$text, 'class="'.$class.'"'); - - + $navigator_info = api_get_navigator(); + global $text, $class; + //ie6 fix + if ($navigator_info['name']=='Internet Explorer' && $navigator_info['version']=='6') { + $form->addElement('submit', 'lessAnswers', get_lang('LessAnswer'),'class="minus"'); + $form->addElement('submit', 'moreAnswers', get_lang('PlusAnswer'),'class="plus"'); + $form->addElement('submit','submitQuestion',$text, 'class="'.$class.'"'); + } else { + $form->addElement('style_submit_button', 'lessAnswers', get_lang('LessAnswer'),'class="minus"'); + $form->addElement('style_submit_button', 'moreAnswers', get_lang('PlusAnswer'),'class="plus"'); + // setting the save button here and not in the question class.php + $form->addElement('style_submit_button','submitQuestion',$text, 'class="'.$class.'"'); + } + $renderer->setElementTemplate('{element}','submitQuestion'); $renderer->setElementTemplate('{element} ','lessAnswers'); $renderer->setElementTemplate('{element}','moreAnswers');