Skip to content

Commit

Permalink
Merge branch 'wip-MDL-42310-master' of git://github.com/abgreeve/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
stronk7 committed Jan 8, 2014
2 parents 267d492 + a059b43 commit 0601a82
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 18 deletions.
18 changes: 9 additions & 9 deletions mod/feedback/item/multichoice/lib.php
Expand Up @@ -320,7 +320,7 @@ public function print_item_preview($item) {
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">';
Expand Down Expand Up @@ -428,10 +428,10 @@ public function print_item_complete($item, $value = null, $highlightrequire = fa
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>';

Expand Down Expand Up @@ -523,7 +523,7 @@ public function print_item_show_value($item, $value = null) {
//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
Expand All @@ -535,7 +535,7 @@ public function print_item_show_value($item, $value = null) {
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;
}
Expand All @@ -547,7 +547,7 @@ public function print_item_show_value($item, $value = null) {
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;
}
Expand Down Expand Up @@ -703,7 +703,7 @@ private function print_item_radio($presentation, $item, $value, $info, $align) {
</span>
<span class="feedback_item_radiolabel_<?php echo $hv.'_'.$align;?>">
<label for="<?php echo $inputid;?>">
<?php echo text_to_html($radio, true, false, false);?>&nbsp;
<?php echo format_text($radio, FORMAT_HTML, array('noclean' => true, 'para' => false));?>&nbsp;
</label>
</span>
</li>
Expand Down Expand Up @@ -751,7 +751,7 @@ private function print_item_check($presentation, $item, $value, $info, $align) {
</span>
<span class="feedback_item_radiolabel_<?php echo $hv.'_'.$align;?>">
<label for="<?php echo $inputid;?>">
<?php echo text_to_html($check, true, false, false);?>&nbsp;
<?php echo format_text($check, FORMAT_HTML, array('noclean' => true, 'para' => false));?>&nbsp;
</label>
</span>
</li>
Expand Down Expand Up @@ -792,7 +792,7 @@ private function print_item_dropdown($presentation, $item, $value, $info, $align
}
?>
<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++;
Expand Down
18 changes: 9 additions & 9 deletions mod/feedback/item/multichoicerated/lib.php
Expand Up @@ -305,7 +305,7 @@ public function print_item_preview($item) {
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">';
Expand Down Expand Up @@ -358,10 +358,10 @@ public function print_item_complete($item, $value = '', $highlightrequire = fals
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>';

Expand Down Expand Up @@ -397,7 +397,7 @@ public function print_item_show_value($item, $value = '') {
//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
Expand All @@ -407,7 +407,7 @@ public function print_item_show_value($item, $value = '') {
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;
}
Expand Down Expand Up @@ -564,9 +564,9 @@ private function print_item_radio($item, $value, $info, $align, $showrating, $li
<?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>
Expand Down Expand Up @@ -602,11 +602,11 @@ private function print_item_dropdown($item, $value, $info, $align, $showrating,
$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++;
Expand Down

0 comments on commit 0601a82

Please sign in to comment.