Learning Core: supported way to auto enrol into a collection, and a broken quiz launch URL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi everyone,
I’ve built a quiz in Learning Core (a Quiz content item inside a course, delivered through a collection). The learner gets a learning task, opens it, clicks Enroll, then Start, then the quiz. Two things I’m stuck on and can’t find documentation for.
- Auto enrol. Is there a supported way to enrol a user into a collection automatically, through a Flow, a Script Include, or an API, so they don’t have to click Enroll themselves? I’ve looked at LearningAccessAPI and I only see methods to create or update a learning task and updateUserActivity, none of which enrol the user the way the Enroll button does. Writing sn_lc_user_course_activity directly is blocked.
- Broken launch URL. When I launch the quiz from the course page or Start, the URL it builds has collection_id set to the course sys_id, and the page returns “This URL seems to be broken.” The only thing that opens the quiz is the collection player (sn_lep_quiz) with the correct collection_id, and only after the learner has enrolled. A direct deep link to the quiz returns “You’re not yet enrolled in this learning.”
So right now the only working path is Email, To-dos, Enroll, Start, Quiz.
My questions:
- Is auto enrol into a collection supported anywhere, or is Enroll always a manual learner action?
- Is the collection_id equals course_id broken URL a known issue, and what is the correct supported way to launch a quiz?
Release: Australia
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
The supported approach is to use the Learning Core enrollment process rather than directly inserting records into sn_lc_user_course_activity. The LearningAccessAPI does not appear to expose a supported method for automatically enrolling users into a collection.
I would suggest the following:
Open Learning > Content > Collection.
Open the required collection and verify its course items.
Check whether the learner has an associated learning task.
Test enrollment through the learner's My Learning experience.
Verify that the quiz opens from the associated learning task.
For the incorrect quiz URL, avoid manually changing the collection_id or modifying out-of-box scripts. First, confirm that the quiz is correctly associated with the collection and learning path.
If the issue persists, raise a ServiceNow Support case with the expected and actual URLs, collection sys_id, and course sys_id.
I would also avoid direct database updates or custom API calls unless ServiceNow confirms they are supported for your Learning Core release.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Thanks Sanjay, that’s really helpful. Here’s exactly how ours is set up and what we’ve found, I’d value your view.
Structure:
Collection “Phishing Awareness Training” (Published, Course type = Collection).
One Collection Course Item (Mandatory). Its Course is a Learning Internal Content with Internal source = URL, and the URL is the collection-player deep link: esc?id=sn_lep_quiz&course_id=<quiz course item>&collection_id=<collection>.
The actual quiz is a separate Learning Internal Content with Internal source = Quiz, whose Quiz field points to an sn_exam (6 questions, 80% pass).
Why a URL item and not the quiz directly: when we add the Quiz content item as a collection member, the platform blocks the insert with a business rule (“Abort insert for exam in collection”). So a quiz can’t be a collection member, and sn_lep_quiz seems to be the only exam launcher.
What we’ve proven:
The native Start/Resume builds collection_id = course_id (the course-item sys_id, not the collection) → “This URL seems to be broken.”
With the correct deep link (collection_id = the real collection), that error clears, but we then hit an access/enrolment gate: the To-do shows “No enrollments” and the player says “You’re not yet enrolled in this learning,” even after Enroll then Start (a refresh doesn’t help).
The course page esc?id=sn_lep_course&sys_id=<quiz course item> does launch the quiz reliably for users not in the collection.
Internal source options we considered on the content item: URL (current, works around the broken URL but hits the enrolment gate), Quiz (the proper exam attach point, but can’t be a collection member and standalone doesn’t surface as a takeable To-do), KB / Free form (not applicable to an exam).
My question: given a quiz can’t be a collection member and sn_lep_quiz is the only launcher, what’s the supported pattern to deliver an sn_exam quiz inside a collection so a learner can enrol and launch it from their To-do, without the broken collection_id = course_id URL or the “not enrolled” gate? Is the course page (sn_lep_course) the intended launch, or should this be a learning path instead?
Release: Australia