[svn r16751] When creating an attempt in track_e_exercises now we save the session_id if exists.

skala
Julio Montoya 16 years ago
parent ddc8320a75
commit 4352fbac72
  1. 5
      main/exercice/exercise_result.php
  2. 6
      main/inc/lib/events.lib.inc.php

@ -29,7 +29,7 @@
* @author Olivier Brouckaert, main author
* @author Roan Embrechts, some refactoring
* @author Julio Montoya Armas switchable fill in blank option added
* @version $Id: exercise_result.php 16694 2008-11-07 16:53:10Z dperales $
* @version $Id: exercise_result.php 16751 2008-11-14 21:41:05Z juliomontoya $
*
* @todo split more code up in functions, move functions to library?
*/
@ -1081,7 +1081,8 @@ $exerciseTitle=api_parse_tex($exerciseTitle);
if($_configuration['tracking_enabled'])
{
// Updates the empty exercise
update_event_exercice($exeId, $objExercise->selectId(),$totalScore,$totalWeighting,$answer,$question_id);
//update_event_exercice($exeId, $objExercise->selectId(),$totalScore,$totalWeighting,$answer,$question_id);
update_event_exercice($exeId, $objExercise->selectId(),$totalScore,$totalWeighting,api_get_session_id());
}
if($objExercise->results_disabled)

@ -1,4 +1,4 @@
<?php // $Id: events.lib.inc.php 16694 2008-11-07 16:53:10Z dperales $
<?php // $Id: events.lib.inc.php 16751 2008-11-14 21:41:05Z juliomontoya $
/* See license terms in /dokeos_license.txt */
/**
==============================================================================
@ -417,11 +417,12 @@ function event_link($link_id)
* @param exo_id ( id in courseDb exercices table )
* @param result ( score @ exercice )
* @param weighting ( higher score )
* @param session_id
* @author Sebastien Piraux <piraux_seb@hotmail.com>
* @author Julio Montoya <gugli100@gmail.com>
* @desc Record result of user when an exercice was done
*/
function update_event_exercice($exeid,$exo_id, $score, $weighting)
function update_event_exercice($exeid,$exo_id, $score, $weighting,$session_id)
{
if ($exeid!='')
{
@ -431,6 +432,7 @@ function update_event_exercice($exeid,$exo_id, $score, $weighting)
exe_exo_id = '".$exo_id."',
exe_result = '".$score."',
exe_weighting = '".$weighting."',
session_id = '".$session_id."',
exe_date= FROM_UNIXTIME(".$reallyNow."),status = '', data_tracking=''
WHERE exe_id = '".$exeid."'";
$res = @api_sql_query($sql,__FILE__,__LINE__);

Loading…
Cancel
Save