mirror of
https://github.com/moodle/moodle.git
synced 2025-03-19 15:10:05 +01:00
MDL-40320 Course page: Text greyed when conditional activity available
This commit is contained in:
parent
bdd045c5ec
commit
be108c7ab0
@ -751,11 +751,20 @@ class core_course_renderer extends plugin_renderer_base {
|
||||
return $output;
|
||||
}
|
||||
$content = $mod->get_formatted_content(array('overflowdiv' => true, 'noclean' => true));
|
||||
$conditionalhidden = $this->is_cm_conditionally_hidden($mod);
|
||||
$accessiblebutdim = !$mod->visible || $conditionalhidden;
|
||||
if ($this->page->user_is_editing()) {
|
||||
// In editing mode, when an item is conditionally hidden from some users
|
||||
// we show it as greyed out.
|
||||
$conditionalhidden = $this->is_cm_conditionally_hidden($mod);
|
||||
$dim = !$mod->visible || $conditionalhidden;
|
||||
} else {
|
||||
// When not in editing mode, we only show item as hidden if it is
|
||||
// actually not available to the user
|
||||
$conditionalhidden = false;
|
||||
$dim = !$mod->uservisible;
|
||||
}
|
||||
$textclasses = '';
|
||||
$accesstext = '';
|
||||
if ($accessiblebutdim) {
|
||||
if ($dim) {
|
||||
$textclasses .= ' dimmed_text';
|
||||
if ($conditionalhidden) {
|
||||
$textclasses .= ' conditionalhidden';
|
||||
|
Loading…
x
Reference in New Issue
Block a user