[svn r10801] repair exercises

skala
Eric Marguin 18 years ago
parent 86ecdc419a
commit 2269374ac4
  1. 10
      main/exercice/exercice.php
  2. 2
      main/exercice/hotspot_actionscript.as.php
  3. 2
      main/exercice/hotspot_actionscript_admin.as.php
  4. 2
      main/exercice/hotspot_answers.as.php

@ -24,7 +24,7 @@
* @author Olivier Brouckaert, original author
* @author Denes Nagy, HotPotatoes integration
* @author Wolfgang Schneider, code/html cleanup
* @version $Id: exercice.php 10794 2007-01-19 09:47:04Z elixir_julian $
* @version $Id: exercice.php 10801 2007-01-19 14:07:20Z elixir_inter $
*/
@ -717,7 +717,7 @@ if($_configuration['tracking_enabled'])
$res = api_sql_query($qry,__FILE__,__LINE__);
$tot = mysql_result($res,0,'tot');
$totquery = "update $TBL_TRACK_EXERCICES set exe_result = $tot where exe_Id=$id";
$totquery = "update `$TBL_TRACK_EXERCICES` set exe_result = $tot where exe_Id=$id";
api_sql_query($totquery, __FILE__, __LINE__);
}
@ -741,7 +741,7 @@ if($_configuration['tracking_enabled'])
$tot += $row ['marks'];
}
$totquery = "update $TBL_TRACK_EXERCICES set exe_result = $tot where exe_Id=$id";
$totquery = "update `$TBL_TRACK_EXERCICES` set exe_result = $tot where exe_Id=$id";
api_sql_query($totquery, __FILE__, __LINE__);
$subject = "Examsheet viewed/corrected/commented by teacher";
@ -825,7 +825,7 @@ $message = "<p>You attempt for the test #test# has been viewed/commented/correct
//AND exe_user_id <> $_user['user_id'] clause has been removed
$sql="SELECT CONCAT(`lastname`,' ',`firstname`),`ce`.`title`, `te`.`exe_result` ,
`te`.`exe_weighting`, UNIX_TIMESTAMP(`te`.`exe_date`),`te`.`exe_Id`,email
FROM $TBL_EXERCICES AS ce , $TBL_TRACK_EXERCICES AS te, $TBL_USER AS user
FROM $TBL_EXERCICES AS ce , `$TBL_TRACK_EXERCICES` AS te, $TBL_USER AS user
WHERE `te`.`exe_exo_id` = `ce`.`id` AND `user_id`=`te`.`exe_user_id` AND `te`.`exe_cours_id`='$_cid'
ORDER BY `te`.`exe_cours_id` ASC, `ce`.`title` ASC, `te`.`exe_date`ASC";
@ -839,7 +839,7 @@ $message = "<p>You attempt for the test #test# has been viewed/commented/correct
else
{ // get only this user's results
$sql="SELECT '',`ce`.`title`, `te`.`exe_result` , `te`.`exe_weighting`, UNIX_TIMESTAMP(`te`.`exe_date`),`te`.`exe_Id`
FROM $TBL_EXERCICES AS ce , $TBL_TRACK_EXERCICES AS te
FROM $TBL_EXERCICES AS ce , `$TBL_TRACK_EXERCICES` AS te
WHERE `te`.`exe_exo_id` = `ce`.`id` AND `te`.`exe_user_id`='".$_user['user_id']."' AND `te`.`exe_cours_id`='$_cid'
ORDER BY `te`.`exe_cours_id` ASC, `ce`.`title` ASC, `te`.`exe_date`ASC";

@ -47,7 +47,7 @@ $courseCode = $_course['sysCode'];
$coursePath = $_course['path'];
// Query db for answers
$sql = "SELECT id, answer, hotspot_coordinates, hotspot_type, ponderation FROM `$TBL_ANSWERS` WHERE question_id = '$questionId' ORDER BY id";
$sql = "SELECT id, answer, hotspot_coordinates, hotspot_type, ponderation FROM $TBL_ANSWERS WHERE question_id = '$questionId' ORDER BY id";
$result = api_sql_query($sql,__FILE__,__LINE__);
// Init

@ -50,7 +50,7 @@ $courseCode = $_course['sysCode'];
$coursePath = $_course['path'];
// Query db for answers
//$sql = "SELECT id, answer, hotspot_coordinates, hotspot_type, ponderation FROM `$TBL_ANSWERS` WHERE question_id = '$questionId' ORDER BY id";
//$sql = "SELECT id, answer, hotspot_coordinates, hotspot_type, ponderation FROM $TBL_ANSWERS WHERE question_id = '$questionId' ORDER BY id";
//$result = api_sql_query($sql,__FILE__,__LINE__);
// Init

@ -49,7 +49,7 @@ $courseCode = $_course['sysCode'];
$coursePath = $_course['path'];
// Query db for answers
$sql = "SELECT id, answer, hotspot_coordinates, hotspot_type FROM `$TBL_ANSWERS` WHERE question_id = '$questionId' ORDER BY id";
$sql = "SELECT id, answer, hotspot_coordinates, hotspot_type FROM $TBL_ANSWERS WHERE question_id = '$questionId' ORDER BY id";
$result = api_sql_query($sql,__FILE__,__LINE__);
// Init

Loading…
Cancel
Save