Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'MDL-33426-m22' of git://github.com/sammarshallou/moodle…

… into MOODLE_22_STABLE
  • Loading branch information...
commit 54bf19763eef86ec5d14d4a3fa19e62e6aa9b851 2 parents c47951f + 383fc1f
@stronk7 stronk7 authored
Showing with 7 additions and 6 deletions.
  1. +5 −5 course/lib.php
  2. +2 −1  report/progress/index.php
View
10 course/lib.php
@@ -1515,9 +1515,8 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
// 2. the activity has dates set which do not include current, or
// 3. the activity has any other conditions set (regardless of whether
// current user meets them)
- $canviewhidden = has_capability(
- 'moodle/course:viewhiddenactivities',
- get_context_instance(CONTEXT_MODULE, $mod->id));
+ $modcontext = context_module::instance($mod->id);
+ $canviewhidden = has_capability('moodle/course:viewhiddenactivities', $modcontext);
$accessiblebutdim = false;
if ($canviewhidden) {
$accessiblebutdim = !$mod->visible;
@@ -1733,9 +1732,10 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
}
if ($completionicon) {
$imgsrc = $OUTPUT->pix_url('i/completion-'.$completionicon);
- $imgalt = s(get_string('completion-alt-'.$completionicon, 'completion', $mod->name));
+ $formattedname = format_string($mod->name, true, array('context' => $modcontext));
+ $imgalt = get_string('completion-alt-' . $completionicon, 'completion', $formattedname);
if ($completion == COMPLETION_TRACKING_MANUAL && !$isediting) {
- $imgtitle = s(get_string('completion-title-'.$completionicon, 'completion', $mod->name));
+ $imgtitle = get_string('completion-title-' . $completionicon, 'completion', $formattedname);
$newstate =
$completiondata->completionstate==COMPLETION_COMPLETE
? COMPLETION_INCOMPLETE
View
3  report/progress/index.php
@@ -388,12 +388,13 @@ function csv_quote($value) {
($activity->completion==COMPLETION_TRACKING_AUTOMATIC ? 'auto' : 'manual').
'-'.$completiontype;
+ $modcontext = context_module::instance($activity->id);
$describe = get_string('completion-' . $completiontype, 'completion');
$a=new StdClass;
$a->state=$describe;
$a->date=$date;
$a->user=fullname($user);
- $a->activity=strip_tags($activity->name);
+ $a->activity = format_string($activity->name, true, array('context' => $modcontext));
$fulldescribe=get_string('progress-title','completion',$a);
if ($csv) {
Please sign in to comment.
Something went wrong with that request. Please try again.