mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 21:49:15 +01:00
Merge branch 'MDL-33426-master' of git://github.com/sammarshallou/moodle
This commit is contained in:
commit
4fcc358e12
@ -1470,9 +1470,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;
|
||||
@ -1684,9 +1683,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
|
||||
|
@ -386,12 +386,13 @@ foreach($progress as $user) {
|
||||
($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) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user