Browse Source

Parse course fullname with format_string()

so that filters are applied (such as multilingual filter).
develop_fields
jordifontseca 10 years ago
parent
commit
876548ee4a
  1. 2
      apply.php
  2. 4
      lib.php
  3. 2
      manage.php

2
apply.php

@ -61,7 +61,7 @@ echo '</tr>';
foreach ( $enrols as $enrol ) {
$picture = get_user_picture($enrol->userid);
echo '<tr><td><input type="checkbox" name="enrolid[]" value="' . $enrol->id . '"></td>';
echo '<td>' . $enrol->course . '</td>';
echo '<td>' . format_string($enrol->course) . '</td>';
echo '<td>' . $OUTPUT->render($picture) . '</td>';
echo '<td>'.$enrol->firstname . ' ' . $enrol->lastname.'</td>';
echo '<td>' . $enrol->email . '</td>';

4
lib.php

@ -203,7 +203,7 @@ function sendCancelMail($info){
global $CFG;
$apply_setting = $DB->get_records_sql("select name,value from ".$CFG->prefix."config_plugins where plugin='enrol_apply'");
$replace = array('firstname'=>$info->firstname,'content'=>$info->coursename);
$replace = array('firstname'=>$info->firstname,'content'=>format_string($info->coursename));
$body = $apply_setting['cancelmailcontent']->value;
$body = updateMailContent($body,$replace);
$contact = get_admin();
@ -215,7 +215,7 @@ function sendConfirmMail($info){
global $CFG;
$apply_setting = $DB->get_records_sql("select name,value from ".$CFG->prefix."config_plugins where plugin='enrol_apply'");
$replace = array('firstname'=>$info->firstname,'content'=>$info->coursename);
$replace = array('firstname'=>$info->firstname,'content'=>format_string($info->coursename));
$body = $apply_setting['confirmmailcontent']->value;
$body = updateMailContent($body,$replace);
$contact = get_admin();

2
manage.php

@ -50,7 +50,7 @@ echo '<th class="header" scope="col">' . get_string ( 'applydate', 'enrol_apply'
echo '</tr>';
foreach ( $enrols as $enrol ) {
echo '<tr><td><input type="checkbox" name="enrolid[]" value="' . $enrol->id . '"></td>';
echo '<td>' . $enrol->course . '</td>';
echo '<td>' . format_string($enrol->course) . '</td>';
echo '<td>' . $enrol->firstname . ' ' . $enrol->lastname . '</td>';
echo '<td>' . $enrol->email . '</td>';
echo '<td>' . date ( "Y-m-d", $enrol->timecreated ) . '</td></tr>';

Loading…
Cancel
Save