mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 08:56:36 +02:00
Some fixes. :-}
This commit is contained in:
parent
3e0d46ec36
commit
a0a4a3c964
1 changed files with 9 additions and 3 deletions
|
@ -61,11 +61,14 @@
|
||||||
|
|
||||||
if ($learningforums) { // Copy "full" data into this complete array
|
if ($learningforums) { // Copy "full" data into this complete array
|
||||||
foreach ($learningforums as $learningforum) {
|
foreach ($learningforums as $learningforum) {
|
||||||
$forum[$learningforum->id] = $learningforum;
|
$forums[$learningforum->id] = $learningforum;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($forums as $forum) {
|
foreach ($forums as $forum) {
|
||||||
|
if (!isset($forum->visible)) {
|
||||||
|
$forum->visible = true;
|
||||||
|
}
|
||||||
switch ($forum->type) {
|
switch ($forum->type) {
|
||||||
case "news":
|
case "news":
|
||||||
case "social":
|
case "social":
|
||||||
|
@ -81,8 +84,11 @@
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if (!$course->category) { // On site level all forums are general forums
|
if (!$course->category or empty($forum->section)) { // Site level or section 0
|
||||||
$generalforums[] = $forum;
|
$generalforums[] = $forum;
|
||||||
|
if (isset($forum->coursemodule)) {
|
||||||
|
unset($learningforums[$forum->coursemodule]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue