Skip to content

Commit

Permalink
fix add btb question
Browse files Browse the repository at this point in the history
  • Loading branch information
aragonc committed Apr 7, 2017
1 parent 43ca288 commit 5687f73
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions main/exercise/question.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1572,13 +1572,21 @@ function HideFCKEditorByInstanceName ( editorInstanceName ) {
// Categories
$tabCat = TestCategory::getCategoriesIdAndName();
$form->addElement('select', 'questionCategory', get_lang('Category'), $tabCat);


global $text;

switch ($this->type) {
case UNIQUE_ANSWER:
$form->addButton('convertAnswer', get_lang('ConvertToMultipleAnswer'), 'dot-circle-o', 'default');
$buttonGroup = array();
$buttonGroup[] = $form->addButton('convertAnswer', get_lang('ConvertToMultipleAnswer'), 'dot-circle-o', 'default', null, null, null, true);
$buttonGroup[] = $form->addButtonSave($text, 'submitQuestion', true);
$form->addGroup($buttonGroup);
break;
case MULTIPLE_ANSWER:
$form->addButton('convertAnswer', get_lang('ConvertToUniqueAnswer'), 'check-square-o', 'default');
$buttonGroup = array();
$buttonGroup[] = $form->addButton('convertAnswer', get_lang('ConvertToUniqueAnswer'), 'check-square-o', 'default');
$buttonGroup[] = $form->addButtonSave($text, 'submitQuestion', true);
$form->addGroup($buttonGroup);
break;
}

Expand Down

4 comments on commit 5687f73

@jmontoyaa
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change breaks travis exercise test please check it maybe with @aragonc or @ywarnier

features/toolExercise.feature:45
features/toolExercise.feature:65
features/toolExercise.feature:238
features/toolExercise.feature:285

https://travis-ci.org/chamilo/chamilo-lms/jobs/219852454

@ywarnier
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We added a button with the same name as the one at the end of the form to make it less confusing to the user. That's probably the issue here (behat finds 2 buttons that match). Will look at it with @aragonc tomorrow.

@jmontoyaa
Copy link
Member

@jmontoyaa jmontoyaa commented on 5687f73 Apr 11, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AngelFQC
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed here b565733

Please sign in to comment.