[svn r10897] change again the question creation menu

repair the question pool
skala
Eric Marguin 18 years ago
parent c0cd3ead19
commit 83c0214fc8
  1. 18
      main/exercice/question.class.php
  2. 3
      main/exercice/question_list_admin.inc.php
  3. 11
      main/exercice/question_pool.php

@ -22,7 +22,7 @@
* File containing the Question class.
* @package dokeos.exercise
* @author Olivier Brouckaert
* @version $Id: question.class.php 10878 2007-01-24 17:05:21Z elixir_inter $
* @version $Id: question.class.php 10897 2007-01-25 12:45:10Z elixir_inter $
*/
@ -794,7 +794,7 @@ abstract class Question
*/
static function display_type_menu ()
{
global $exerciseId;
echo '<div>';
foreach(self::$questionTypes as $i=>$a_type)
{
@ -819,7 +819,19 @@ abstract class Question
</div>';
}
echo '</div><div style="clear:both"></div>';
echo '
<div id="answer_type_'.$i.'" style="float: left; width:120px; text-align:center">
<a href="question_pool.php?fromExercise='.$exerciseId.'">
<div>
<img src="'.api_get_path(WEB_IMG_PATH).'/questionsdb.gif" />
</div>
<div>
'.get_lang('GetExistingQuestion').'
</div>
</a>
</div>
</div>
<div style="clear:both"></div>';
}
}

@ -22,7 +22,7 @@
* Code library for HotPotatoes integration.
* @package dokeos.exercise
* @author
* @version $Id: question_list_admin.inc.php 10789 2007-01-18 19:18:27Z pcool $
* @version $Id: question_list_admin.inc.php 10897 2007-01-25 12:45:10Z elixir_inter $
*/
@ -79,7 +79,6 @@ if($deleteQuestion)
unset($objQuestionTmp);
}
echo '<a href="question_pool.php?fromExercise='.$exerciseId.'">'.get_lang('GetExistingQuestion').'</a>';
Question :: display_type_menu ();
?>

@ -24,18 +24,19 @@
* One question can be in several exercises
* @package dokeos.exercise
* @author Olivier Brouckaert
* @version $Id: question_pool.php 10793 2007-01-19 09:17:15Z elixir_inter $
* @version $Id: question_pool.php 10897 2007-01-25 12:45:10Z elixir_inter $
*/
// name of the language file that needs to be included
$language_file='exercice';
include('../inc/global.inc.php');
include('exercise.class.php');
include('question.class.php');
include('answer.class.php');
include('../inc/global.inc.php');
$this_section=SECTION_COURSES;
@ -127,8 +128,8 @@ if($is_allowedToEdit)
<option value="0">-- <?php echo get_lang('AllExercises'); ?> --</option>
<option value="-1" <?php if($exerciseId == -1) echo 'selected="selected"'; ?>>-- <?php echo get_lang('OrphanQuestions'); ?> --</option>
<?php
$sql="SELECT id,title FROM `$TBL_EXERCICES` WHERE id<>'$fromExercise' ORDER BY id";
<?php
$sql="SELECT id,title FROM $TBL_EXERCICES WHERE id<>'$fromExercise' ORDER BY id";
$result=api_sql_query($sql,__FILE__,__LINE__);
// shows a list-box allowing to filter questions

Loading…
Cancel
Save