-
-
Notifications
You must be signed in to change notification settings - Fork 209
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
enable completion tracking for a user in multiple companies #1339
base: IOMAD_38_STABLE
Are you sure you want to change the base?
enable completion tracking for a user in multiple companies #1339
Conversation
Interesting! How does the user's interface change with them being in multiple companies? I can see that the courses which are displayed depend on the company but do they have to switch companies or do they get all of the courses from all of the companies or? I can see that you have made changes to the local/iomad_track event listeners. Have you done the corresponding changes to the admin tools (admin/tool/redocerts/ and admin/tool/checklearningrecords - which is new as of the end of last week)? (I am also assuming that these will need updating too, but possibly not?) Do the report's "just work"? |
We have a custom url per customer, so we've made some minor changes that effectively disable changing the editing company unless you use their url, and you are always editing the company selected by the url. As far as redo certs and learning methods I haven't gone and updated them yet, but will. |
The user should only see courses that are in their active company in the iomad view, but I suspect there are some corner cases where you can enroll in a course that your editing company hasn't added. |
There is also a potential issue with shared courses. Scenario - 1 - Which company course group do they get put into (shared course)? I can see possible fixes for a few of these: I know I will have missed a number of scenarios here but the complexity of this is why it's not in the current core code :) |
Yeah that's the reason I didn't enable adding a user to multiple companies in the dashboard. It simply can't realistically work for all use cases in a unsurprising way with the way moodle works internally. For the most part I expect the use case at agilicus to be compliance training with potentially shared courses so the use case I started with is relatively simple. As for solving the problems:
I would like to get something merged even if it's mostly disabled from most user's point of view because the code changes end up being a lot of lines, and even editing week old source I had merge conflicts. Another option might be some refactoring to put more behavior into functions. |
This PR enables course tracking for a user in multiple companies.
For our use case we automatically add users to a company when they are created through some custom scripts. There is a possibility for our clients to have workers that are part of more than one company, so we need to support them in meeting those audit requirements.
This adds a function which will get all companies a userid is part of, and then processes those events for each company on enrolment and completion events