Skip to content

function is_available is hidden sections in report #10

@suvires

Description

@suvires

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions