[svn r9945] coding standards and __LINE__ and __FILE__ fix

skala
Patrick Cool 19 years ago
parent 6513566fda
commit 3e507fd587
  1. 50
      main/exercice/addlimits.php

@ -190,33 +190,31 @@ Attempts :
* @todo shouldn't this be moved to the part above (around line 111: action handling)
*/
if (isset($_POST['ok']))
{
$exercise_id = $_POST['exe_id'];
if ($_POST['limit']==1)
{
$minutes = $_POST['minutes'];
$query = "update `".$TBL_EXERCICES."` set ques_time_limit= $minutes where id= $exercise_id";
api_sql_query($query,__FILE__,__LINE__);
}
else
{
$exercise_id = $_POST['exe_id'];
if ($_POST['limit']==1)
{
$minutes = $_POST['minutes'];
$query = "update `".$TBL_EXERCICES."` set ques_time_limit= $minutes where id= $exercise_id";
api_sql_query($query,_FILE_,_LINE_);
}
else
{
$query = "update `".$TBL_EXERCICES."` set ques_time_limit= 0 where id= $exercise_id";
api_sql_query($query,_FILE_,_LINE_);
}
$query = "update `".$TBL_EXERCICES."` set ques_time_limit= 0 where id= $exercise_id";
api_sql_query($query,__FILE__,__LINE__);
}
if ($_POST['attempt']==1)
{
$attempts = $_POST['attempts'];
$query = "update `".$TBL_EXERCICES."` set num_attempts = $attempts where id= $exercise_id";
api_sql_query($query,_FILE_,_LINE_);
}
else
{
$query = "update`".$TBL_EXERCICES."` set num_attempts = 0 where id= $exercise_id";
api_sql_query($query,_FILE_,_LINE_);
}
{
$attempts = $_POST['attempts'];
$query = "update `".$TBL_EXERCICES."` set num_attempts = $attempts where id= $exercise_id";
api_sql_query($query,__FILE__,__LINE__);
}
else
{
$query = "update`".$TBL_EXERCICES."` set num_attempts = 0 where id= $exercise_id";
api_sql_query($query,__FILE__,__LINE__);
}
}
?>

Loading…
Cancel
Save