When you visit a completed report: https://example.com/report/outline/user.php?id=3&course=2&mode=complete, even though the student meets the condition of having finished the section, they are not appearing to the administrator / teacher.
I hack this including in the function is_available (classes/condition.php) that:
public function is_available($not, \core_availability\info $info, $grabthelot, $userid) {
global $USER , $CFG , $DB;
require_once("{$CFG->libdir}/completionlib.php");
$context = \context_course::instance($info->get_course()->id);
-
if (has_capability('moodle/course:manageactivities', $context)) {
-
return true; // Retorna true si el usuario es Manager.
-
but i think that isn't the better way to solve it!
Thanks!
When you visit a completed report: https://example.com/report/outline/user.php?id=3&course=2&mode=complete, even though the student meets the condition of having finished the section, they are not appearing to the administrator / teacher.
I hack this including in the function is_available (classes/condition.php) that:
public function is_available($not, \core_availability\info $info, $grabthelot, $userid) {
global $USER , $CFG , $DB;
require_once("{$CFG->libdir}/completionlib.php");
$context = \context_course::instance($info->get_course()->id);
but i think that isn't the better way to solve it!
Thanks!