Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Activity completion badges lack proper descriptions in Moodle 3.11 #125

Open
ebithell opened this issue Jul 6, 2022 · 1 comment
Open

Comments

@ebithell
Copy link

ebithell commented Jul 6, 2022

Affected branch: MOODLE_311_STABLE at commit #b723f216, installed in Moodle 3.11.7.

Moodle 3.11 adds activity completion status lozenges below each activity link on a main course page, if activity completion is enabled. The automatic completion badges for the OU Blog activity lack proper descriptions, for example (compared with a standard Forum activity):

Moodle311_OUBlogcompletion

This is because get_custom_rule_descriptions() in mod/oublog/classes/completion/custom_completion.php returns an empty array:

public function get_custom_rule_descriptions(): array {
    return [];
}

whereas it would be expected to contain logic and language strings similar to mod/forum/classes/completion/custom_completion.php:

public function get_custom_rule_descriptions(): array {
    $completiondiscussions = $this->cm->customdata['customcompletionrules']['completiondiscussions'] ?? 0;
    $completionreplies = $this->cm->customdata['customcompletionrules']['completionreplies'] ?? 0;
    $completionposts = $this->cm->customdata['customcompletionrules']['completionposts'] ?? 0;

    return [
        'completiondiscussions' => get_string('completiondetail:discussions', 'forum', $completiondiscussions),
        'completionreplies' => get_string('completiondetail:replies', 'forum', $completionreplies),
        'completionposts' => get_string('completiondetail:posts', 'forum', $completionposts),
    ];
}

Thank you in advance to the OU development team for anything that you can do to fix this issue!

@jason-platts
Copy link
Member

Thanks for spotting this - I've added to our development backlog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants