From 7b33dfa3904189697476218dba1c1b6c8a5cb493 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Carlos=20Ra=C3=B1a?= Date: Fri, 16 Jul 2010 09:29:55 +0200 Subject: [PATCH] fix icon back for navigation into exercices --- main/exercice/admin.php | 6 +- main/exercice/exercice.php | 98 +++++++++++++++---------------- main/exercice/exercice_submit.php | 2 +- main/exercice/exercise_admin.php | 2 +- main/exercice/hotpotatoes.php | 2 +- main/exercice/qti2.php | 2 +- main/exercice/question_create.php | 2 +- main/exercice/question_pool.php | 4 +- 8 files changed, 57 insertions(+), 61 deletions(-) mode change 100644 => 100755 main/exercice/qti2.php diff --git a/main/exercice/admin.php b/main/exercice/admin.php index bf87b9fae9..6c7a0862d2 100755 --- a/main/exercice/admin.php +++ b/main/exercice/admin.php @@ -428,12 +428,10 @@ if (isset($exerciseId) && !empty($exerciseId)) { echo '
'; +if (isset($_GET['hotspotadmin']) || isset($_GET['newQuestion']) || isset($_GET['myid'])) +echo Display::return_icon('back.png', get_lang('GoBackToQuestionList')).' '.''.get_lang('GoBackToQuestionList').''; echo Display::return_icon('preview.gif', get_lang('Preview')).''.get_lang('Preview').''; echo Display::return_icon('edit.gif', get_lang('ModifyExercise')).''.get_lang('ModifyExercise').''; - -if (isset($_GET['hotspotadmin']) || isset($_GET['newQuestion']) || isset($_GET['myid'])) -echo Display::return_icon('message_reply_forum.png', get_lang('GoBackToQuestionList')).' '.''.get_lang('GoBackToQuestionList').'
'; - echo '
'; if(isset($_GET['message'])) diff --git a/main/exercice/exercice.php b/main/exercice/exercice.php index 22afa7778b..55f7225623 100755 --- a/main/exercice/exercice.php +++ b/main/exercice/exercice.php @@ -732,6 +732,54 @@ if ($show == 'test') { echo ''; } +if (($is_allowedToEdit) and ($origin != 'learnpath')) { + if ($_GET['show'] != 'result') { + echo '' . Display :: return_icon('new_test.gif', get_lang('NewEx')) . get_lang('NewEx') . ''; + echo '' . Display :: return_icon('question_add.gif', get_lang('AddQuestionToExercise')) . get_lang('AddQuestionToExercise') . ''; + echo '' . Display :: return_icon('jqz.gif', get_lang('ImportHotPotatoesQuiz')) . get_lang('ImportHotPotatoesQuiz') . ''; + // link to import qti2 ... + echo '' . Display :: return_icon('jqz.gif', get_lang('ImportQtiQuiz')) . get_lang('ImportQtiQuiz') . ''; + echo '' . Display :: return_icon('show_test_results.gif', get_lang('Results')) . get_lang('Results') . ''; + } + + // the actions for the statistics + if ($show == 'result') { + // the form + if (api_is_platform_admin() || api_is_course_admin() || api_is_course_tutor() || api_is_course_coach()) { + if ($_SESSION['export_user_fields'] == true) { + $alt = get_lang('ExportWithUserFields'); + $extra_user_fields = ''; + } else { + $alt = get_lang('ExportWithoutUserFields'); + $extra_user_fields = ''; + } + echo '' . Display :: return_icon('back.png', get_lang('GoBackToQuestionList')) . get_lang('GoBackToQuestionList') . ''; + echo ''.Display::return_icon('csv.gif',get_lang('ExportAsCSV')).get_lang('ExportAsCSV').''; + echo '' . Display :: return_icon('excel.gif', get_lang('ExportAsXLS')) . get_lang('ExportAsXLS') . ''; + //echo ''.Display::return_icon('synthese_view.gif',$alt).$alt.''; + echo '
'; + echo ''; + echo ''; + echo ''; + echo '
'; + echo '
'; + echo ''; + echo ''; + echo ''; + echo '
'; + //echo '
'; + //echo $extra_user_fields; + //echo '
'; + } + } +} else { + //the student view + if ($show == 'result') { + echo '' . Display :: return_icon('back.png', get_lang('GoBackToQuestionList')) . get_lang('GoBackToQuestionList') . ''; + } else { + echo '' . Display :: return_icon('show_test_results.gif', get_lang('Results')) . get_lang('Results') . ''; + } +} if ($_configuration['tracking_enabled']) { if ($show == 'result') { /*if (!function_exists('make_select')) @@ -809,56 +857,6 @@ if ($_configuration['tracking_enabled']) { } } */ } - -if (($is_allowedToEdit) and ($origin != 'learnpath')) { - if ($_GET['show'] != 'result') { - echo '' . Display :: return_icon('new_test.gif', get_lang('NewEx')) . get_lang('NewEx') . ''; - echo '' . Display :: return_icon('question_add.gif', get_lang('AddQuestionToExercise')) . get_lang('AddQuestionToExercise') . ''; - echo '' . Display :: return_icon('jqz.gif', get_lang('ImportHotPotatoesQuiz')) . get_lang('ImportHotPotatoesQuiz') . ''; - // link to import qti2 ... - echo '' . Display :: return_icon('jqz.gif', get_lang('ImportQtiQuiz')) . get_lang('ImportQtiQuiz') . ''; - echo '' . Display :: return_icon('show_test_results.gif', get_lang('Results')) . get_lang('Results') . ''; - } - - // the actions for the statistics - if ($show == 'result') { - // the form - if (api_is_platform_admin() || api_is_course_admin() || api_is_course_tutor() || api_is_course_coach()) { - if ($_SESSION['export_user_fields'] == true) { - $alt = get_lang('ExportWithUserFields'); - $extra_user_fields = ''; - } else { - $alt = get_lang('ExportWithoutUserFields'); - $extra_user_fields = ''; - } - echo ''.Display::return_icon('csv.gif',get_lang('ExportAsCSV')).get_lang('ExportAsCSV').''; - echo '' . Display :: return_icon('excel.gif', get_lang('ExportAsXLS')) . get_lang('ExportAsXLS') . ''; - //echo ''.Display::return_icon('synthese_view.gif',$alt).$alt.''; - echo '' . Display :: return_icon('message_reply_forum.png', get_lang('GoBackToQuestionList')) . get_lang('GoBackToQuestionList') . ''; - echo '
'; - echo ''; - echo ''; - echo ''; - echo '
'; - echo '
'; - echo ''; - echo ''; - echo ''; - echo '
'; - //echo '
'; - //echo $extra_user_fields; - //echo '
'; - } - } -} else { - //the student view - if ($show == 'result') { - echo '' . Display :: return_icon('message_reply_forum.png', get_lang('GoBackToQuestionList')) . get_lang('GoBackToQuestionList') . ''; - } else { - echo '' . Display :: return_icon('show_test_results.gif', get_lang('Results')) . get_lang('Results') . ''; - } -} - echo ''; // closing the actions div if ($show == 'test') { diff --git a/main/exercice/exercice_submit.php b/main/exercice/exercice_submit.php index 3e7ff5822b..93e2582238 100755 --- a/main/exercice/exercice_submit.php +++ b/main/exercice/exercice_submit.php @@ -1076,7 +1076,7 @@ if (isset($exerciseId) && !empty($exerciseId)) { // I'm in a preview mode if (api_is_course_admin() && $origin != 'learnpath') { echo '
'; - echo '' . Display :: return_icon('message_reply_forum.png', get_lang('GoBackToQuestionList')) . get_lang('GoBackToQuestionList') . ''; + echo '' . Display :: return_icon('back.png', get_lang('GoBackToQuestionList')) . get_lang('GoBackToQuestionList') . ''; if ($show_quiz_edition) { echo Display :: return_icon('edit.gif', get_lang('ModifyExercise')) . '' . get_lang('ModifyExercise') . ''; } else { diff --git a/main/exercice/exercise_admin.php b/main/exercice/exercise_admin.php index 376dcf7ae1..370262eae7 100755 --- a/main/exercice/exercise_admin.php +++ b/main/exercice/exercise_admin.php @@ -184,7 +184,7 @@ if ($form -> validate()) { Display::display_header($nameTools,get_lang('Exercise')); echo ''; if ($objExercise->feedbacktype==1) diff --git a/main/exercice/hotpotatoes.php b/main/exercice/hotpotatoes.php index 48242fcbf2..8ef466b594 100755 --- a/main/exercice/hotpotatoes.php +++ b/main/exercice/hotpotatoes.php @@ -206,7 +206,7 @@ if((api_is_allowed_to_edit(null,true)) && (($finish == 0) || ($finish == 2))) Display::display_header($nameTools,get_lang('Exercise')); echo ''; if ($finish==2) //if we are in the img upload process diff --git a/main/exercice/qti2.php b/main/exercice/qti2.php old mode 100644 new mode 100755 index eead6c2354..18bb3cdbb4 --- a/main/exercice/qti2.php +++ b/main/exercice/qti2.php @@ -37,7 +37,7 @@ $is_allowedToEdit = api_is_allowed_to_edit(null, true); function ch_qti2_display_form() { $name_tools = get_lang('ImportQtiQuiz'); $form = ''; $form .= '
'; $form .= '
'.$name_tools.'
'; diff --git a/main/exercice/question_create.php b/main/exercice/question_create.php index 8e54a0adb4..49064c3c19 100755 --- a/main/exercice/question_create.php +++ b/main/exercice/question_create.php @@ -87,7 +87,7 @@ if ($form->validate()) { Display::display_header($nameTools); echo ''; // displaying the form diff --git a/main/exercice/question_pool.php b/main/exercice/question_pool.php index 215a0b862c..3b7d98a2c7 100755 --- a/main/exercice/question_pool.php +++ b/main/exercice/question_pool.php @@ -267,9 +267,9 @@ if($is_allowedToEdit) { '.Display::return_icon('message_reply_forum.png', get_lang('GoBackToQuestionList')),get_lang('GoBackToQuestionList'),''; + echo ''.Display::return_icon('back.png', get_lang('GoBackToQuestionList')),get_lang('GoBackToQuestionList'),''; /*if(!empty($fromExercise)) { - echo ''.Display::return_icon('message_reply_forum.png', get_lang('GoBackToQuestionList')),get_lang('GoBackToQuestionList'),''; + echo ''.Display::return_icon('back.png', get_lang('GoBackToQuestionList')),get_lang('GoBackToQuestionList'),''; } else { echo ''.Display::return_icon('new_test.gif'),get_lang('NewQu').''; }*/