Fixing exercise option: feedback type

skala
Julio Montoya 14 years ago
parent e7fe585196
commit a9e2cd7d24
  1. 5
      main/exercice/exercise.class.php
  2. 3
      main/exercice/exercise_result.php
  3. 1
      main/exercice/exercise_show.php

@ -1658,7 +1658,8 @@ class Exercise {
* @return string html code * @return string html code
*/ */
function manage_answer($exeId, $questionId, $choice, $from = 'exercise_show', $exerciseResultCoordinates = array(), $saved_results = true, $from_database = false, $show_result = true) { function manage_answer($exeId, $questionId, $choice, $from = 'exercise_show', $exerciseResultCoordinates = array(), $saved_results = true, $from_database = false, $show_result = true) {
global $_configuration; global $_configuration, $feedback_type;
$questionId = intval($questionId); $questionId = intval($questionId);
$exeId = intval($exeId); $exeId = intval($exeId);
$TBL_TRACK_ATTEMPT = Database::get_statistic_table(TABLE_STATISTIC_TRACK_E_ATTEMPT); $TBL_TRACK_ATTEMPT = Database::get_statistic_table(TABLE_STATISTIC_TRACK_E_ATTEMPT);
@ -1673,6 +1674,7 @@ class Exercise {
$answerType = $objQuestionTmp->selectType(); $answerType = $objQuestionTmp->selectType();
$quesId = $objQuestionTmp->selectId(); $quesId = $objQuestionTmp->selectId();
$extra = $objQuestionTmp->extra; $extra = $objQuestionTmp->extra;
//Extra information of the question //Extra information of the question
if (!empty($extra)){ if (!empty($extra)){
$extra = explode(':', $extra); $extra = explode(':', $extra);
@ -2188,6 +2190,7 @@ class Exercise {
} // end switch Answertype } // end switch Answertype
global $origin; global $origin;
if ($show_result) { if ($show_result) {
if ($from == 'exercise_result') { if ($from == 'exercise_result') {

@ -58,7 +58,7 @@ $main_course_user_table = Database::get_main_table(TABLE_MAIN_COURSE_USER);
//temp values to move to admin settings //temp values to move to admin settings
$dsp_percent = false; //false to display total score as absolute values $dsp_percent = false; //false to display total score as absolute values
//debug param. 0: no display - 1: debug display //debug param. 0: no display - 1: debug display
$debug=1; $debug=0;
if($debug>0){error_log('Entered exercise_result.php: '.print_r($_POST,1));} if($debug>0){error_log('Entered exercise_result.php: '.print_r($_POST,1));}
// general parameters passed via POST/GET // general parameters passed via POST/GET
@ -153,6 +153,7 @@ if (api_is_course_admin() && $origin != 'learnpath') {
} }
$exerciseTitle=text_filter($objExercise->selectTitle()); $exerciseTitle=text_filter($objExercise->selectTitle());
$feedback_type = $objExercise->feedbacktype;
//show exercise title //show exercise title
if($origin != 'learnpath') {?> if($origin != 'learnpath') {?>

@ -94,6 +94,7 @@ if (empty($objExercise)) {
$objExercise = new Exercise(); $objExercise = new Exercise();
$objExercise->read($exercise_id); $objExercise->read($exercise_id);
} }
$feedback_type = $objExercise->feedbacktype;
//If is not valid //If is not valid
$session_control_key = get_session_time_control_key($exercise_id); $session_control_key = get_session_time_control_key($exercise_id);

Loading…
Cancel
Save