OFFIZIELLES LMS VON GMIT
Die Zukunft gestalten
durch digitales Lernen
Offizielle Lernplattform von GMIT.
Warum e-GMIT?
Alles für Ihren Erfolg
Flexible learning
Study anytime, anywhere.
Blended
Online + classroom
Experts
Learn from professionals
id == SITEID) continue;
$context = \context_course::instance($course->id);
// Export (image, summary etc.)
$exporter = new course_summary_exporter($course, ['context' => $context]);
$data = $exporter->export($PAGE->get_renderer('core'));
$image = $data->courseimage ?? '/local/homepage/pix/default.jpg';
// 🔥 REAL PROGRESS
$progress = self::get_progress($course->id);
$list[] = [
'id' => $course->id,
'fullname' => format_string($course->fullname),
'category' => 'COURSE',
'image' => $image,
'url' => '/course/view.php?id=' . $course->id,
'year' => '2025–2026',
'progress' => $progress
];
}
return $list;
}
// 🎯 REAL USER PROGRESS
private static function get_progress($courseid) {
global $USER;
$completion = new \completion_info(get_course($courseid));
if (!$completion->is_enabled()) {
return rand(10, 80); // fallback
}
$percentage = \core_completion\progress::get_course_progress_percentage($courseid, $USER->id);
return $percentage ?? 0;
}
// ⭐ FEATURED COURSES (Top 4)
public static function get_featured_courses() {
$courses = self::get_courses();
return array_slice($courses, 0, 4);
}
}