We wanted a simple, clean report that shows, for any given Class, a list of columns showing the courses and a list of rows showing the students, and checkmarks (or something like that) to show completions.
I wanted to use Views and standard Drupal modules/features, not custom code -- because I know I'll want to make changes and probably make new versions of the report, and don't want to rely on programming each time I need a change.
Here's how I built that. Anyone have a better approach?
-
Created a content type, "Course Completions," with two fields: entity reference to a course, and entity reference to a user.
-
Created a Rule, "Mark Student Course Completed." Event is "User has passed a quiz;" Condition is that "User has passed all required quizzes." The Rule creates a new entity of type Course Completions, and sets the field values to the user who finished the course and the course.
Now I have a node I can use. At some point I'll add to the Rule, to check if there is already a node with these two values, and either update the date of that node or just do nothing, to account for someone completing the course two or more times (say, by paging back and clicking Finish again, or actually taking the course again for some reason). For now, it makes a duplicate node in that case.
- Created a View: Content of type Courses Completed, Contextual filter of the node you're viewing (because the report is going to be placed on the student list tab for a Class), fields for the class title, course title and student name.
I used the Views Matrix module and grouping to haul off the table display of classes as columns and students as rows. Right now it shows the student name in the cells (rather than, say, a checkmark) for each completed class, but that could be left that way or changed with CSS to show a symbol.
Pros: It works.
Cons: It's kind of messy and over-complex. The content type for completions doesn't seem ideal. It doesn't display a particular course in the class until at least one student completes the course (because there is no row rendered for that course until then). I had to kludge the course sort order using a custom numbering field in the course content type, to get them to display in the right order instead of alphabetically by title.
Things I wish Opigno had, which would make reporting better:
-
Some kind of contextual relationship between courses and classes, other than the entity reference in the Class type. That is: I'm in Class A; I'm taking Course B; the system has no idea, while I'm in Course B that I'm there because I'm in Class A. So reports, links to the next course, etc., are messy and hard to build.
-
A record of each student's completions of courses and classes that is exposed to Views, rather than just on-the-fly evaluation of whether a student has completed it.

Comments
Message Stack
On this subject (reporting / notification), I think the Message Stack might be useful - https://www.drupal.org/node/2180145
The kind of listing / reports described here could be obtained with a view using proper filters (i.e. filtering messages by referenced course node, profile, etc.)
Cases like "links to the next course" might also just be views blocks with contextual filters and appropriate sorting.
The Message stack could also pave the way for extensions to build a Facebook-like platform (i.e. "activity" walls).
"L'imagination est une ivresse, la réalité est sa gueule de bois" - Boulet