diff --git a/main/exercice/exercice.php b/main/exercice/exercice.php index ecaf646488..dbca979549 100644 --- a/main/exercice/exercice.php +++ b/main/exercice/exercice.php @@ -434,7 +434,10 @@ if($show == 'test'){ - &exerciseId=" > + + &exerciseId=" > + <?php echo htmlentities(get_lang('Modify')); ?> + - <?php echo htmlentities(get_lang('Build')); ?> <?php echo htmlentities(get_lang('Modify')); ?> + <?php echo htmlentities(get_lang('Build')); ?> ')) return false;"> <?php echo htmlentities(get_lang('Delete')); ?> array('unique_answer.class.php' , 'UniqueAnswer'), MULTIPLE_ANSWER => array('multiple_answer.class.php' , 'MultipleAnswer'), @@ -73,7 +75,7 @@ abstract class Question FREE_ANSWER => array('freeanswer.class.php' , 'FreeAnswer'), HOT_SPOT => array('hotspot.class.php' , 'HotSpot') ); - + /** * constructor of the class * @@ -789,6 +791,42 @@ abstract class Question * @param the formvalidator instance */ abstract function processAnswersCreation ($form); + + + /** + * Displays the menu of question types + */ + static function display_type_menu () + { + ?> + + '; + foreach(self::$questionTypes as $i=>$a_type) + { + include_once($a_type[0]); + eval('$img = '.$a_type[1].'::$typePicture;'); + eval('$explanation = get_lang('.$a_type[1].'::$explanationLangVar);'); + + echo ' +
+ +
'; + } + echo ' +
'.get_lang('ChooseQuestionType').' :
'; + + + + + } } endif; diff --git a/main/exercice/question_list_admin.inc.php b/main/exercice/question_list_admin.inc.php index 0b2de3554a..c5e99b08fb 100644 --- a/main/exercice/question_list_admin.inc.php +++ b/main/exercice/question_list_admin.inc.php @@ -1,4 +1,4 @@ - - -                 
-
| | | | | -   -

+Question :: display_type_menu (); +?> - - diff --git a/main/exercice/unique_answer.class.php b/main/exercice/unique_answer.class.php index 04643066bd..f389085636 100644 --- a/main/exercice/unique_answer.class.php +++ b/main/exercice/unique_answer.class.php @@ -44,6 +44,9 @@ if(!class_exists('UniqueAnswer')): class UniqueAnswer extends Question { + static $typePicture = 'mcua.png'; + static $explanationLangVar = 'UniqueSelect'; + /** * Constructor */ diff --git a/main/img/fill_in_blanks.png b/main/img/fill_in_blanks.png new file mode 100644 index 0000000000..96d8afc3c9 Binary files /dev/null and b/main/img/fill_in_blanks.png differ diff --git a/main/img/hotspot.png b/main/img/hotspot.png new file mode 100644 index 0000000000..69cf630f0c Binary files /dev/null and b/main/img/hotspot.png differ diff --git a/main/img/matching.png b/main/img/matching.png new file mode 100644 index 0000000000..03ec507cb7 Binary files /dev/null and b/main/img/matching.png differ diff --git a/main/img/mcma.png b/main/img/mcma.png new file mode 100644 index 0000000000..c9ce6cdf7a Binary files /dev/null and b/main/img/mcma.png differ diff --git a/main/img/mcua.png b/main/img/mcua.png new file mode 100644 index 0000000000..82b9a14bbc Binary files /dev/null and b/main/img/mcua.png differ diff --git a/main/img/open_answer.png b/main/img/open_answer.png new file mode 100644 index 0000000000..ceeb7773a6 Binary files /dev/null and b/main/img/open_answer.png differ