mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 22:08:20 +01:00
MDL-42310 feedback mod - Enable filtering of multichoice and multichoice rated controls
Conflicts: mod/feedback/item/multichoice/lib.php mod/feedback/item/multichoicerated/lib.php Signed-off-by: Michael Milette <michael.milette@instruxmedia.com>
This commit is contained in:
parent
bbb291b7b7
commit
a059b434f7
@ -320,7 +320,7 @@ class feedback_item_multichoice extends feedback_item_base {
|
||||
echo '<label for="'. $item->typ . '_' . $item->id .'">';
|
||||
}
|
||||
echo '('.$item->label.') ';
|
||||
echo format_text($item->name.$requiredmark, true, false, false);
|
||||
echo format_text($item->name . $requiredmark, FORMAT_HTML, array('noclean' => true, 'para' => false));
|
||||
if ($item->dependitem) {
|
||||
if ($dependitem = $DB->get_record('feedback_item', array('id'=>$item->dependitem))) {
|
||||
echo ' <span class="feedback_depend">';
|
||||
@ -428,10 +428,10 @@ class feedback_item_multichoice extends feedback_item_base {
|
||||
echo '<div class="feedback_item_label_'.$align.$highlight.'">';
|
||||
if ($info->subtype == 'd') {
|
||||
echo '<label for="'. $item->typ . '_' . $item->id .'">';
|
||||
echo format_text($item->name.$requiredmark, true, false, false);
|
||||
echo format_text($item->name . $requiredmark, FORMAT_HTML, array('noclean' => true, 'para' => false));
|
||||
echo '</label>';
|
||||
} else {
|
||||
echo format_text($item->name.$requiredmark, true, false, false);
|
||||
echo format_text($item->name . $requiredmark, FORMAT_HTML, array('noclean' => true, 'para' => false));
|
||||
}
|
||||
echo '</div>';
|
||||
|
||||
@ -523,7 +523,7 @@ class feedback_item_multichoice extends feedback_item_base {
|
||||
//print the question and label
|
||||
echo '<div class="feedback_item_label_'.$align.'">';
|
||||
echo '('.$item->label.') ';
|
||||
echo format_text($item->name . $requiredmark, true, false, false);
|
||||
echo format_text($item->name . $requiredmark, FORMAT_HTML, array('noclean' => true, 'para' => false));
|
||||
echo '</div>';
|
||||
|
||||
//print the presentation
|
||||
@ -535,7 +535,7 @@ class feedback_item_multichoice extends feedback_item_base {
|
||||
foreach ($values as $val) {
|
||||
if ($val == $index) {
|
||||
echo '<div class="feedback_item_multianswer">';
|
||||
echo text_to_html($pres, true, false, false);
|
||||
echo format_text($pres, FORMAT_HTML, array('noclean' => true, 'para' => false));
|
||||
echo '</div>';
|
||||
break;
|
||||
}
|
||||
@ -547,7 +547,7 @@ class feedback_item_multichoice extends feedback_item_base {
|
||||
foreach ($presentation as $pres) {
|
||||
if ($value == $index) {
|
||||
echo $OUTPUT->box_start('generalbox boxalign'.$align);
|
||||
echo text_to_html($pres, true, false, false);
|
||||
echo format_text($pres, FORMAT_HTML, array('noclean' => true, 'para' => false));
|
||||
echo $OUTPUT->box_end();
|
||||
break;
|
||||
}
|
||||
@ -703,7 +703,7 @@ class feedback_item_multichoice extends feedback_item_base {
|
||||
</span>
|
||||
<span class="feedback_item_radiolabel_<?php echo $hv.'_'.$align;?>">
|
||||
<label for="<?php echo $inputid;?>">
|
||||
<?php echo text_to_html($radio, true, false, false);?>
|
||||
<?php echo format_text($radio, FORMAT_HTML, array('noclean' => true, 'para' => false));?>
|
||||
</label>
|
||||
</span>
|
||||
</li>
|
||||
@ -751,7 +751,7 @@ class feedback_item_multichoice extends feedback_item_base {
|
||||
</span>
|
||||
<span class="feedback_item_radiolabel_<?php echo $hv.'_'.$align;?>">
|
||||
<label for="<?php echo $inputid;?>">
|
||||
<?php echo text_to_html($check, true, false, false);?>
|
||||
<?php echo format_text($check, FORMAT_HTML, array('noclean' => true, 'para' => false));?>
|
||||
</label>
|
||||
</span>
|
||||
</li>
|
||||
@ -792,7 +792,7 @@ class feedback_item_multichoice extends feedback_item_base {
|
||||
}
|
||||
?>
|
||||
<option value="<?php echo $index;?>" <?php echo $selected;?>>
|
||||
<?php echo text_to_html($dropdown, true, false, false);?>
|
||||
<?php echo format_text($dropdown, FORMAT_HTML, array('noclean' => true, 'para' => false));?>
|
||||
</option>
|
||||
<?php
|
||||
$index++;
|
||||
|
@ -305,7 +305,7 @@ class feedback_item_multichoicerated extends feedback_item_base {
|
||||
echo '<label for="'. $item->typ . '_' . $item->id .'">';
|
||||
}
|
||||
echo '('.$item->label.') ';
|
||||
echo format_text($item->name.$requiredmark, true, false, false);
|
||||
echo format_text($item->name . $requiredmark, FORMAT_HTML, array('noclean' => true, 'para' => false));
|
||||
if ($item->dependitem) {
|
||||
if ($dependitem = $DB->get_record('feedback_item', array('id'=>$item->dependitem))) {
|
||||
echo ' <span class="feedback_depend">';
|
||||
@ -358,10 +358,10 @@ class feedback_item_multichoicerated extends feedback_item_base {
|
||||
echo '<div class="feedback_item_label_'.$align.$highlight.'">';
|
||||
if ($info->subtype == 'd') {
|
||||
echo '<label for="'. $item->typ . '_' . $item->id .'">';
|
||||
echo format_text($item->name.$requiredmark, true, false, false);
|
||||
echo format_text($item->name . $requiredmark, FORMAT_HTML, array('noclean' => true, 'para' => false));
|
||||
echo '</label>';
|
||||
} else {
|
||||
echo format_text($item->name.$requiredmark, true, false, false);
|
||||
echo format_text($item->name . $requiredmark, FORMAT_HTML, array('noclean' => true, 'para' => false));
|
||||
}
|
||||
echo '</div>';
|
||||
|
||||
@ -397,7 +397,7 @@ class feedback_item_multichoicerated extends feedback_item_base {
|
||||
//print the question and label
|
||||
echo '<div class="feedback_item_label_'.$align.'">';
|
||||
echo '('.$item->label.') ';
|
||||
echo format_text($item->name . $requiredmark, true, false, false);
|
||||
echo format_text($item->name . $requiredmark, FORMAT_HTML, array('noclean' => true, 'para' => false));
|
||||
echo '</div>';
|
||||
|
||||
//print the presentation
|
||||
@ -407,7 +407,7 @@ class feedback_item_multichoicerated extends feedback_item_base {
|
||||
if ($value == $index) {
|
||||
$item_value = explode(FEEDBACK_MULTICHOICERATED_VALUE_SEP, $line);
|
||||
echo $OUTPUT->box_start('generalbox boxalign'.$align);
|
||||
echo text_to_html($item_value[1], true, false, false);
|
||||
echo format_text($item_value[1], FORMAT_HTML, array('noclean' => true, 'para' => false));
|
||||
echo $OUTPUT->box_end();
|
||||
break;
|
||||
}
|
||||
@ -564,9 +564,9 @@ class feedback_item_multichoicerated extends feedback_item_base {
|
||||
<?php
|
||||
if ($showrating) {
|
||||
$str_rating_value = '('.$radio_value[0].') '.$radio_value[1];
|
||||
echo text_to_html($str_rating_value, true, false, false);
|
||||
echo format_text($str_rating_value, FORMAT_HTML, array('noclean' => true, 'para' => false));
|
||||
} else {
|
||||
echo text_to_html($radio_value[1], true, false, false);
|
||||
echo format_text($radio_value[1], FORMAT_HTML, array('noclean' => true, 'para' => false));
|
||||
}
|
||||
?>
|
||||
</label>
|
||||
@ -602,11 +602,11 @@ class feedback_item_multichoicerated extends feedback_item_base {
|
||||
$dropdown_value = explode(FEEDBACK_MULTICHOICERATED_VALUE_SEP, $line);
|
||||
if ($showrating) {
|
||||
echo '<option value="'.$index.'" '.$selected.'>';
|
||||
echo clean_text('('.$dropdown_value[0].') '.$dropdown_value[1]);
|
||||
echo format_text('(' . $dropdown_value[0] . ') ' . $dropdown_value[1], FORMAT_HTML, array('para' => false));
|
||||
echo '</option>';
|
||||
} else {
|
||||
echo '<option value="'.$index.'" '.$selected.'>';
|
||||
echo clean_text($dropdown_value[1]);
|
||||
echo format_text($dropdown_value[1], FORMAT_HTML, array('para' => false));
|
||||
echo '</option>';
|
||||
}
|
||||
$index++;
|
||||
|
Loading…
x
Reference in New Issue
Block a user