[svn r16123] Minor - get_comment function typo

skala
Julio Montoya 17 years ago
parent 58c5930e59
commit 1d9aafd7d5
  1. 11
      main/exercice/exercise_show.php

@ -185,16 +185,17 @@ function getFCK(vals,marksid){
<?php <?php
/** /**
* Enter description here... * This function gets the comments of an exercise
* *
* @param unknown_type $id * @param int $id
* @param unknown_type $question_id * @param int $question_id
* @return unknown * @return str the comment
*/ */
function get_comments($id,$question_id) function get_comments($id,$question_id)
{ {
global $TBL_TRACK_ATTEMPT; global $TBL_TRACK_ATTEMPT;
$sql = "select teacher_comment from ".$TBL_TRACK_ATTEMPT." where exe_id='".Database::escape_string($id and question_id)."' = '".Database::escape_string($question_id)."' order by question_id"; //$sql = "select teacher_comment from ".$TBL_TRACK_ATTEMPT." where exe_id='".Database::escape_string($id and question_id)."' = '".Database::escape_string($question_id)."' order by question_id";
$sql = "select teacher_comment from ".$TBL_TRACK_ATTEMPT." where exe_id='".Database::escape_string($id)."' and question_id = '".Database::escape_string($question_id)."' order by question_id";
$sqlres = api_sql_query($sql, __FILE__, __LINE__); $sqlres = api_sql_query($sql, __FILE__, __LINE__);
$comm = mysql_result($sqlres,0,"teacher_comment"); $comm = mysql_result($sqlres,0,"teacher_comment");
return $comm; return $comm;

Loading…
Cancel
Save