pull/3173/head
Alex Aragón 7 years ago
commit 23ac2b2875
  1. 17
      app/Resources/public/css/base.css
  2. 2
      main/admin/dashboard_add_users_to_user.php
  3. 6
      main/exercise/UniqueAnswerImage.php
  4. 2
      main/exercise/hotspot.class.php
  5. 421
      main/exercise/hotspot_admin.inc.php
  6. 6
      main/exercise/unique_answer.class.php
  7. 2
      main/inc/lib/api.lib.php
  8. 2
      main/inc/lib/dashboard.lib.php
  9. 2
      main/inc/lib/pear/HTML/QuickForm/select.php
  10. 2
      main/session/add_courses_to_session.php
  11. 2
      main/session/session_category_list.php

@ -7363,9 +7363,12 @@ div#chat-remote-video video {
padding-left: 15px;
}
#toolbar-agenda .show-tick {
#toolbar-agenda .bootstrap-select {
width: 420px;
}
#toolbar-agenda .bootstrap-select .dropdown-menu li a {
margin-left: 0px;
}
.files-table {
padding-top: 20px;
@ -10049,6 +10052,14 @@ ul.dropdown-menu.inner > li > a {
grid-row-gap: 16px;
grid-template-columns: repeat(2, 1fr);
}
#question_admin_form .bootstrap-select .dropdown-menu li a span.text {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
width: 100%;
}
.summary-course .course .title{
font-weight: bold;
font-size: 14px;
@ -10113,6 +10124,7 @@ ul.dropdown-menu.inner > li > a {
.summary-course .list-info .text-color{
color: #0A649F;
}
<<<<<<< HEAD
.question-result h3{
margin-top: 0;
margin-bottom: 10px;
@ -10131,6 +10143,9 @@ ul.dropdown-menu.inner > li > a {
display: inline-block;
font-weight: bold;
}
=======
>>>>>>> 23bad83a744482179b36bc14365ed0c1bef45a2c
@media (min-width: 768px) {
.clear-rows-6-4-3 .col-sm-6:nth-child(2n+1) {
clear: left;

@ -441,7 +441,7 @@ $result = Database::query($sql);
<?php if ($add_type == 'multiple') {
?>
<p><?php echo get_lang('FirstLetterUser'); ?></p>
<select class="selectpicker show-tick form-control" name="firstLetterUser" onchange = "xajax_search_users(this.value,'multiple')">
<select class="selectpicker form-control" name="firstLetterUser" onchange = "xajax_search_users(this.value,'multiple')">
<option value="%">--</option>
<?php echo Display::get_alphabet_options($firstLetterUser); ?>
</select>

@ -97,10 +97,8 @@ class UniqueAnswerImage extends UniqueAnswer
}
$question = Question::read($questionid);
$selectQuestion[$questionid] = 'Q'.$key.' :'.cut(
$question->selectTitle(),
20
);
$questionTitle = strip_tags($question->selectTitle());
$selectQuestion[$questionid] = "Q$key: $questionTitle";
}
}

@ -81,7 +81,7 @@ class HotSpot extends Question
parent::processCreation($form, $exercise);
if (!empty($fileInfo['tmp_name'])) {
$result = $this->uploadPicture($fileInfo);
$result = $this->uploadPicture($fileInfo['tmp_name']);
if ($result) {
$this->save($exercise);

@ -9,9 +9,9 @@ use ChamiloSession as Session;
*
* @package chamilo.exercise
*
* @author Toon Keppens
* @author Toon Keppens
*/
$modifyAnswers = (int) $_GET['hotspotadmin'];
$modifyAnswers = (int)$_GET['hotspotadmin'];
if (!is_object($objQuestion)) {
$objQuestion = Question::read($modifyAnswers);
@ -576,30 +576,27 @@ if (isset($modifyAnswers)) {
echo Display::return_message($msgErr, 'normal'); //main API
}
$hotspot_admin_url = api_get_path(WEB_CODE_PATH).'exercise/admin.php?'.api_get_cidreq().'&hotspotadmin='.$modifyAnswers.'&exerciseId='.$exerciseId; ?>
$hotspot_admin_url = api_get_path(WEB_CODE_PATH).'exercise/admin.php?'.api_get_cidreq().'&'
.http_build_query(['hotspotadmin' => $modifyAnswers, 'exerciseId' => $exerciseId]); ?>
<form method="post" action="<?php echo $hotspot_admin_url; ?>" class="form-horizontal" id="frm_exercise"
name="frm_exercise">
<div class="form-group">
<div class="col-sm-12">
<?php if ($answerType == HOT_SPOT_DELINEATION) {
?>
<?php if ($answerType == HOT_SPOT_DELINEATION) { ?>
<button type="submit" class="btn btn-danger" name="lessAnswers" value="lessAnswers">
<em class="fa fa-trash"></em> <?php echo get_lang('LessOAR'); ?>
</button>
<button type="submit" class="btn btn-primary" name="moreOARAnswers" value="moreOARAnswers">
<em class="fa fa-plus"></em> <?php echo get_lang('MoreOAR'); ?>
</button>
<?php
} else {
?>
<?php } else { ?>
<button type="submit" class="btn btn-danger" name="lessAnswers" value="lessAnswers">
<em class="fa fa-trash"></em> <?php echo get_lang('LessHotspots'); ?>
</button>
<button type="submit" class="btn btn-primary" name="moreAnswers" value="moreAnswers">
<em class="fa fa-plus"></em> <?php echo get_lang('MoreHotspots'); ?>
</button>
<?php
} ?>
<?php } ?>
<button type="submit" class="btn btn-primary" name="submitAnswers" value="submitAnswers">
<em class="fa fa-save"></em> <?php echo get_lang('AddQuestionToExercise'); ?>
</button>
@ -628,73 +625,74 @@ if (isset($modifyAnswers)) {
<tbody>
<?php
$list = new LearnpathList(api_get_user_id());
// Loading list of LPs
$flat_list = $list->get_flat_list();
for ($i = 1; $i <= $nbrAnswers; $i++) {
// is an delineation
if ($answerType == HOT_SPOT_DELINEATION) {
$option_lp = '';
// setting the LP
$isSelected = false;
foreach ($flat_list as $id => $details) {
$selected = '';
if (isset($lp[$i]) && $id == $lp[$i]) {
$isSelected = true;
$selected = 'selected="selected"';
}
$option_lp .= '<option value="'.$id.'" '.$selected.'>'.$details['lp_name'].'</option>';
}
// Loading list of LPs
$flat_list = $list->get_flat_list();
for ($i = 1; $i <= $nbrAnswers; $i++) {
// is an delineation
if ($answerType == HOT_SPOT_DELINEATION) {
$option_lp = '';
// setting the LP
$isSelected = false;
foreach ($flat_list as $id => $details) {
$selected = '';
if (isset($lp[$i]) && $id == $lp[$i]) {
$isSelected = true;
$selected = 'selected="selected"';
}
$option_lp .= '<option value="'.$id.'" '.$selected.'>'.$details['lp_name'].'</option>';
}
if ($isSelected) {
$option_lp = '<option value="0">'.get_lang('SelectTargetLP').'</option>'.$option_lp;
} else {
$option_lp = '<option value="0" selected="selected" >'.get_lang('SelectTargetLP')
if ($isSelected) {
$option_lp = '<option value="0">'.get_lang('SelectTargetLP').'</option>'.$option_lp;
} else {
$option_lp = '<option value="0" selected="selected" >'.get_lang('SelectTargetLP')
.'</option>'.$option_lp;
}
}
// Feedback SELECT
$question_list = $objExercise->selectQuestionList();
$option_feed = '';
$option_feed .= '<option value="0">'.get_lang('SelectTargetQuestion').'</option>';
// Feedback SELECT
$question_list = $objExercise->selectQuestionList();
$option_feed = '';
$option_feed .= '<option value="0">'.get_lang('SelectTargetQuestion').'</option>';
foreach ($question_list as $key => $questionid) {
$selected = '';
$question = Question::read($questionid);
$val = 'Q'.$key.' :'.substrwords($question->selectTitle(), ICON_SIZE_SMALL);
foreach ($question_list as $key => $questionid) {
$selected = '';
$question = Question::read($questionid);
$questionTitle = strip_tags($question->selectTitle());
$val = "Q$key: $questionTitle";
if (isset($select_question[$i]) && $questionid == $select_question[$i]) {
$selected = 'selected="selected"';
}
if (isset($select_question[$i]) && $questionid == $select_question[$i]) {
$selected = 'selected="selected"';
}
$option_feed .= '<option value="'.$questionid.'" '.$selected.' >'.$val.'</option>';
}
$option_feed .= '<option value="'.$questionid.'" '.$selected.' >'.$val.'</option>';
}
if (isset($select_question[$i]) && $select_question[$i] == -1) {
$option_feed .= '<option value="-1" selected="selected" >'.get_lang('ExitTest').'</option>';
} else {
$option_feed .= '<option value="-1">'.get_lang('ExitTest').'</option>';
}
if (isset($select_question[$i]) && $select_question[$i] == -1) {
$option_feed .= '<option value="-1" selected="selected" >'.get_lang('ExitTest').'</option>';
} else {
$option_feed .= '<option value="-1">'.get_lang('ExitTest').'</option>';
}
//-------- IF it is a delineation
if ($_SESSION['tmp_answers']['hotspot_type'][$i] == 'delineation') {
$option1 = $option2 = $option3 = '';
for ($k = 1; $k <= 100; $k++) {
$selected1 = $selected2 = $selected3 = '';
if ($k == $threadhold1[$i]) {
$selected1 = 'selected="selected"';
}
if ($k == $threadhold2[$i]) {
$selected2 = 'selected="selected"';
}
if ($k == $threadhold3[$i]) {
$selected3 = 'selected="selected"';
}
$option1 .= '<option '.$selected1.' >'.$k.' % </option>';
$option2 .= '<option '.$selected2.' >'.$k.' % </option>';
$option3 .= '<option '.$selected3.'>'.$k.' %</option>';
} ?>
//-------- IF it is a delineation
if ($_SESSION['tmp_answers']['hotspot_type'][$i] == 'delineation') {
$option1 = $option2 = $option3 = '';
for ($k = 1; $k <= 100; $k++) {
$selected1 = $selected2 = $selected3 = '';
if ($k == $threadhold1[$i]) {
$selected1 = 'selected="selected"';
}
if ($k == $threadhold2[$i]) {
$selected2 = 'selected="selected"';
}
if ($k == $threadhold3[$i]) {
$selected3 = 'selected="selected"';
}
$option1 .= '<option '.$selected1.' >'.$k.' % </option>';
$option2 .= '<option '.$selected2.' >'.$k.' % </option>';
$option3 .= '<option '.$selected3.'>'.$k.' %</option>';
} ?>
<tr>
<td>
<span class="fa fa-square fa-2x" aria-hidden="true"
@ -734,16 +732,13 @@ if (isset($modifyAnswers)) {
<input type="hidden" name="hotspot_coordinates[<?php echo $i; ?>]" value="<?php
echo empty($hotspot_coordinates[$i]) ? '0;0|0|0' : $hotspot_coordinates[$i]; ?>"/>
</td>
<?php if ($objExercise->selectFeedbackType() == EXERCISE_FEEDBACK_TYPE_DIRECT) {
?>
<?php if ($objExercise->selectFeedbackType() == EXERCISE_FEEDBACK_TYPE_DIRECT) { ?>
<td>
<div class="checkbox">
<p>
<label>
<input type="checkbox" class="checkbox"
name="<?php echo 'try['.$i; ?>]" <?php if ($try[$i] == 1) {
echo 'checked';
} ?> />
<input type="checkbox" class="checkbox" name="<?php echo 'try['.$i; ?>]"
<?php if ($try[$i] == 1) { echo 'checked'; } ?> />
<?php echo get_lang('TryAgain'); ?>
</label>
</p>
@ -766,14 +761,14 @@ if (isset($modifyAnswers)) {
</select>
</p>
</td>
<?php
} else {
?>
<?php
} else {
?>
<td> &nbsp;</td>
<?php
}
} elseif (false) {
?>
}
} elseif (false) {
?>
<tr>
<th colspan="2"><?php echo get_lang('IfNoError'); ?></th>
<th colspan="3"><?php echo get_lang('Feedback'); ?></th>
@ -794,7 +789,7 @@ if (isset($modifyAnswers)) {
style="width: 100%"><?php echo Security::remove_XSS($comment[$i]); ?></textarea>
</td>
<?php if ($objExercise->selectFeedbackType() == EXERCISE_FEEDBACK_TYPE_DIRECT) {
?>
?>
<td>
<table>
<tr>
@ -805,8 +800,8 @@ if (isset($modifyAnswers)) {
<input type="checkbox" class="checkbox"
name="<?php echo 'try['
.$i; ?>]" <?php if ($try[$i] == 1) {
echo 'checked';
} ?> />
echo 'checked';
} ?> />
<?php echo get_lang('TryAgain'); ?>
</label>
</p>
@ -833,37 +828,37 @@ if (isset($modifyAnswers)) {
</tr>
</table>
</td>
<?php
} else {
?>
<?php
} else {
?>
<td>&nbsp;</td>
<?php
} ?>
<?php
} ?>
</tr>
<?php
} elseif ($_SESSION['tmp_answers']['hotspot_type'][$i] == 'oar') {
// if it's an OAR
if ($i == 2) {
?>
} elseif ($_SESSION['tmp_answers']['hotspot_type'][$i] == 'oar') {
// if it's an OAR
if ($i == 2) {
?>
<tr>
<th width="5">&nbsp;<?php /* echo get_lang('Hotspot'); */ ?></th>
<th><?php echo get_lang('OAR'); ?>*</th>
<?php if ($objExercise->selectFeedbackType() == EXERCISE_FEEDBACK_TYPE_DIRECT) {
?>
?>
<th colspan="2"><?php echo get_lang('Comment'); ?></th>
<th><?php if ($answerType == HOT_SPOT_DELINEATION) {
echo get_lang('Scenario');
} ?></th>
<?php
} else {
?>
echo get_lang('Scenario');
} ?></th>
<?php
} else {
?>
<th colspan="3"><?php echo get_lang('Comment'); ?></th>
<?php
} ?>
<?php
} ?>
<th>&nbsp;</th>
</tr>
<?php
} ?>
<?php
} ?>
<tr>
<td>
<span class="fa fa-square fa-2x" aria-hidden="true"
@ -871,31 +866,24 @@ if (isset($modifyAnswers)) {
</td>
<td>
<input class="form-control" type="text" name="reponse[<?php echo $i; ?>]"
value="<?php echo isset($reponse[$i])
? Security::remove_XSS($reponse[$i])
: ''; ?>"/>
value="<?php echo isset($reponse[$i]) ? Security::remove_XSS($reponse[$i]) : ''; ?>"/>
</td>
<td colspan="2" align="left">
<textarea class="form-control" wrap="virtual" rows="3" cols="25"
name="comment[<?php echo $i; ?>]"
style="width: 100%"><?php echo isset($comment[$i])
? Security::remove_XSS($comment[$i]) : ''; ?></textarea>
style="width: 100%"><?php echo isset($comment[$i]) ? Security::remove_XSS($comment[$i]) : ''; ?></textarea>
<input type="hidden" name="hotspot_type[<?php echo $i; ?>]" value="oar"/>
<input type="hidden" name="hotspot_coordinates[<?php echo $i; ?>]" value="<?php
echo empty($hotspot_coordinates[$i]) ? '0;0|0|0' : $hotspot_coordinates[$i]; ?>"/>
</td>
<?php if ($objExercise->selectFeedbackType() == EXERCISE_FEEDBACK_TYPE_DIRECT) {
?>
?>
<td>
<div class="checkbox">
<p>
<label>
<input type="checkbox" class="checkbox"
name="<?php echo 'try['.$i; ?>]" <?php if (isset($try[$i])
&& $try[$i] == 1
) {
echo 'checked';
} ?> />
name="<?php echo 'try['.$i; ?>]" <?php if (isset($try[$i]) && $try[$i] == 1) { echo 'checked'; } ?> />
<?php echo get_lang('TryAgain'); ?>
</label>
</p>
@ -918,17 +906,17 @@ if (isset($modifyAnswers)) {
</select>
</p>
</td>
<?php
} else {
?>
<?php
} else {
?>
<td>&nbsp;</td>
<?php
}
}
//end if is delineation
} else {
$commentValue = isset($comment[$i]) ? $comment[$i] : null;
$responseValue = isset($reponse[$i]) ? $reponse[$i] : null; ?>
}
}
//end if is delineation
} else {
$commentValue = isset($comment[$i]) ? $comment[$i] : null;
$responseValue = isset($reponse[$i]) ? $reponse[$i] : null; ?>
<tr>
<td>
<span class="fa fa-square fa-2x" style="color: <?php echo $hotspot_colors[$i]; ?>"
@ -940,31 +928,29 @@ if (isset($modifyAnswers)) {
</td>
<?php
$form = new FormValidator('form_'.$i);
$config = [
$config = [
'ToolbarSet' => 'TestProposedAnswer',
'cols-size' => [0, 12, 0],
];
$form->addHtmlEditor('comment['.$i.']', null, false, false, $config);
$renderer = $form->defaultRenderer();
$form_template = '{content}';
$renderer->setFormTemplate($form_template);
$element_template = '
{label}
{element}';
$renderer->setElementTemplate($element_template);
$form->setDefaults(['comment['.$i.']' => $commentValue]);
$return = $form->returnForm(); ?>
$form->addHtmlEditor('comment['.$i.']', null, false, false, $config);
$renderer = $form->defaultRenderer();
$form_template = '{content}';
$renderer->setFormTemplate($form_template);
$element_template = '{label} {element}';
$renderer->setElementTemplate($element_template);
$form->setDefaults(['comment['.$i.']' => $commentValue]);
$return = $form->returnForm(); ?>
<td colspan="2" align="left"><?php echo $return; ?></td>
<?php
} ?>
<?php
} ?>
<td>
<?php
if ($answerType == HOT_SPOT_DELINEATION) {
if ($_SESSION['tmp_answers']['hotspot_type'][$i] == 'oar') {
?>
<input type="hidden" name="weighting[<?php echo $i; ?>]" class="form-cotrol" value="0"/>
<?php
<?php
} else {
?>
<input class="form-control" type="text" name="weighting[<?php echo $i; ?>]"
@ -972,8 +958,8 @@ if (isset($modifyAnswers)) {
<?php
}
}
if ($answerType == HOT_SPOT) {
?>
if ($answerType == HOT_SPOT) {
?>
<input class="form-control" type="text" name="weighting[<?php echo $i; ?>]"
value="<?php echo isset($weighting[$i]) ? $weighting[$i] : 10; ?>"/>
<input type="hidden" name="hotspot_coordinates[<?php echo $i; ?>]"
@ -982,67 +968,64 @@ if (isset($modifyAnswers)) {
: $hotspot_coordinates[$i]; ?>"/>
<input type="hidden" name="hotspot_type[<?php echo $i; ?>]"
value="<?php echo empty($hotspot_type[$i]) ? 'square' : $hotspot_type[$i]; ?>"/>
<?php
} ?>
<?php
} ?>
</td>
</tr>
<?php
}
}
$list = new LearnpathList(api_get_user_id());
$flat_list = $list->get_flat_list();
$option_lp = '';
$isSelected = false;
foreach ($flat_list as $id => $details) {
$selected = '';
if (isset($lp_noerror) && $id == $lp_noerror) {
$selected = 'selected="selected"';
$isSelected = true;
}
$option_lp .= '<option value="'.$id.'" '.$selected.'>'.$details['lp_name'].'</option>';
}
$list = new LearnpathList(api_get_user_id());
$flat_list = $list->get_flat_list();
$option_lp = '';
$isSelected = false;
foreach ($flat_list as $id => $details) {
$selected = '';
if (isset($lp_noerror) && $id == $lp_noerror) {
$selected = 'selected="selected"';
$isSelected = true;
}
$option_lp .= '<option value="'.$id.'" '.$selected.'>'.$details['lp_name'].'</option>';
}
if ($isSelected) {
$option_lp = '<option value="0">'.get_lang('SelectTargetLP').'</option>'.$option_lp;
} else {
$option_lp = '<option value="0" selected="selected" >'.get_lang('SelectTargetLP').'</option>'
if ($isSelected) {
$option_lp = '<option value="0">'.get_lang('SelectTargetLP').'</option>'.$option_lp;
} else {
$option_lp = '<option value="0" selected="selected" >'.get_lang('SelectTargetLP').'</option>'
.$option_lp;
}
}
// Feedback SELECT
$question_list = $objExercise->selectQuestionList();
$option_feed = '';
$option_feed .= '<option value="0">'.get_lang('SelectTargetQuestion').'</option>';
$selectQuestionNoError = isset($selectQuestionNoError) ? $selectQuestionNoError : null;
foreach ($question_list as $key => $questionid) {
$selected = '';
$question = Question::read($questionid);
$val = 'Q'.$key.' :'.substrwords($question->selectTitle(), ICON_SIZE_SMALL);
if ($questionid == $selectQuestionNoError) {
$selected = 'selected="selected"';
}
$option_feed .= '<option value="'.$questionid.'" '.$selected.' >'.$val.'</option>';
}
if ($selectQuestionNoError == -1) {
$option_feed .= '<option value="-1" selected="selected" >'.get_lang('ExitTest').'</option>';
} else {
$option_feed .= '<option value="-1">'.get_lang('ExitTest').'</option>';
}
// Feedback SELECT
$question_list = $objExercise->selectQuestionList();
$option_feed = '';
$option_feed .= '<option value="0">'.get_lang('SelectTargetQuestion').'</option>';
$selectQuestionNoError = isset($selectQuestionNoError) ? $selectQuestionNoError : null;
foreach ($question_list as $key => $questionid) {
$selected = '';
$question = Question::read($questionid);
$questionTitle = $question->selectTitle();
$val = "Q$key: $questionTitle";
if ($questionid == $selectQuestionNoError) {
$selected = 'selected="selected"';
}
$option_feed .= '<option value="'.$questionid.'" '.$selected.' >'.$val.'</option>';
}
if ($selectQuestionNoError == -1) {
$option_feed .= '<option value="-1" selected="selected" >'.get_lang('ExitTest').'</option>';
} else {
$option_feed .= '<option value="-1">'.get_lang('ExitTest').'</option>';
}
if ($answerType == HOT_SPOT_DELINEATION) {
?>
if ($answerType == HOT_SPOT_DELINEATION) {
?>
<tr>
<th colspan="2"><?php echo get_lang('IfNoError'); ?></th>
<?php if ($objExercise->selectFeedbackType() == EXERCISE_FEEDBACK_TYPE_DIRECT) {
?>
<?php if ($objExercise->selectFeedbackType() == EXERCISE_FEEDBACK_TYPE_DIRECT) { ?>
<th colspan="2"><?php echo get_lang('Feedback'); ?></th>
<th><?php echo get_lang('Scenario'); ?></th>
<?php
} else {
?>
<?php } else { ?>
<th colspan="3"><?php echo get_lang('Feedback'); ?></th>
<?php
} ?>
<?php } ?>
<th>&nbsp;</th>
</tr>
<tr>
@ -1051,18 +1034,15 @@ if (isset($modifyAnswers)) {
</td>
<td colspan="2" align="left">
<textarea class="form-control" wrap="virtual" rows="3" cols="25"
name="comment_noerror"><?php echo Security::remove_XSS($comment_noerror); ?></textarea>
name="comment_noerror"><?php echo Security::remove_XSS($comment_noerror); ?></textarea>
</td>
<?php if ($objExercise->selectFeedbackType() == EXERCISE_FEEDBACK_TYPE_DIRECT) {
?>
<?php if ($objExercise->selectFeedbackType() == EXERCISE_FEEDBACK_TYPE_DIRECT) { ?>
<td>
<div class="checkbox">
<p>
<label>
<input type="checkbox" class="checkbox"
name="try_noerror" <?php if ($try_noerror == 1) {
echo 'checked';
} ?> />
name="try_noerror" <?php if ($try_noerror == 1) { echo 'checked'; } ?> />
<?php echo get_lang('TryAgain'); ?>
</label>
</p>
@ -1085,15 +1065,11 @@ if (isset($modifyAnswers)) {
</p>
</td>
<td>&nbsp;</td>
<?php
} else {
?>
<?php } else { ?>
<td colspan="2">&nbsp;</td>
<?php
} ?>
<?php } ?>
</tr>
<?php
} ?>
<?php } ?>
</tbody>
</table>
</div>
@ -1101,34 +1077,29 @@ if (isset($modifyAnswers)) {
<div class="col-xs-12">
<?php
$swf_loaded = $answerType == HOT_SPOT_DELINEATION ? 'hotspot_delineation_admin' : 'hotspot_admin';
$height = 450;
$relPath = api_get_path(WEB_CODE_PATH); ?>
<div id="hotspot-container" class="center-block">
</div>
$height = 450;
$relPath = api_get_path(WEB_CODE_PATH); ?>
<div id="hotspot-container" class="center-block"></div>
</div>
</div>
</form>
<script>
$(function() {
<?php if ($answerType == HOT_SPOT_DELINEATION) {
?>
new DelineationQuestion({
questionId: <?php echo $modifyAnswers; ?>,
selector: '#hotspot-container',
for: 'admin',
relPath: '<?php echo $relPath; ?>'
});
<?php
} else {
?>
new HotspotQuestion({
questionId: <?php echo $modifyAnswers; ?>,
selector: '#hotspot-container',
for: 'admin',
relPath: '<?php echo $relPath; ?>'
});
<?php
} ?>
$(function () {
<?php if ($answerType == HOT_SPOT_DELINEATION) { ?>
new DelineationQuestion({
questionId: <?php echo $modifyAnswers; ?>,
selector: '#hotspot-container',
for: 'admin',
relPath: '<?php echo $relPath; ?>'
});
<?php } else { ?>
new HotspotQuestion({
questionId: <?php echo $modifyAnswers; ?>,
selector: '#hotspot-container',
for: 'admin',
relPath: '<?php echo $relPath; ?>'
});
<?php } ?>
});
</script>
<?php

@ -104,10 +104,8 @@ class UniqueAnswer extends Question
continue;
}
$question = Question::read($questionid);
$select_question[$questionid] = 'Q'.$key.' :'.cut(
$question->selectTitle(),
20
);
$questionTitle = strip_tags($question->selectTitle());
$select_question[$questionid] = "Q$key: $questionTitle";
}
}
$select_question[-1] = get_lang('ExitTest');

@ -4629,7 +4629,7 @@ function api_get_languages_combo($name = 'language')
$languages = $language_list['name'];
$folder = $language_list['folder'];
$ret .= '<select name="'.$name.'" id="language_chosen" class="selectpicker show-tick form-control">';
$ret .= '<select name="'.$name.'" id="language_chosen" class="selectpicker form-control">';
foreach ($languages as $key => $value) {
if ($folder[$key] == $default) {
$selected = ' selected="selected"';

@ -395,7 +395,7 @@ class DashboardManager
$html .= '<td>'.$block['name'].'</td>';
$html .= '<td>'.$block['description'].'</td>';
$html .= '<td>
<select class="selectpicker show-tick form-control" name="columns['.$block['id'].']">
<select class="selectpicker form-control" name="columns['.$block['id'].']">
<option value="1" '.(isset($user_block_data[$block['id']]) && $user_block_data[$block['id']]['column'] == 1 ? 'selected' : '').' >1</option>
<option value="2" '.(isset($user_block_data[$block['id']]) && $user_block_data[$block['id']]['column'] == 2 ? 'selected' : '').' >2</option>
</select>

@ -79,7 +79,7 @@ class HTML_QuickForm_select extends HTML_QuickForm_element
if (empty($attributes)) {
$attributes = []; // Initialize variable to avoid warning in PHP 7.1
}
$attributes['class'] = $oldClass . ' selectpicker show-tick form-control';
$attributes['class'] = $oldClass . ' selectpicker form-control';
$attributes['data-live-search'] = 'true';
if (isset($attributes['disable_js']) && $attributes['disable_js']) {

@ -251,7 +251,7 @@ unset($Courses);
<div class="code-course">
<?php echo get_lang('FirstLetterCourse'); ?> :
<select name="firstLetterCourse" onchange = "xajax_search_courses(this.value,'multiple', <?php echo $sessionId; ?>)" class="selectpicker show-tick form-control">
<select name="firstLetterCourse" onchange = "xajax_search_courses(this.value,'multiple', <?php echo $sessionId; ?>)" class="selectpicker form-control">
<option value="%">--</option>
<?php
echo Display :: get_alphabet_options();

@ -279,7 +279,7 @@ if (isset($_GET['search']) && $_GET['search'] === 'advanced') {
</div>
</div>
<div class="col-sm-6">
<select class="selectpicker show-tick form-control" name="action">
<select class="selectpicker form-control" name="action">
<option value="delete_off_session" selected="selected">
<?php echo get_lang('DeleteSelectedSessionCategory'); ?>
</option>

Loading…
Cancel
Save