MDL-49543 badges: Add decription format and backup/restore

Signed-off-by: Yuliya Bozhko <[email protected]>
This commit is contained in:
Yuliya Bozhko
2015-03-24 09:22:47 +13:00
parent 0b6ba27a04
commit fffeb03fe7
10 changed files with 53 additions and 15 deletions
+3 -3
View File
@@ -721,7 +721,7 @@ class core_badges_renderer extends plugin_renderer_base {
$overall = $badge->criteria[BADGE_CRITERIA_TYPE_OVERALL];
if (!$short && !empty($overall->description)) {
$overalldescr = $this->output->box(
format_text($overall->description, FORMAT_HTML, array('context' => $badge->get_context())),
format_text($overall->description, $overall->descriptionformat, array('context' => $badge->get_context())),
'criteria-description'
);
}
@@ -745,7 +745,7 @@ class core_badges_renderer extends plugin_renderer_base {
$c = reset($badge->criteria);
if (!$short && !empty($c->description)) {
$overalldescr = $this->output->box(
format_text($c->description, FORMAT_HTML, array('context' => $badge->get_context())),
format_text($c->description, $c->descriptionformat, array('context' => $badge->get_context())),
'criteria-description'
);
}
@@ -762,7 +762,7 @@ class core_badges_renderer extends plugin_renderer_base {
$criteriadescr = '';
if (!$short && !empty($c->description)) {
$criteriadescr = $this->output->box(
format_text($c->description, FORMAT_HTML, array('context' => $badge->get_context())),
format_text($c->description, $c->descriptionformat, array('context' => $badge->get_context())),
'criteria-description'
);
}