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

Cohort factor lists only 25 cohorts. #450

Open
haiksu opened this issue Nov 28, 2023 · 3 comments
Open

Cohort factor lists only 25 cohorts. #450

haiksu opened this issue Nov 28, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@haiksu
Copy link

haiksu commented Nov 28, 2023

Cohorts are retrieved here by a call of cohort_get_all_cohorts()
https://github.com/catalyst/moodle-tool_mfa/blob/MOODLE_400_STABLE/factor/cohort/settings.php#L41

The method retrieves by default only 25 cohorts, as defined here https://github.com/moodle/moodle/blob/6374475dc3cf3a94e22ec18c4655b89819a1b5d6/cohort/lib.php#L498 (cohort_get_all_cohorts($page = 0, $perpage = 25, $search = '', $withcustomfields = false)).

The settings page should include all the cohorts, not just the first 25.

@Peterburnett
Copy link
Contributor

Thanks for the investigation @haiksu . Looks like I assumed that a method called cohort_get_all_cohorts would actually get ALL cohorts... This one is legit, a Pull request to address it would be appreciated

@Peterburnett Peterburnett added the bug Something isn't working label Dec 20, 2023
@haiksu
Copy link
Author

haiksu commented Dec 20, 2023

Sure, I'll get on it.

haiksu pushed a commit to mediamaisteri/moodle-tool_mfa that referenced this issue Dec 20, 2023
@haiksu
Copy link
Author

haiksu commented Sep 26, 2024

Pull request here #452. Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants