cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
lfeng1
Community Participant

Why are there NULL user_ids in discussion_topic_fact? Sharing some findings from our testing

Sharing some findings from testing we did exploring this question.

Problem/Question

One of the schools we work with wanted to create a visual showing discussion activity with details about who originally created the topic or thread.  They discovered a large number of discussion topics have NULL user_id’s, which means there is no way to know who created the topic in the course.

Background on Discussion Topics and Entries

In Canvas, discussion topics are tied to discussion entries.  Information about discussion topics can be found in discussion_topic_dim, including the topic title.  In addition, discussion_topic_fact contains identifiers for key related information, such as the user_id of the person who created the thread (user_id).  It also includes the user_id of the person who edited the thread (editor_id). 

Information about discussion entries, or replies, can be found in the discussion_entry_fact table. Discussion_entry_fact contains one row for each entry or reply, and the person who created or edited the associated topic for that entry will be listed as the topic_user_id and topic_editor_id, respectively.

Discussion topics can be created in several ways:

  1. Discussion topics included in courses imported through a common cartridge import
  2. Discussion topics included with courses imported through Commons
  3. Previously inherited discussion topics from cases 1& 2 above, subsequently copied into a new course
  4. Discussion topics newly created directly in the course

What we found

What we found is that for cases 1-3 from above, there will be a NULL value in the topic_user_id for those discussion topics.  

Screen_Table.png

This makes it difficult to trace activity all the way back to an original point for the course.  

We did also find that if the instructor imported the topic and then proceeded to edit it, the correct user_id is logged as the topic_editor_id in the discussion_entry_fact table (corresponds to the editor_id in the discussion_topic_dim).

Screen_Table2.png

In addition, as expected, discussion topics which were newly created in the course (not inherited), correctly reflected the user who created the post.

Screen_Table3.png

Conclusion

What the school has decided to do is attribute all NULL topic_user_id’s to instructors (as opposed to students). This enables their visualization to distinguish between discussion activity in response to instructor initiated threads vs. student initiated threads.

To clarify: we don't think this behavior is necessarily a bug, because for those cases where the discussion topic was not created within the course in question, it would sort of make sense that the topic_user_id is NULL.  But we think it's important to be aware of this when trying to attribute users to topics for reporting purposes.

 

Labels (2)
2 Replies
James
Community Champion

Linda ( @lfeng1 ),

This sounds consistent with my findings a couple of years ago about why names are not copied with the discussions: Author and posted at in discussions from a content copy

I don't think it's anything specific to Canvas Data, but that you would get the same results through the API. That information just isn't there.

Another issue I've seen revolved around instructional designers who created the question and were showing up as the author. Students were wondering "Who is this person? It's not my teacher" and that was freaking some faculty out. My personal experience was that student's didn't really pay that much attention to who wrote the question, but that is just my experience. The suggested work-around was for designers to create the course in a sandbox and then import it into the real course to lose the user id.

Each school would need to look at how their courses were created before attributing a null id with the instructor.

I agree it's not a bug and that you probably shouldn't use it as a strong indicator of instructor activity.

There is potentially a way to determine the source in some cases. With the query by course endpoint of the course audit log API, there is information about copying a course. For example, when I copied my calculus course from last fall into this fall, it has an event_type of "copied_from" and in the links section contains the copied_from, which is the course ID of the course it was copied from and the user property contains the Canvas user id for the user who initiated the import.

I would classify that as "more trouble than it's worth," but some people feel do not feel they can tell their bosses that.

I haven't looked into imports from Commons to see whether they show up in the course audit log or not.

lfeng1
Community Participant

yes - thanks James, for confirming!  It certainly makes things interesting when the instructional designers who created the Canvas resources "show up" as authors or owners.  Thanks also for the tip to try and use the "copied_from" event type.  We will look into the course audit log API to see if that might be useful for our use case.