How do I get the exam name?

I've been doing my head in exporting from MongoDB modulestore.structures to 
import to MySQL so that I can JOIN across the fields; but I've been having 
difficulty acquiring the full hierarchy.

>From my understanding MongoDB stores the course structure—including exam 
name—and MySQL stores the student_id, grade, max_grade and timing (how long 
each question took to answer).

In MongoDB modulestore.structures is a collection of documents like so:

   - _id: ObjectId, original_version: ObjectId, blocks: Array<{}>
   - [opening up and enumerating block fields within block objects within 
   blocks array]:
      - block_id, block_type, fields
         - fields.format contains exam name
         - The only fields.format with exam name have block_type = 
         'sequential'
         - But not all have. E.g.: out of my 10883 sequential blocks I have 
         262 non null fields.format
         
The block_type is a single one of these options, which I believe to be in 
this hierarchy:

   1. course
   2. chapter
   3. sequential
   4. survey || video || problem
   
In MySQL edxapp.courseware_studentmodule the field is called module_type 
(whereas MongoDB calls it block_type).

My many attempts at solving this problem: 
https://gist.github.com/SamuelMarks/b284c5fc4c6699cdfd603f6b9065c513

Help would be most appreciated.

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"General Open edX discussion" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/edx-code/5637ceae-dbe0-488b-b166-c414243a3078%40googlegroups.com.

Reply via email to