[svn r10719] update exercises in lp

skala
Eric Marguin 19 years ago
parent 77606689f4
commit cffdef7028
  1. 32
      main/exercice/exercise_result.php
  2. 4
      main/inc/lib/events.lib.inc.php

@ -1,4 +1,4 @@
<?php // $Id: exercise_result.php 10621 2007-01-09 08:50:29Z elixir_inter $
<?php // $Id: exercise_result.php 10719 2007-01-15 08:56:03Z elixir_inter $
/*
==============================================================================
Dokeos - elearning and course management software
@ -152,7 +152,35 @@ if ($origin != 'learnpath')
}
else
{
?> <link rel="stylesheet" type="text/css" href="<?php echo api_get_path(WEB_CODE_PATH); ?>css/default.css"> <?php
if(empty($charset))
{
$charset = 'ISO-8859-15';
}
header('Content-Type: text/html; charset='. $charset);
@$document_language = Database::get_language_isocode($language_interface);
if(empty($document_language))
{
//if there was no valid iso-code, use the english one
$document_language = 'en';
}
/*
* HTML HEADER
*/
?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<?php echo $document_language; ?>" lang="<?php echo $document_language; ?>">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
</head>
<body>
<link rel="stylesheet" type="text/css" href="<?php echo api_get_path(WEB_CODE_PATH); ?>css/frames.css" />
}

@ -479,6 +479,7 @@ function event_exercice($exo_id, $score, $weighting)
'".$weighting."',
FROM_UNIXTIME(".$reallyNow.")
)";
/* SEE WHAT WE DO WITH THAT
$tbl_learnpath_user = Database::get_course_table(TABLE_LEARNPATH_USER);
if ($origin == 'learnpath')
{
@ -489,6 +490,7 @@ function event_exercice($exo_id, $score, $weighting)
$sql2 = "update $tbl_learnpath_user set score='$score' where (user_id=$user_id and learnpath_id='$learnpath_id' and learnpath_item_id='$learnpath_item_id')";
$res2 = api_sql_query($sql2,__FILE__,__LINE__);
}
*/
$res = api_sql_query($sql,__FILE__,__LINE__);
//$mysql_query($sql);
//return 0;
@ -539,6 +541,7 @@ function exercise_attempt($score,$answer,$quesId,$exeId,$j)
'".$j."'
)";
/* SEE WHAT WE DO WITH THAT
$tbl_learnpath_user = Database::get_course_table(TABLE_LEARNPATH_USER);
if ($origin == 'learnpath')
{
@ -549,6 +552,7 @@ function exercise_attempt($score,$answer,$quesId,$exeId,$j)
$sql2 = "update $tbl_learnpath_user set score='$score' where (user_id=$user_id and learnpath_id='$learnpath_id' and learnpath_item_id='$learnpath_item_id')";
$res2 = api_sql_query($sql2,__FILE__,__LINE__);
}
*/
//$res = api_sql_query($sql,__FILE__,__LINE__);
$res = mysql_query($sql) or die(mysql_error());
//return 0;

Loading…
Cancel
Save