Adding origin= learnpath in exercise/result.php

skala
Julio Montoya 12 years ago
parent c41ac109dc
commit 58855d7e4f
  1. 10
      main/exercice/exercise.class.php
  2. 2
      main/newscorm/lp_view.php

@ -3210,9 +3210,11 @@ class Exercise {
exercise_attempt($questionScore, 0, $quesId, $exeId, 0, $this->id);
}
} elseif ($answerType == MATCHING) {
foreach ($matching as $j => $val) {
exercise_attempt($questionScore, $val, $quesId, $exeId, $j, $this->id);
}
if (isset($matching)) {
foreach ($matching as $j => $val) {
exercise_attempt($questionScore, $val, $quesId, $exeId, $j, $this->id);
}
}
} elseif ($answerType == FREE_ANSWER) {
$answer = $choice;
exercise_attempt($questionScore, $answer, $quesId, $exeId, 0, $this->id);
@ -3239,7 +3241,7 @@ class Exercise {
if ($propagate_neg == 0 && $questionScore < 0) {
$questionScore = 0;
}
if ($saved_results) {
$stat_table = Database :: get_statistic_table(TABLE_STATISTIC_TRACK_E_EXERCICES);
$sql_update = 'UPDATE ' . $stat_table . ' SET exe_result = exe_result + ' . floatval($questionScore) . ' WHERE exe_id = ' . $exeId;

@ -252,7 +252,7 @@ if ($type_quiz && !empty($_REQUEST['exeId']) && isset($lp_id) && isset($_GET['lp
if (intval($_GET['fb_type']) > 0) {
$src = 'blank.php?msg=exerciseFinished';
} else {
$src = api_get_path(WEB_CODE_PATH).'exercice/result.php?id='.$safe_exe_id;
$src = api_get_path(WEB_CODE_PATH).'exercice/result.php?origin=learnpath&id='.$safe_exe_id;
if ($debug) error_log('Calling URL: '.$src);
}
$autostart = 'false';

Loading…
Cancel
Save