"display_name": "Your Course Info"
}
6.4 Course Component Data
In Studio, a course team specifies course content by adding components to units. The core, or basic, types of compo-nents that course teams can add have a category value of ‘discussion’, ‘html’, ‘problem’, and ‘video’. The sample
6.4. Course Component Data 63
that follows extracts objects for each of these component types from a course_structure file.
The children array is not used for these types of objects.
The metadata field provides information about parameters set for a component.
• The metadata.display_name member field applies to all of the basic component types. This name iden-tifies the component to learners in the LMS and in edX Insights. Course teams can edit the default name in the Studio Settings dialog box.
• The other metadata member fields reflect settings specific to each component type. For information about the settings that course teams can define for components, seeAdding Course Componentsin the Building and Running an edX Courseguide.
6.4.1 Course Component Data Sample
"i4x://edX/DemoX/html/d3bd5215cf044056beb8e6f7f3e3afc4": {
"category": "html",
"children": [],
"metadata": {
"display_name": "Intro to Video"
}
"display_name": "Your Course About Page",
"download_track": true,
"display_name": "Multiple Choice Questions",
"markdown": "Many edX courses have homework or exercises you need to complete. Notice the clock image to the left? That means this homework or exercise needs to be completed for you to pass the course.\n\nAs you go through the question types, notice how edX gives you immediate feedback on your responses - it really helps in the learning process.\n\nWhat color is the open ocean on a sunny day?\n\n[[yellow, (blue), green]]\n\n\nWhich of the following are musical instruments?\n\n[x] a piano\n[ ] a tree\n[x] a guitar\n[ ] a window\n\n\n ",
"max_attempts": null,
.
"i4x://edX/DemoX/discussion/05d808aad49543de997964be3bfac528": {
"category": "discussion",
"children": [],
"metadata": {
"discussion_category": "Week 2",
"discussion_id": "7be676c36bba4486aeeabe3ecb5b06e8",
"discussion_target": "Improve the Question",
"display_name": "Discussion Space: Improve the Question"
} },
6.4. Course Component Data 65
Discussion Forums Data
EdX discussion data is stored as collections of JSON documents in a MongoDB database. MongoDB is a document-oriented, NoSQL database system. Documentation can be found at themongodbweb site.
• Data File and Object Overview
• Samples
– CommentThread Document Example – Comment Document Example
• Shared Fields – _id – _type – anonymous
– anonymous_to_peers – at_position_list – author_id – author_username – body
– course_id – created_at – updated_at – votes
• CommentThread Fields – closed
– comment_count – commentable_id – last_activity_at – tags_array – title – thread_type
• Comment Fields – visible
– abuse_flaggers
– historical_abuse_flaggers – endorsed
– endorsement – comment_thread_id – parent_id
– parent_ids – sk
67
7.1 Data File and Object Overview
In the data package, discussion data is delivered in a .mongo file, identified by organization and course, in the format {org}-{course}-{run}-{site}.mongo.
The primary collection that holds all of the discussion posts written by users is “contents”. Two different types of objects are stored, representing the three levels of interactions that users can have in a discussion.
• A CommentThread represents the first level of interaction: a post that opens a new thread, often a student question of some sort.
• A Comment represents both the second and third levels of interaction: a response made directly to the conver-sation started by a CommentThread is a Comment. Any further contributions made to a specific response are also in Comment objects.
A sample of the field/value pairs that are in the .mongo file, and descriptions of the attributes that these two types of objects share and that are specific to each type, follow.
In addition to these collections, events are also emitted to track specific user activities. For more information, see Discussion Forum Events.
7.2 Samples
Two sample rows, or JSON documents, from a .mongo file of discussion data follow.
7.2.1 CommentThread Document Example
The JSON documents that include discussion data are delivered in a compact, machine-readable format that can be difficult to read at a glance.
{ "_id" : { "$oid" : "50f1dd4ae05f6d2600000001" }, "_type" : "CommentThread",
"anonymous" :false, "anonymous_to_peers" : false, "at_position_list" : [],
"author_id" : "NNNNNNN","author_username" : "AAAAAAAAAA", "body" : "Welcome to the edX101 forum!\n\nThis forum willbe regularly monitored by edX. Please post your questions and comments here. When asking aquestion, don't forget to search the forum to check whether your question has already
beenanswered.\n\n", "closed" : false, "comment_count" : 0, "commentable_id" :
"i4x-edX-edX101-course-How_to_Create_an_edX_Course", "course_id" :
"edX/edX101/How_to_Create_an_edX_Course","created_at" : { "$date" :
1358028106904 }, "last_activity_at" : { "$date" : 1358134464424 },"tags_array"
: [], "thread_type": "discussion", "title" : "Welcome to the edX101 forum!",
"updated_at" : { "$date" :1358134453862 }, "votes" : { "count" : 1, "down" : [], "down_count" : 0, "point" : 1, "up" :[ "48" ], "up_count" : 1 } }
If you use a JSON formatter to “pretty print” this document, a version that is more readable is produced.
{
"author_id": "NNNNNNN",
"author_username": "AAAAAAAAAA",
"body": "Welcome to the edX101 forum!\n\nThis forum will be regularly monitored by edX. Please post your questions and comments here. When asking a question, don't forget to search the forum to check whether your question has already been answered.\n\n",
"closed": false,
"title": "Welcome to the edX101 forum!",
"updated_at": {
7.2.2 Comment Document Example
{ "_id" : { "$oid" : "52e54fdd801eb74c33000070" }, "votes" : { "up" : [],
"down" : [], "up_count" : 0, "down_count" : 0, "count" : 0, "point" : 0 },
"visible" : true, "abuse_flaggers" : [], "historical_abuse_flaggers" : [],
"parent_ids" : [], "at_position_list" : [], "body" : "I'm hoping this
Demonstration course will help me figure out how to take the course I enrolled in. I am just auditing the course, but I want to benefit from it as much as possible, as I am extremely interested in it.\n", "course_id" :
"edX/DemoX/Demo_Course", "_type" : "Comment", "endorsed" : true, "endorsement"
: { "user_id" : "9", "time" : ISODate("2014-08-29T15:11:49.442Z") },
"anonymous" : false, "anonymous_to_peers" : false, "author_id" : "NNNNNNN",
"comment_thread_id" : { "$oid" : "52e4e880c0df1fa59600004d" },
"author_username" : "AAAAAAAAAA", "sk" : "52e54fdd801eb74c33000070", updated_at" : { "$date" : 1390759901966 }, "created_at" : { "$date" : 1390759901966 } }
When pretty printed, this comment has the following format.
7.2. Samples 69
{
"body": "I'm hoping this Demonstration course will help me figure out how to take the course I enrolled in. I am just auditing the course, but I want to benefit from it as much as possible, as I am extremely interested in it.\n",