diff --git a/main/exercice/exercice.php b/main/exercice/exercice.php
index 7ff62edf25..acfd327b55 100644
--- a/main/exercice/exercice.php
+++ b/main/exercice/exercice.php
@@ -1,4 +1,4 @@
-'.round(($res/($results[$i][3]!=0?$results[$i][3]:1))*100,2).'% ('.$res.' / '.$results[$i][3].')';
// Is hard to read this!!
-
+ /*
echo '
'.(($is_allowedToEdit||$is_tutor)?
"".
(($revised)?get_lang('Edit'):get_lang('Qualify'))."".
((api_is_platform_admin() || $is_tutor)?' - '.get_lang('Delete').'':'')
.(($is_allowedToEdit)?' - '.get_lang('ViewHistoryChange').'':'')
:(($revised)?"".get_lang('Show')."":'')).' | ';
-
- /*
+ */
+
echo '';
- if ($is_allowedToEdit||$is_tutor) {
- echo "";
- if ($revised)
+ if ($is_allowedToEdit||$is_tutor) {
+ if ($revised) {
+ echo "";
echo get_lang('Edit');
- else
- echo get_lang('Qualify');
+ } else {
+ echo "";
+ echo get_lang('Qualify');
+ }
echo "";
if (api_is_platform_admin() || $is_tutor)
@@ -1196,7 +1198,7 @@ if ($_configuration['tracking_enabled'] && ($show == 'result') )
echo ' '.get_lang('NoResultsYet');
}
echo ' | ';
- */
+
echo '';
diff --git a/main/exercice/exercise_show.php b/main/exercice/exercise_show.php
index 893d4f7b33..f4e1c2596f 100644
--- a/main/exercice/exercise_show.php
+++ b/main/exercice/exercise_show.php
@@ -4,7 +4,7 @@
*
* @package dokeos.exercise
* @author Julio Montoya Armas Added switchable fill in blank option added
-* @version $Id: exercise_show.php 19979 2009-04-22 17:12:35Z cfasanando $
+* @version $Id: exercise_show.php 20074 2009-04-24 14:31:45Z juliomontoya $
*
* @todo remove the debug code and use the general debug library
* @todo use the Database:: functions
@@ -31,7 +31,14 @@ define('MATCHING', 4);
define('FREE_ANSWER', 5);
define('HOTSPOT', 6);
-api_protect_course_script();
+if ( empty ( $origin ) ) {
+ $origin = $_REQUEST['origin'];
+}
+
+if ($origin == 'learnpath')
+ api_protect_course_script();
+else
+ api_protect_course_script(true);
// Database table definitions
$TBL_EXERCICE_QUESTION = Database::get_course_table(TABLE_QUIZ_TEST_QUESTION);
@@ -45,13 +52,12 @@ $TBL_TRACK_ATTEMPT = Database::get_statistic_table(TABLE_STATISTIC_TRACK_E_ATTE
$dsp_percent = false;
$debug=0;
+
if($debug>0) {
echo str_repeat(' ',0).'Entered exercise_result.php'."
\n";var_dump($_POST);
}
// general parameters passed via POST/GET
-if ( empty ( $origin ) ) {
- $origin = $_REQUEST['origin'];
-}
+
if ( empty ( $learnpath_id ) ) {
$learnpath_id = $_REQUEST['learnpath_id'];
}
@@ -86,6 +92,10 @@ if ( empty ( $exeId ) ) {
$exeId = $_REQUEST['id'];
}
+if ( empty ( $action ) ) {
+ $action = $_GET['action'];
+}
+
$is_allowedToEdit=api_is_allowed_to_edit() || $is_courseTutor;
$nameTools=get_lang('CorrectTest');
@@ -130,11 +140,14 @@ $id = $_REQUEST['id'];