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

Possible namespacing issue #292

Closed
james-pearce-bath-ac opened this issue Mar 4, 2024 · 2 comments · Fixed by #296
Closed

Possible namespacing issue #292

james-pearce-bath-ac opened this issue Mar 4, 2024 · 2 comments · Fixed by #296

Comments

@james-pearce-bath-ac
Copy link

There appears to be an issue with the namespacing of the code. In several files the namespace is defined as 'namespace mod_ratingallocate' for example in the task files. In other places the namspacing is defined as 'namespace ratingallocate' without the mod_ prefix for example in the strategy php files.

@FelixDiLenarda
Copy link

The incorrect namespace designations lead to the failure of the ad_hoc task with the following output:

Execute adhoc task: mod_ratingallocate\task\distribute_unallocated_task
Adhoc task id: 90667432
Adhoc task custom data: {"courseid":"38278","cmid":"1786341","distributionalgorithm":"distribute_unallocated_equally"}
... started 12:13:03. Current memory use 42.6 MB.
Debugging increased temporarily due to faildelay of 7680
... used 1 dbqueries
... used 0.00084400177001953 seconds
Adhoc task failed: mod_ratingallocate\task\distribute_unallocated_task,Undefined constant "mod_ratingallocate\task\ACTION_DISTRIBUTE_UNALLOCATED_EQUALLY"
Backtrace:
* line 508 of /lib/classes/cron.php: call to mod_ratingallocate\task\distribute_unallocated_task->execute()
* line 302 of /lib/classes/cron.php: call to core\cron::run_inner_adhoc_task()
* line 128 of /lib/classes/cron.php: call to core\cron::run_adhoc_tasks()
* line 186 of /admin/cli/cron.php: call to core\cron::run_main_process()

This PR fixes the Issue.
The integration of the pull request #296 is therefore eagerly anticipated. :)

@Laur0r
Copy link
Contributor

Laur0r commented Apr 18, 2024

Thank you for pointing this out! This will be fixed for the current master branch and the next release :)

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

Successfully merging a pull request may close this issue.

3 participants