diff --git a/main/exercice/exercise_report.php b/main/exercice/exercise_report.php index 7bdddc9f31..05031ff903 100755 --- a/main/exercice/exercise_report.php +++ b/main/exercice/exercise_report.php @@ -136,7 +136,9 @@ if (!empty($_REQUEST['export_report']) && $_REQUEST['export_report'] == '1') { //Send student email @todo move this code in a class, library if (isset($_REQUEST['comments']) && $_REQUEST['comments'] == 'update' && - ($is_allowedToEdit || $is_tutor) && $_GET['exeid'] == strval(intval($_GET['exeid']))) { + ($is_allowedToEdit || $is_tutor) && + $_GET['exeid'] == strval(intval($_GET['exeid'])) +) { $id = intval($_GET['exeid']); //filtered by post-condition $track_exercise_info = get_exercise_track_exercise_info($id); if (empty($track_exercise_info)) { diff --git a/main/inc/lib/events.lib.inc.php b/main/inc/lib/events.lib.inc.php index 18333dcdab..e8afdd9e2e 100755 --- a/main/inc/lib/events.lib.inc.php +++ b/main/inc/lib/events.lib.inc.php @@ -1486,11 +1486,11 @@ function get_all_exercises_from_lp($lp_id, $course_id) * * @param int $id * @param int $question_id - * @return str the comment + * @return string the comment */ function get_comments($exe_id, $question_id) { - $table_track_attempt = Database::get_statistic_table(TABLE_STATISTIC_TRACK_E_ATTEMPT); + $table_track_attempt = Database::get_statistic_table(TABLE_STATISTIC_TRACK_E_ATTEMPT); $sql = "SELECT teacher_comment FROM ".$table_track_attempt." WHERE exe_id='".Database::escape_string($exe_id)."' AND question_id = '".Database::escape_string($question_id)."'