mirror of
https://github.com/moodle/moodle.git
synced 2025-01-31 12:45:04 +01:00
Merge branch 'wip-mdl-36736' of git://github.com/rajeshtaneja/moodle
This commit is contained in:
commit
8ca70aff14
@ -1694,17 +1694,20 @@ function print_section($course, $section, $mods, $modnamesused, $absolute=false,
|
||||
if (!$mod->uservisible) {
|
||||
echo '<div class="availabilityinfo">'.$mod->availableinfo.'</div>';
|
||||
} else if ($canviewhidden && !empty($CFG->enableavailability)) {
|
||||
$visibilityclass = '';
|
||||
if (!$mod->visible) {
|
||||
$visibilityclass = 'accesshide';
|
||||
}
|
||||
$ci = new condition_info($mod);
|
||||
$fullinfo = $ci->get_full_information();
|
||||
if($fullinfo) {
|
||||
echo '<div class="availabilityinfo '.$visibilityclass.'">'.get_string($mod->showavailability
|
||||
? 'userrestriction_visible'
|
||||
: 'userrestriction_hidden','condition',
|
||||
$fullinfo).'</div>';
|
||||
// Don't add availability information if user is not editing and activity is hidden.
|
||||
if ($mod->visible || $PAGE->user_is_editing()) {
|
||||
$hidinfoclass = '';
|
||||
if (!$mod->visible) {
|
||||
$hidinfoclass = 'hide';
|
||||
}
|
||||
$ci = new condition_info($mod);
|
||||
$fullinfo = $ci->get_full_information();
|
||||
if($fullinfo) {
|
||||
echo '<div class="availabilityinfo '.$hidinfoclass.'">'.get_string($mod->showavailability
|
||||
? 'userrestriction_visible'
|
||||
: 'userrestriction_hidden','condition',
|
||||
$fullinfo).'</div>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
4
course/yui/toolboxes/toolboxes.js
vendored
4
course/yui/toolboxes/toolboxes.js
vendored
@ -37,7 +37,7 @@ YUI.add('moodle-course-toolboxes', function(Y) {
|
||||
CONDITIONALHIDDEN : 'conditionalhidden',
|
||||
AVAILABILITYINFODIV : 'div.availabilityinfo',
|
||||
SHOWCLASS : 'editing_show',
|
||||
ACCESSHIDECLASS : 'accesshide'
|
||||
HIDECLASS : 'hide'
|
||||
};
|
||||
|
||||
/**
|
||||
@ -99,7 +99,7 @@ YUI.add('moodle-course-toolboxes', function(Y) {
|
||||
var availabilityinfo = element.one(CSS.AVAILABILITYINFODIV);
|
||||
|
||||
if (availabilityinfo) {
|
||||
availabilityinfo.toggleClass(CSS.ACCESSHIDECLASS);
|
||||
availabilityinfo.toggleClass(CSS.HIDECLASS);
|
||||
}
|
||||
return value;
|
||||
},
|
||||
|
Loading…
x
Reference in New Issue
Block a user