mirror of
https://github.com/moodle/moodle.git
synced 2025-01-17 13:38:32 +01:00
Merge branch 'MDL-67751' of https://github.com/paulholden/moodle
This commit is contained in:
commit
106974b31a
@ -52,8 +52,8 @@ class block_activity_modules extends block_list {
|
||||
$archetypes = array();
|
||||
|
||||
foreach($modinfo->cms as $cm) {
|
||||
// Exclude activities which are not visible or have no link (=label)
|
||||
if (!$cm->uservisible or !$cm->has_view()) {
|
||||
// Exclude activities that aren't visible or have no view link (e.g. label). Account for folder being displayed inline.
|
||||
if (!$cm->uservisible || (!$cm->has_view() && strcmp($cm->modname, 'folder') !== 0)) {
|
||||
continue;
|
||||
}
|
||||
if (array_key_exists($cm->modname, $modfullnames)) {
|
||||
|
@ -74,11 +74,8 @@ foreach ($modinfo->cms as $cm) {
|
||||
if (!in_array($cm->modname, $availableresources)) {
|
||||
continue;
|
||||
}
|
||||
if (!$cm->uservisible) {
|
||||
continue;
|
||||
}
|
||||
if (!$cm->has_view()) {
|
||||
// Exclude label and similar
|
||||
// Exclude activities that aren't visible or have no view link (e.g. label). Account for folder being displayed inline.
|
||||
if (!$cm->uservisible || (!$cm->has_view() && strcmp($cm->modname, 'folder') !== 0)) {
|
||||
continue;
|
||||
}
|
||||
$cms[$cm->id] = $cm;
|
||||
@ -140,9 +137,11 @@ foreach ($cms as $cm) {
|
||||
}
|
||||
|
||||
$class = $cm->visible ? '' : 'class="dimmed"'; // hidden modules are dimmed
|
||||
$url = $cm->url ?: new moodle_url("/mod/{$cm->modname}/view.php", ['id' => $cm->id]);
|
||||
|
||||
$table->data[] = array (
|
||||
$printsection,
|
||||
"<a $class $extra href=\"".$cm->url."\">".$icon.$cm->get_formatted_name()."</a>",
|
||||
"<a $class $extra href=\"" . $url ."\">" . $icon . $cm->get_formatted_name() . "</a>",
|
||||
$intro);
|
||||
}
|
||||
|
||||
|
@ -203,7 +203,8 @@ class report_log_renderable implements renderable {
|
||||
$section = 0;
|
||||
$thissection = array();
|
||||
foreach ($modinfo->cms as $cm) {
|
||||
if (!$cm->uservisible || !$cm->has_view()) {
|
||||
// Exclude activities that aren't visible or have no view link (e.g. label). Account for folders displayed inline.
|
||||
if (!$cm->uservisible || (!$cm->has_view() && strcmp($cm->modname, 'folder') !== 0)) {
|
||||
continue;
|
||||
}
|
||||
if ($cm->sectionnum > 0 and $section <> $cm->sectionnum) {
|
||||
|
@ -376,7 +376,8 @@ function report_log_print_mnet_selector_form($hostid, $course, $selecteduser=0,
|
||||
$section = 0;
|
||||
$thissection = array();
|
||||
foreach ($modinfo->cms as $cm) {
|
||||
if (!$cm->uservisible || !$cm->has_view()) {
|
||||
// Exclude activities that aren't visible or have no view link (e.g. label). Account for folder being displayed inline.
|
||||
if (!$cm->uservisible || (!$cm->has_view() && strcmp($cm->modname, 'folder') !== 0)) {
|
||||
continue;
|
||||
}
|
||||
if ($cm->sectionnum > 0 and $section <> $cm->sectionnum) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user