Private URL for my reference - https://claude.ai/chat/12096022-e224-4e6b-9e01-40149a93cef7
Used Claude to debug (add missing version.php, and many other omissions) the local plugin for swayamplus api integration generated by Gemini - github repo at https://github.com/hn-88/swayamplus-sso-api-integration. Also added some features like retry logic and test url generation.
Some points to note:
- The plugin uses the "Manual enrolment" enrolment method, which is enabled by default on all courses - we can see the enabled methods by going to the relevant course > Participants > Enrolled users (dropdown) > Enrolment methods.
- Guest access should probably be removed from the same place as above, in case enabled earlier.
- Currently the classes/privacy/provider.php is not implemented, so the mdl_local_swayamplus_enrol table is not updated by deleting rows if / when users are deleted.
- If the user is already present on our system, they are directly enrolled in the course.
- If the user is new to our system, the user is dropped into the profile completion and agreement to terms and conditions workflows. Following that, the user is actually enrolled in the course automatically, but dropped into their Profile page. According to Claude, we can add a large link to "My Courses" in the Profile page as follows:
- Go to any page where you can add a block sitewide — the Front Page is the standard choice. Turn editing on.
- Add a block → HTML.
- Give it a title (e.g. "Continue learning") and content — something like a large, bold link:
<p style="text-align:center;"> <a href="https://ourdomain.org/my/courses.php" style="font-size:1.4em; font-weight:bold; display:inline-block; padding:10px 20px;"> → Go to My Courses </a></p> - On that block's own settings (gear icon → Configure), under "Where this block appears" → Page contexts, set it to "Display throughout the entire site." Save.
- Now navigate to any user's profile page — your own is fine. The block should appear there too (since you just made it sitewide). Open that same block's settings again, and this time change "Display on page types" to "Only user profile pages." Save.
No comments:
Post a Comment