mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
more globals fixed
This commit is contained in:
parent
4f96fe55af
commit
df0442c67e
4 changed files with 5 additions and 4 deletions
|
@ -155,12 +155,12 @@ function lesson_delete_course($course, $feedback=true) {
|
|||
* @return object
|
||||
*/
|
||||
function lesson_user_outline($course, $user, $mod, $lesson) {
|
||||
global $DB;
|
||||
|
||||
global $CFG;
|
||||
|
||||
require_once("$CFG->libdir/gradelib.php");
|
||||
$grades = grade_get_grades($course->id, 'mod', 'lesson', $lesson->id, $user->id);
|
||||
|
||||
$return = new object();
|
||||
if (empty($grades->items[0]->grades)) {
|
||||
$return->info = get_string("no")." ".get_string("attempts", "lesson");
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue