[svn r19788] Test improvements: adding the edit test link in preview mode for a teacher see FS#4034

skala
Julio Montoya 16 years ago
parent 0a45acb395
commit 9c3e82d940
  1. 12
      main/exercice/exercice_submit.php
  2. 11
      main/exercice/exercise_result.php

@ -1,4 +1,4 @@
<?php // $Id: exercice_submit.php 19710 2009-04-11 17:14:43Z cfasanando $
<?php // $Id: exercice_submit.php 19788 2009-04-15 15:08:52Z juliomontoya $
/*
==============================================================================
@ -42,7 +42,7 @@
* @package dokeos.exercise
* @author Olivier Brouckaert
* @author Julio Montoya multiple fill in blank option added
* @version $Id: exercice_submit.php 19710 2009-04-11 17:14:43Z cfasanando $
* @version $Id: exercice_submit.php 19788 2009-04-15 15:08:52Z juliomontoya $
*/
@ -843,6 +843,14 @@ else
<?php
}
// I'm in a preview mode
if (api_is_course_admin()) {
echo '<div class="actions">';
echo Display::return_icon('quiz.gif', get_lang('GoBackToEx')).'<a href="admin.php?'.api_get_cidreq().'&exerciseId='.$objExercise->id.'">'.get_lang('GoBackToEx').'</a>';
echo Display::return_icon('edit.gif', get_lang('ModifyExercise')).'<a href="exercise_admin.php?modifyExercise=yes&exerciseId='.$objExercise->id.'">'.get_lang('ModifyExercise').'</a>';
echo '</div>';
}
$exerciseTitle=api_parse_tex($exerciseTitle);
echo "<h3>".$exerciseTitle."</h3>";

@ -29,7 +29,7 @@
* @author Olivier Brouckaert, main author
* @author Roan Embrechts, some refactoring
* @author Julio Montoya Armas switchable fill in blank option added
* @version $Id: exercise_result.php 19761 2009-04-14 15:25:19Z juliomontoya $
* @version $Id: exercise_result.php 19788 2009-04-15 15:08:52Z juliomontoya $
*
* @todo split more code up in functions, move functions to library?
*/
@ -435,6 +435,15 @@ function display_hotspot_answer($answerId, $answer, $studentChoice, $answerComme
MAIN CODE
==============================================================================
*/
// I'm in a preview mode
if (api_is_course_admin()) {
echo '<div class="actions">';
echo Display::return_icon('quiz.gif', get_lang('GoBackToEx')).'<a href="admin.php?'.api_get_cidreq().'&exerciseId='.$objExercise->id.'">'.get_lang('GoBackToEx').'</a>';
echo Display::return_icon('edit.gif', get_lang('ModifyExercise')).'<a href="exercise_admin.php?modifyExercise=yes&exerciseId='.$objExercise->id.'">'.get_lang('ModifyExercise').'</a>';
echo '</div>';
}
$exerciseTitle=api_parse_tex($exerciseTitle);
?>

Loading…
Cancel
Save