';
+ }
+
echo ''.$enreg['title'].' | ';
echo ''.$time.' | ';
@@ -130,26 +133,22 @@ if (!empty($course_in_session)) {
?>
-
-
-
-
- |
-
-
- |
- |
- |
- |
- 'absmiddle', 'hspace' => '3px')); ?> |
- |
- |
-
-$session) {
- echo '';
- echo ' '.api_get_session_name($key).' | ';
+
+$session) {
+ echo ''.api_get_session_name($key).'
';
+ ?>
+
+
+ |
+ |
+ |
+ 'absmiddle', 'hspace' => '3px')); ?> |
+ |
+ |
+
+ ';
+ } else {
+ echo '';
+ }
+
echo ''.$enreg['title'].' | ';
echo ''.$time.' | ';
@@ -189,9 +195,10 @@ if (!empty($course_in_session)) {
echo '';
$i = $i ? 0 : 1;
echo '
';
- }
+ }
+ echo '
';
}
- echo '
';
+
}
?>
@@ -311,7 +318,7 @@ if (!empty($course_in_session)) {
if (is_numeric($progress)) {
$progress = $progress.'%';
}
- echo $progress;
+ echo $progress;
echo "
";
diff --git a/main/inc/lib/events.lib.inc.php b/main/inc/lib/events.lib.inc.php
index ebba82b834..2ad3b0d86f 100755
--- a/main/inc/lib/events.lib.inc.php
+++ b/main/inc/lib/events.lib.inc.php
@@ -379,7 +379,6 @@ function update_event_exercice($exeid, $exo_id, $score, $weighting,$session_id,$
status = '',
start_date = '".api_get_utc_datetime($start_date)."'
WHERE exe_id = '".Database::escape_string($exeid)."'";
-
$res = @Database::query($sql);
//Deleting control time session track
@@ -438,8 +437,8 @@ function create_event_exercice($exo_id) {
$expired_date = '0000-00-00 00:00:00';
}
- $sql = "INSERT INTO $TABLETRACK_EXERCICES ( exe_user_id, exe_cours_id, expired_time_control, exe_exo_id)
- VALUES ( ".$user_id.", '".api_get_course_id()."' ,'".$expired_date."','".$exo_id."')";
+ $sql = "INSERT INTO $TABLETRACK_EXERCICES ( exe_user_id, exe_cours_id, expired_time_control, exe_exo_id, session_id)
+ VALUES ( ".$user_id.", '".api_get_course_id()."' ,'".$expired_date."','".$exo_id."','".api_get_session_id()."')";
$res = Database::query($sql);
$id= Database::insert_id();
return $id;
@@ -696,7 +695,7 @@ function get_all_exercise_event($exercise_id, $course_code, $session_id = 0) {
$exercise_id = intval($exercise_id);
$session_id = intval($session_id);
- $sql = "SELECT * FROM $TABLETRACK_EXERCICES WHERE status = '' AND exe_cours_id = '$course_code' AND exe_exo_id = '$exercise_id' AND session_id = $session_id ORDER BY exe_id";
+ $sql = "SELECT * FROM $TABLETRACK_EXERCICES WHERE status = '' AND exe_cours_id = '$course_code' AND exe_exo_id = '$exercise_id' AND session_id = $session_id AND orig_lp_id =0 AND orig_lp_item_id = 0 ORDER BY exe_id";
$res = api_sql_query($sql,__FILE__,__LINE__);
$list = array();
diff --git a/main/inc/lib/tracking.lib.php b/main/inc/lib/tracking.lib.php
index 7a6f04258c..86a8279ad3 100755
--- a/main/inc/lib/tracking.lib.php
+++ b/main/inc/lib/tracking.lib.php
@@ -759,8 +759,9 @@ class Tracking {
// Compose a filter based on optional session id
$condition_session = "";
- if (isset($session_id)) {
- $session_id = intval($session_id);
+ $session_id = intval($session_id);
+
+ if (isset($session_id)) {
if (count($lp_ids) > 0) {
$condition_session = " AND session_id = $session_id ";
} else {
@@ -1643,6 +1644,7 @@ class Tracking {
* @param string Course id
* @return float average of test
* @author isaac flores paz
+ * @deprecated get_avg_student_score should be use
*/
public static function get_average_test_scorm_and_lp ($user_id,$course_id) {
|