mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Various little fixes to remove warnings (usually about empty variables)
when error_reporting is turned up to 15 or so ... more of these to come ...
This commit is contained in:
parent
a900458749
commit
9c9f7d7790
28 changed files with 1600 additions and 65 deletions
|
@ -43,7 +43,7 @@
|
|||
|
||||
|
||||
/// Collect modules data
|
||||
get_all_mods($course->id, $mods, $modnames, $modnamesplural, $modnamesused, $modsectioncounts);
|
||||
get_all_mods($course->id, $mods, $modnames, $modnamesplural, $modnamesused);
|
||||
|
||||
|
||||
/// Search through all the modules, pulling out grade data
|
||||
|
|
|
@ -342,7 +342,7 @@ function print_recent_activity($course) {
|
|||
}
|
||||
}
|
||||
|
||||
if ($changelist) {
|
||||
if (!empty($changelist)) {
|
||||
foreach ($changelist as $changeinfo => $change) {
|
||||
if ($change) {
|
||||
$changes[$changeinfo] = $change;
|
||||
|
@ -473,7 +473,7 @@ function print_section_block($heading, $course, $section, $mods, $modnames, $mod
|
|||
$moddata[] = "<a title=\"$mod->modfullname\" href=\"$CFG->wwwroot/mod/$mod->modname/view.php?id=$mod->id\">$instancename</a><BR>$editbuttons";
|
||||
}
|
||||
}
|
||||
if (isediting($site->id)) {
|
||||
if (isediting($course->id)) {
|
||||
$editmenu = popup_form("$CFG->wwwroot/course/mod.php?id=$course->id§ion=0&add=",
|
||||
$modnames, "section0", "", get_string("add")."...", "mods", get_string("activities"), true);
|
||||
$editmenu = "<DIV ALIGN=right>$editmenu</DIV>";
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
}
|
||||
echo "</TR></TABLE>";
|
||||
|
||||
get_all_mods($course->id, $mods, $modnames, $modnamesplural, $modnamesused, $modsectioncounts);
|
||||
get_all_mods($course->id, $mods, $modnames, $modnamesplural, $modnamesused);
|
||||
|
||||
switch ($mode) {
|
||||
case "todaylogs" :
|
||||
|
|
|
@ -26,19 +26,25 @@
|
|||
|
||||
add_to_log($course->id, "course", "view", "view.php?id=$course->id", "$course->id");
|
||||
|
||||
if ( isteacher($course->id) ) {
|
||||
if ($edit == "on") {
|
||||
$USER->editing = true;
|
||||
} else if ($edit == "off") {
|
||||
$USER->editing = false;
|
||||
if (isset($edit)) {
|
||||
if (isteacher($course->id)) {
|
||||
if ($edit == "on") {
|
||||
$USER->editing = true;
|
||||
} else if ($edit == "off") {
|
||||
$USER->editing = false;
|
||||
}
|
||||
save_session("USER");
|
||||
}
|
||||
}
|
||||
if ($help == "on") {
|
||||
$USER->help = true;
|
||||
} else if ($help == "off") {
|
||||
$USER->help = false;
|
||||
|
||||
if (isset($help)) {
|
||||
if ($help == "on") {
|
||||
$USER->help = true;
|
||||
} else if ($help == "off") {
|
||||
$USER->help = false;
|
||||
}
|
||||
save_session("USER");
|
||||
}
|
||||
save_session("USER");
|
||||
|
||||
$SESSION->fromdiscussion = "$CFG->wwwroot/course/view.php?id=$course->id";
|
||||
save_session("SESSION");
|
||||
|
@ -53,7 +59,7 @@
|
|||
print_header("$courseword: $course->fullname", "$course->fullname", "$course->shortname", "search.search", "", true,
|
||||
update_course_icon($course->id));
|
||||
|
||||
get_all_mods($course->id, $mods, $modnames, $modnamesplural, $modnamesused, $modsectioncounts);
|
||||
get_all_mods($course->id, $mods, $modnames, $modnamesplural, $modnamesused);
|
||||
|
||||
if (! $sections = get_all_sections($course->id)) {
|
||||
$section->course = $course->id; // Create a default section.
|
||||
|
|
|
@ -168,7 +168,7 @@
|
|||
if (isediting($course->id)) {
|
||||
echo "<DIV ALIGN=right>";
|
||||
popup_form("$CFG->wwwroot/course/mod.php?id=$course->id§ion=$week&add=",
|
||||
$modnames, "section$week", "", "$stradd...", "mods", $stractivities);
|
||||
$modnames, "section$week", "", "$stradd...");
|
||||
echo "</DIV>";
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue