Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Committing a fix to the get_course_mods warning that I fixed in head …

…yesterday but forgot to commit here.
  • Loading branch information...
commit 41fb3602d3d5a12761f26371f2091158541e39a8 1 parent 181d29f
mjollnir_ authored
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/datalib.php
View
4 lib/datalib.php
@@ -2580,6 +2580,10 @@ function update_timezone_records($timezones) {
function get_course_mods($courseid) {
global $CFG;
+ if (empty($courseid)) {
+ return false; // avoid warnings
+ }
+
return get_records_sql("SELECT cm.*, m.name as modname
FROM {$CFG->prefix}modules m,
{$CFG->prefix}course_modules cm
Please sign in to comment.
Something went wrong with that request. Please try again.