diff --git a/main/exercice/exercice.php b/main/exercice/exercice.php
index 3ba17bff20..5e523acc1d 100644
--- a/main/exercice/exercice.php
+++ b/main/exercice/exercice.php
@@ -139,7 +139,7 @@ a.invisible:hover
-->
';
-if ($show=='result' && $_REQUEST['comments']=='update' && $is_allowedToEdit)
+if ($show=='result' && $_REQUEST['comments']=='update' && ($is_allowedToEdit || $is_courseTutor))
{
$id = $_GET['exeid'];
$emailid = $_GET['emailid'];
@@ -809,18 +809,18 @@ if($_configuration['tracking_enabled'])
-
+
|
|
|
|
- |
+ |
$_user['user_id'] clause has been removed
@@ -870,7 +870,7 @@ if($_configuration['tracking_enabled'])
echo '';
- if($is_allowedToEdit)
+ if($is_allowedToEdit || $is_courseTutor)
{
$user = $results[$i][0];
echo ''.$user.' | ';
@@ -878,7 +878,7 @@ if($_configuration['tracking_enabled'])
echo ''.$test.' | ';
echo ''.format_locale_date(get_lang('dateTimeFormatLong'),$results[$i][4]).' | ';
echo ''.$res.' / '.$results[$i][3].' | ';
- echo ''.($is_allowedToEdit?"".get_lang("Edit")."":"".get_lang('Show')."").' | ';
+ echo ''.($is_allowedToEdit || $is_courseTutor?"".get_lang("Edit")."":"".get_lang('Show')."").' | ';
echo '
';
}
}
diff --git a/main/exercice/exercise_show.php b/main/exercice/exercise_show.php
index a78c4c3d08..3df07edd2f 100644
--- a/main/exercice/exercise_show.php
+++ b/main/exercice/exercise_show.php
@@ -102,7 +102,7 @@ if ( empty ( $questionList ) ) {
if ( empty ( $objExercise ) ) {
$objExercise = $_SESSION['objExercise'];
}
-$is_allowedToEdit=api_is_allowed_to_edit();
+$is_allowedToEdit=api_is_allowed_to_edit() || $is_courseTutor;
$nameTools=get_lang('CorrectTest');
if($origin=='user_course')
@@ -306,7 +306,7 @@ function display_hotspot_answer($answerId, $answer, $studentChoice, $answerComme
$exerciseTitle=api_parse_tex($test);
$exerciseDexcription=mysql_result($result,0,1);
-$user_restriction = api_is_allowed_to_edit() ? '' : "AND user_id=".intval($_user['user_id'])." ";
+$user_restriction = $is_allowedToEdit ? '' : "AND user_id=".intval($_user['user_id'])." ";
$query = "select * from ".$TBL_TRACK_ATTEMPT." as attempts
INNER JOIN ".$TBL_TRACK_EXERCICES." as stats_exercices ON stats_exercices.exe_id=attempts.exe_id
INNER JOIN ".$TBL_EXERCICE_QUESTION." as quizz_rel_questions ON quizz_rel_questions.exercice_id=stats_exercices.exe_exo_id AND quizz_rel_questions.question_id = attempts.question_id
diff --git a/main/inc/local.inc.php b/main/inc/local.inc.php
index 16972fe693..04b551a342 100644
--- a/main/inc/local.inc.php
+++ b/main/inc/local.inc.php
@@ -667,7 +667,7 @@ if ((isset($uidReset) && $uidReset) || (isset($cidReset) && $cidReset)) // sessi
$_courseUser['role'] = 'Professor';
$is_courseMember = true;
$is_courseTutor = true;
- $is_courseAdmin = true;
+ $is_courseAdmin = false;
$is_courseCoach = true;
api_session_register('_courseUser');