0

I am working on setting up a few wrapper functions around the Valence API for an application. I'm trying to create a method that determines if a given course exists. Currently we are doing it based on the CourseCode. I run the /d2l/api/lp/1.4/orgstructure/?orgUnitCode={CourseCode} API call. This works well, but I want to ensure there are no duplicates.

In the D2L product, it says "The Course Offering Code is the code that you would like to use to uniquely identify this course offering." The problem is that it allows you to create another course offering with the exact same code. Is there a way to ensure that there are no duplicate course codes? Or is that something that will need to be enforced by policy? Can you disable the field on the edit course screen?

1 Answer 1

1

The Course Offering Code is the "organization code name" for the course. Imagine, for example, that you have a course named "An Introduction To English Literature", and "ENGL 101" as the code that your organization uses to refer to the course.

While this might be unique right now to refer to the course (the Winter semester in 2014), the course might be offered again (almost certainly will be) in a future semester. Some organizations might use the same org unit over and over and over again for each offering of a course. But most do not: each offering of a course is an entity in the system, so there's a "copy" of ENGL 101 for this semester, and a copy for next semester, and one following that. Each one has the organization code ENGL 101 but you have three offerings that the system must track.

The Org Unit Id is the unique key to track each unique instance of an organizational unit (in this case, a course offering).

Again, most clients have course offerings associated with Semester org unit types, or some similar "time-based" org unit grouping: in this case, when you're searching for duplicates, you might be best advised to think in terms of "duplicates right now", or "duplicate org units that are descended from the 'right-now' Semester org unit".

Another way that clients handle things is they have a course offering template for ENGL-101, and each offering of the course inherits from that template. In this case, you might want to do duplicate checking among course offering template, rather than course offering, org unit types.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.