mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
Fixed the empty grades for attendance.
Added log_display database records
This commit is contained in:
parent
8fc1384b78
commit
018e87bedb
@ -14,6 +14,14 @@ function attendance_upgrade($oldversion) {
|
||||
execute_sql("ALTER TABLE `{$CFG->prefix}attendance` ADD `autoattend` TINYINT( 1 ) DEFAULT '0' NOT NULL;");
|
||||
}
|
||||
|
||||
if ($oldversion < 2004050301) {
|
||||
modify_database("", "INSERT INTO {$CFG->prefix}log_display VALUES ('attendance', 'view', 'attendance', 'name');");
|
||||
modify_database("", "INSERT INTO {$CFG->prefix}log_display VALUES ('attendance', 'viewall', 'attendance', 'name');");
|
||||
modify_database("", "INSERT INTO {$CFG->prefix}log_display VALUES ('attendance', 'viewweek', 'attendance', 'name');");
|
||||
}
|
||||
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
require_login($course->id);
|
||||
|
||||
add_to_log($course->id, "attendance", "view all", "index.php?id=$course->id", "");
|
||||
add_to_log($course->id, "attendance", "viewall", "index.php?id=$course->id", "");
|
||||
|
||||
|
||||
/// Get all required strings
|
||||
|
@ -330,8 +330,7 @@ function attendance_grades($attendanceid) {
|
||||
} // if students
|
||||
$return->maxgrade = $attendance->maxgrade;
|
||||
} else { // if attendance->grade == "1"
|
||||
$return->grades = NULL;
|
||||
$return->maxgrade = NULL;
|
||||
$return = NULL;
|
||||
}// else for if attendance->grade == "1"
|
||||
return $return;
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
/// This fragment is called by moodle_needs_upgrading() and /admin/index.php
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
$module->version = 2004013101; // The current module version (Date: YYYYMMDDXX)
|
||||
$module->version = 2004050301; // The current module version (Date: YYYYMMDDXX)
|
||||
$module->requires = 2004013101; // Requires this Moodle version
|
||||
$module->cron = 3600; // Period for cron to check this module (secs)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user