Minor - format code

skala
Julio Montoya 12 years ago
parent 0a07bd1061
commit 74a4b33d2d
  1. 8
      main/exercice/question.class.php
  2. 1
      main/exercice/question_admin.inc.php

@ -1457,6 +1457,7 @@ abstract class Question
</script>';
$form->addElement('html', $js);
}
// question name
$form->addElement('text', 'questionName', get_lang('Question'), array('class' => 'span6'));
$form->addRule('questionName', get_lang('GiveQuestion'), 'required');
@ -1485,6 +1486,7 @@ abstract class Question
$form->addElement('hidden', 'myid', $my_id);
if ($this->type != MEDIA_QUESTION) {
if ($this->exercise->fastExerciseEdition == false) {
// Advanced parameters
$form->addElement('advanced_settings', '<a class="btn btn-show advanced_parameters" id="advanced_params" href="javascript://">'.get_lang('AdvancedParameters').'</a>');
@ -1496,11 +1498,13 @@ abstract class Question
$form->addElement('select', 'questionLevel', get_lang('Difficulty'), $select_level);
// Media question.
$course_medias = Question::prepare_course_media_select(api_get_course_int_id());
$form->addElement('select', 'parent_id', get_lang('AttachToMedia'), $course_medias, array('id' => 'parent_id'));
// Categories.
$categoryJS = null;
if (!empty($this->category_list)) {
$trigger = '';
foreach ($this->category_list as $category_id) {
@ -1523,6 +1527,8 @@ abstract class Question
array('id' => 'category_id')
);
// Extra fields. (Injecting question extra fields!)
$extraFields = new ExtraField('question');
$extraFields->addElements($form, $this->id);
@ -1532,6 +1538,7 @@ abstract class Question
}
}
// @todo why we need this condition??
if ($this->setDefaultQuestionValues) {
switch ($answerType) {
@ -1580,6 +1587,7 @@ abstract class Question
if ($this->setDefaultValues) {
$form->setDefaults($defaults);
}
}
/**

@ -59,6 +59,7 @@ if (is_object($objQuestion)) {
$form->freeze();
}
// Form validation
//$result = $objQuestion->allQuestionWithMediaHaveTheSameCategory($exerciseId, 100);

Loading…
Cancel
Save