MDL-20601 added missing covnersion of url placeholders

This commit is contained in:
Petr Skoda 2010-02-07 12:58:25 +00:00
parent 0139ec3fe6
commit 6597e6b7ae
2 changed files with 9 additions and 3 deletions

View file

@ -222,9 +222,12 @@ while ($section <= $course->numsections) {
echo get_string('notavailable').'</div>';
} else {
echo '<div class="summary">';
$summaryformatoptions->noclean = true;
if ($thissection->summary) {
echo format_text($thissection->summary, FORMAT_HTML, $summaryformatoptions);
$coursecontext = get_context_instance(CONTEXT_COURSE, $course->id);
$summarytext = file_rewrite_pluginfile_urls($thissection->summary, 'pluginfile.php', $coursecontext->id, 'course_section', $thissection->id);
$summaryformatoptions = new object();
$summaryformatoptions->noclean = true;
echo format_text($summarytext, FORMAT_HTML, $summaryformatoptions);
} else {
echo '&nbsp;';
}

View file

@ -216,8 +216,11 @@
echo $OUTPUT->heading($currenttext.$weekperiod, 3, 'weekdates');
echo '<div class="summary">';
$coursecontext = get_context_instance(CONTEXT_COURSE, $course->id);
$summarytext = file_rewrite_pluginfile_urls($thissection->summary, 'pluginfile.php', $coursecontext->id, 'course_section', $thissection->id);
$summaryformatoptions = new object();
$summaryformatoptions->noclean = true;
echo format_text($thissection->summary, FORMAT_HTML, $summaryformatoptions);
echo format_text($summarytext, FORMAT_HTML, $summaryformatoptions);
if ($PAGE->user_is_editing() && has_capability('moodle/course:update', get_context_instance(CONTEXT_COURSE, $course->id))) {
echo ' <a title="'.$streditsummary.'" href="editsection.php?id='.$thissection->id.'">'.