Thanks, I've added a little command for this: edx-platform$ ./manage.py cms 
--info-for-course-id '<course_id>'

 https://github.com/SamuelMarks/edx-platform/tree/SamuelMarks/ginkgo

Getting this output though, will debug in the morning:
Traceback (most recent call last):
  File "./manage.py", line 132, in <module>
    main()
  File "./manage.py", line 115, in main
    dump_course_info(edx_args.info_for_course_id)
  File "/opt/openedx/edx-platform/hacks.py", line 25, in dump_course_info
    ms = modulestore()
  File 
"/opt/openedx/edx-platform/common/lib/xmodule/xmodule/modulestore/django.py"
, line 330, in modulestore
    settings.MODULESTORE['default']['ENGINE'],
  File 
"/opt/openedx/venv/local/lib/python2.7/site-packages/django/conf/__init__.py"
, line 49, in __getattr__
    return getattr(self._wrapped, name)
  File 
"/opt/openedx/venv/local/lib/python2.7/site-packages/django/conf/__init__.py"
, line 160, in __getattr__
    return getattr(self.default_settings, name)
AttributeError: 'module' object has no attribute 'MODULESTORE

(done on my Open edX install, from my Fabric script: 
https://github.com/offscale/offregister-openedx based off 
https://github.com/regisb/openedx-install )

On Wednesday, November 15, 2017 at 4:05:26 PM UTC+11, Samuel Marks wrote:
>
> 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/db2e1801-df58-4f83-8510-e027649b77be%40googlegroups.com.

Reply via email to