Skip to content
Browse files

Slowly implementing courseid type variables where i see them

  • Loading branch information...
1 parent fbc7976 commit 1ea8303c1f6bc202a528c1a9101cee4913b4131e martin committed
Showing with 4 additions and 5 deletions.
  1. +4 −5 lib/moodlelib.php
View
9 lib/moodlelib.php
@@ -1050,12 +1050,12 @@ function get_course_users($courseid, $sort="u.lastaccess DESC") {
/// MODULE FUNCTIONS /////////////////////////////////////////////////
-function get_coursemodule_from_instance($modulename, $instance, $course) {
+function get_coursemodule_from_instance($modulename, $instance, $courseid) {
// Given an instance of a module, finds the coursemodule description
return get_record_sql("SELECT cm.*, m.name
FROM course_modules cm, modules md, $modulename m
- WHERE cm.course = '$course' AND
+ WHERE cm.course = '$courseid' AND
cm.deleted = '0' AND
cm.instance = m.id AND
md.name = '$modulename' AND
@@ -1064,13 +1064,13 @@ function get_coursemodule_from_instance($modulename, $instance, $course) {
}
-function get_all_instances_in_course($modulename, $course, $sort="cw.section") {
+function get_all_instances_in_course($modulename, $courseid, $sort="cw.section") {
// Returns an array of all the active instances of a particular
// module in a given course. Returns false on any errors.
return get_records_sql("SELECT m.*,cw.section,cm.id as coursemodule
FROM course_modules cm, course_sections cw, modules md, $modulename m
- WHERE cm.course = '$course' AND
+ WHERE cm.course = '$courseid' AND
cm.instance = m.id AND
cm.deleted = '0' AND
cm.section = cw.id AND
@@ -1083,7 +1083,6 @@ function get_all_instances_in_course($modulename, $course, $sort="cw.section") {
-
/// CORRESPONDENCE ////////////////////////////////////////////////
function email_to_user($user, $from, $subject, $messagetext, $messagehtml="", $attachment="", $attachname="") {

0 comments on commit 1ea8303

Please sign in to comment.
Something went wrong with that request. Please try again.