Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: gnowledge/gstudio
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 17.05.r1
Choose a base ref
...
head repository: gnowledge/gstudio
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: dlkit
Choose a head ref
Loading
Showing with 26,574 additions and 7,856 deletions.
  1. +1 −0 .gitignore
  2. +10 −2 INSTALL
  3. +2 −3 README.md
  4. +20 −0 doc/Makefile
  5. +44 −8 doc/deployer/Migrating_SQLite_DB_to_PostgreSQL.txt
  6. +6 −4 doc/deployer/create_authusers_from_code_username_password_csv.py
  7. +3 −0 doc/deployer/create_user_detail_csvs.py
  8. +54 −0 doc/deployer/del_has_thread_update.py
  9. +8 −4 doc/deployer/delete_all_non_webm_files.py
  10. +3 −0 doc/deployer/logout_all_users.py
  11. +3 −1 doc/deployer/migrate_group_resources.py
  12. +70 −0 doc/deployer/release2_sept17.py
  13. +70 −0 doc/deployer/release3_oct17.py
  14. +4 −3 doc/deployer/set_threads_prior_nodes.py
  15. +82 −103 doc/developer/CounterAnalyticsNotes.md
  16. +20 −0 doc/developer/Group_migration.txt
  17. +113 −0 doc/developer/api.md
  18. +106 −0 doc/developer/data-collection.md
  19. +106 −40 doc/index.org
  20. +65 −0 doc/release-scripts/release2-1_nov17.py
  21. +70 −0 doc/release-scripts/release2_sept17.py
  22. +70 −0 doc/release-scripts/release3_oct17.py
  23. +119 −0 doc/release-scripts/user-tokens.json
  24. +10 −7 doc/schema_directory/ATs.csv
  25. +52 −52 doc/schema_directory/RTs.csv
  26. +3 −0 doc/schema_directory/STs_run1.csv
  27. +6 −3 doc/schema_directory/STs_run2.csv
  28. +150 −0 doc/source/api.rst
  29. +208 −0 doc/source/conf.py
  30. +87 −0 doc/source/counter-analytics-notes.rst
  31. +53 −0 doc/source/dump-restore.rst
  32. +185 −0 doc/source/gstudio-index.rst
  33. +29 −0 doc/source/index.rst
  34. +78 −0 doc/source/quiz.rst
  35. +9 −4 gnowsys-ndf/bower.json
  36. +92 −37 gnowsys-ndf/fabfile.py
  37. +9 −5 gnowsys-ndf/gnowsys_ndf/factory_type.py
  38. 0 gnowsys-ndf/gnowsys_ndf/gstudio_configs/__init__.py
  39. +27 −0 gnowsys-ndf/gnowsys_ndf/gstudio_configs/api.json
  40. +4 −0 gnowsys-ndf/gnowsys_ndf/gstudio_configs/verbose.json
  41. +89 −24 gnowsys-ndf/gnowsys_ndf/ndf/{models.py → _models.py}
  42. +42 −1 gnowsys-ndf/gnowsys_ndf/ndf/management/commands/create_schema.py
  43. +37 −19 gnowsys-ndf/gnowsys_ndf/ndf/management/commands/data_entry.py
  44. +124 −90 gnowsys-ndf/gnowsys_ndf/ndf/management/commands/export_users_analytics.py
  45. +32 −2 gnowsys-ndf/gnowsys_ndf/ndf/management/commands/filldb.py
  46. +181 −147 gnowsys-ndf/gnowsys_ndf/ndf/management/commands/group_export.py
  47. +357 −155 gnowsys-ndf/gnowsys_ndf/ndf/management/commands/group_import.py
  48. +2 −2 gnowsys-ndf/gnowsys_ndf/ndf/management/commands/nroer_data_entry.py
  49. +0 −10 gnowsys-ndf/gnowsys_ndf/ndf/management/commands/purge_group.py
  50. +59 −0 gnowsys-ndf/gnowsys_ndf/ndf/management/commands/purge_node.py
  51. +1 −0 gnowsys-ndf/gnowsys_ndf/ndf/management/commands/schema_mapping.py
  52. +64 −6 gnowsys-ndf/gnowsys_ndf/ndf/management/commands/sync_existing_documents.py
  53. +9 −3 gnowsys-ndf/gnowsys_ndf/ndf/management/commands/sync_users.py
  54. +26 −0 gnowsys-ndf/gnowsys_ndf/ndf/management/commands/teacher_agency_type_update.py
  55. +41 −0 gnowsys-ndf/gnowsys_ndf/ndf/management/commands/unit_assessments.py
  56. +33 −0 gnowsys-ndf/gnowsys_ndf/ndf/models/__init__.py
  57. +26 −0 gnowsys-ndf/gnowsys_ndf/ndf/models/analytics.py
  58. +182 −0 gnowsys-ndf/gnowsys_ndf/ndf/models/attribute_type.py
  59. +190 −0 gnowsys-ndf/gnowsys_ndf/ndf/models/author.py
  60. +152 −0 gnowsys-ndf/gnowsys_ndf/ndf/models/base_imports.py
  61. +36 −0 gnowsys-ndf/gnowsys_ndf/ndf/models/benchmark.py
  62. +403 −0 gnowsys-ndf/gnowsys_ndf/ndf/models/buddy.py
  63. +503 −0 gnowsys-ndf/gnowsys_ndf/ndf/models/counter.py
  64. +43 −0 gnowsys-ndf/gnowsys_ndf/ndf/models/db_utils.py
  65. +29 −0 gnowsys-ndf/gnowsys_ndf/ndf/models/depricated.py
  66. +402 −0 gnowsys-ndf/gnowsys_ndf/ndf/models/filehive.py
  67. +31 −0 gnowsys-ndf/gnowsys_ndf/ndf/models/gattribute.py
  68. +38 −0 gnowsys-ndf/gnowsys_ndf/ndf/models/grelation.py
  69. +324 −0 gnowsys-ndf/gnowsys_ndf/ndf/models/group.py
  70. +270 −0 gnowsys-ndf/gnowsys_ndf/ndf/models/gsystem.py
  71. +61 −0 gnowsys-ndf/gnowsys_ndf/ndf/models/gsystem_type.py
  72. +296 −0 gnowsys-ndf/gnowsys_ndf/ndf/models/history_manager.py
  73. +24 −0 gnowsys-ndf/gnowsys_ndf/ndf/models/meta_type.py
  74. +171 −0 gnowsys-ndf/gnowsys_ndf/ndf/models/models_utils.py
  75. +970 −0 gnowsys-ndf/gnowsys_ndf/ndf/models/node.py
  76. +17 −0 gnowsys-ndf/gnowsys_ndf/ndf/models/process_type.py
  77. +25 −0 gnowsys-ndf/gnowsys_ndf/ndf/models/query_utils.py
  78. +151 −0 gnowsys-ndf/gnowsys_ndf/ndf/models/relation_type.py
  79. +300 −0 gnowsys-ndf/gnowsys_ndf/ndf/models/triple.py
  80. +11 −6 gnowsys-ndf/gnowsys_ndf/ndf/signals.py
  81. +24 −1 gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/css/clix-activity-styles.css
  82. +2,446 −950 gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/css/themes/clix/clix2017.css
  83. +575 −543 gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/css/themes/clix/styles.css
  84. +575 −543 gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/css/themes/metastudio/styles.css
  85. +575 −543 gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/css/themes/nroer/styles.css
  86. +575 −543 gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/css/themes/tiss/styles.css
  87. +18 −4 gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/epub/content.opf
  88. +3 −1 gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/epub/epub_static_dependencies.json
  89. +86 −0 gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/epub/tool_mapping.json
  90. BIN gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/images/AnemeaTelugu.png
  91. BIN gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/images/Anemia_english.png
  92. BIN gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/images/Anemia_hindi.png
  93. BIN gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/images/BuildaMolecule_en.png
  94. BIN gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/images/BuildanAtom_en.png
  95. BIN gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/images/FST.png
  96. BIN gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/images/FishAlgae-English.jpg
  97. BIN gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/images/FishAlgae-Hindi.jpg
  98. BIN gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/images/FishAlgae-Telugu.jpg
  99. BIN gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/images/Motions_of_Moon.jpg
  100. BIN gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/images/Motions_of_Moon_hi.png
  101. BIN gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/images/Motions_of_Moon_te.png
  102. BIN gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/images/RP.png
  103. BIN gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/images/Rotation_of_Earth.jpg
  104. BIN gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/images/Rotation_of_Earth_hi.png
  105. BIN gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/images/Rotation_of_Earth_te.png
  106. BIN gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/images/Solar_System.jpg
  107. BIN gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/images/Solar_System_hi.png
  108. BIN gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/images/Solar_System_te.png
  109. +17 −0 gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/images/Transcript.svg
  110. BIN gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/images/curr-curriculum.png
  111. BIN gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/images/curriculum.png
  112. BIN gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/images/fst_en.png
  113. BIN gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/images/fst_hi.png
  114. BIN gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/images/icl_en.png
  115. BIN gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/images/icon-curriculum.png
  116. BIN gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/images/lesson_planning.png
  117. +593 −0 gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/images/mit-logo.svg
  118. +97 −0 gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/images/phet-logo-tm.svg
  119. BIN gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/images/rp_en.png
  120. BIN gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/images/rp_hi.png
  121. +76 −0 gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/images/sugar-xo-logo.svg
  122. +77 −0 gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/images/tata-trusts-logo.svg
  123. BIN gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/images/tatatrusts.png
  124. +32 −0 gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/images/turtle-blocks.svg
  125. +746 −22 gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/js/ckPlugins/addJhapp/plugin.js
  126. +30 −0 gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/js/gstudio-functions.js
  127. +86 −0 gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/js/rating.js
  128. +30 −1 gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/scss/_app_styles.scss
  129. +1,871 −370 gnowsys-ndf/gnowsys_ndf/ndf/static/ndf/scss/_clix2017.scss
  130. +1 −1 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/Upload_File.html
  131. +4 −1 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/action_panel.html
  132. +227 −55 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/activity_player.html
  133. +134 −108 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/add_asset.html
  134. +125 −0 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/asset_card.html
  135. +16 −16 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/asset_content_detail.html
  136. +103 −49 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/assets.html
  137. +6 −0 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/basecourse_group.html
  138. +287 −164 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/buddy.html
  139. +3 −3 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/card.html
  140. +20 −28 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/card_group.html
  141. +13 −16 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/course_about.html
  142. +13 −3 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/course_content.html
  143. +96 −49 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/course_page_create_edit.html
  144. +39 −43 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/course_pages.html
  145. +307 −0 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/course_quiz_data.html
  146. +47 −21 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/create_event_group.html
  147. +5 −6 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/create_group.html
  148. +60 −19 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/create_unit.html
  149. +2 −17 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/curriculum_create_edit.html
  150. +393 −0 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/curriculum_hierarchy.html
  151. +36 −0 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/curriculum_list.html
  152. +22 −0 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/curriculum_listing.html
  153. +59 −11 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/dev_query_doc.html
  154. +20 −0 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/epub_export_widget.html
  155. +15 −18 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/explore_2017.html
  156. +88 −15 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/explore_secondary_header.html
  157. +1 −1 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/file_list_tab.html
  158. +15 −3 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/filters.html
  159. +43 −72 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/footer_clix.html
  160. +47 −4 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/gbase.html
  161. +1 −2 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/gcollection_ajax_view.html
  162. +16 −5 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/gcourse_event_group.html
  163. +3 −3 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/gcourse_units.html
  164. +2 −3 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/get_info_pages.html
  165. +33 −18 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/gevent_base.html
  166. +3 −4 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/ggallerymodal.html
  167. +16 −5 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/gin-line-texteditor.html
  168. +40 −14 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/gnotebook.html
  169. +1 −1 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/group_pages.html
  170. +56 −47 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/header_clix.html
  171. +29 −12 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/horizontal_card.html
  172. +18 −12 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/in-line-texteditor.html
  173. +337 −15 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/jhapp_list.html
  174. +25 −55 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/landing_page_clix.html
  175. +118 −58 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/lms.html
  176. +103 −89 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/lms_dashboard.html
  177. +3 −3 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/lms_explore.html
  178. +53 −12 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/module_detail.html
  179. +2 −2 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/module_form.html
  180. +21 −17 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/node_ajax_content.html
  181. +16 −21 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/node_edit_base.html
  182. +78 −53 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/note_page.html
  183. +88 −74 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/quiz.html
  184. +25 −16 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/quiz_item_create_edit.html
  185. +94 −94 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/quiz_item_details.html
  186. +84 −67 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/quiz_player.html
  187. +33 −94 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/rating.html
  188. +27 −26 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/res_node_ajax_view.html
  189. +1,161 −0 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/section_subsection.html
  190. +1 −1 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/templates_list.html
  191. +251 −13 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/test_template.html
  192. +58 −0 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/tools_list.html
  193. +9 −167 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/topic_resources_listing.html
  194. +15 −10 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/translate_detail.html
  195. +1 −1 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/translate_form.html
  196. +5 −4 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/translation_list.html
  197. +6 −6 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/translation_page.html
  198. +9 −10 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/unit_player.html
  199. +355 −244 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/unit_structure.html
  200. +142 −78 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/user_course_analytics.html
  201. +50 −0 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/user_interactions.html
  202. +23 −9 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/widget_audio_player.html
  203. +1 −1 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/widget_card.html
  204. +13 −0 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/widget_card_list.html
  205. +126 −0 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/widget_cross_publish.html
  206. +157 −19 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/widget_enroll.html
  207. +12 −11 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/widget_interaction.html
  208. +2 −2 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/widget_metadata.html
  209. +32 −13 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/widget_node_form.html
  210. +9 −3 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/widget_photo_upload.html
  211. +2 −1 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/widget_selector.html
  212. +26 −16 gnowsys-ndf/gnowsys_ndf/ndf/templates/ndf/widget_video_player.html
  213. +9 −1 gnowsys-ndf/gnowsys_ndf/ndf/templates/registration/login.html
  214. +12 −1 gnowsys-ndf/gnowsys_ndf/ndf/templates/registration/login_clix.html
  215. +274 −36 gnowsys-ndf/gnowsys_ndf/ndf/templatetags/ndf_tags.py
  216. +14 −5 gnowsys-ndf/gnowsys_ndf/ndf/templatetags/simple_filters.py
  217. +9 −9 gnowsys-ndf/gnowsys_ndf/ndf/urls/__init__.py
  218. +7 −2 gnowsys-ndf/gnowsys_ndf/ndf/urls/ajax-urls.py
  219. +11 −0 gnowsys-ndf/gnowsys_ndf/ndf/urls/api_v1.py
  220. +13 −0 gnowsys-ndf/gnowsys_ndf/ndf/urls/api_v2.py
  221. +7 −1 gnowsys-ndf/gnowsys_ndf/ndf/urls/course.py
  222. +3 −0 gnowsys-ndf/gnowsys_ndf/ndf/urls/curriculum.py
  223. +0 −6 gnowsys-ndf/gnowsys_ndf/ndf/urls/dev_utilities.py
  224. +13 −0 gnowsys-ndf/gnowsys_ndf/ndf/urls/dev_utils.py
  225. +1 −1 gnowsys-ndf/gnowsys_ndf/ndf/urls/discussion.py
  226. +2 −2 gnowsys-ndf/gnowsys_ndf/ndf/urls/explore.py
  227. +1 −0 gnowsys-ndf/gnowsys_ndf/ndf/urls/group.py
  228. +9 −1 gnowsys-ndf/gnowsys_ndf/ndf/urls/gstudio_admin.py
  229. +2 −0 gnowsys-ndf/gnowsys_ndf/ndf/urls/module.py
  230. +4 −0 gnowsys-ndf/gnowsys_ndf/ndf/urls/quiz.py
  231. +8 −0 gnowsys-ndf/gnowsys_ndf/ndf/urls/tools.py
  232. +163 −28 gnowsys-ndf/gnowsys_ndf/ndf/views/ajax_views.py
  233. +223 −0 gnowsys-ndf/gnowsys_ndf/ndf/views/api_v1.py
  234. +286 −0 gnowsys-ndf/gnowsys_ndf/ndf/views/api_v2.py
  235. +104 −0 gnowsys-ndf/gnowsys_ndf/ndf/views/assessment_analytics.py
  236. +1 −1 gnowsys-ndf/gnowsys_ndf/ndf/views/audioDashboard.py
  237. +5 −2 gnowsys-ndf/gnowsys_ndf/ndf/views/buddy.py
  238. +180 −2 gnowsys-ndf/gnowsys_ndf/ndf/views/curriculum.py
  239. +34 −22 gnowsys-ndf/gnowsys_ndf/ndf/views/dev_utils.py
  240. +48 −21 gnowsys-ndf/gnowsys_ndf/ndf/views/discussion.py
  241. +2 −1 gnowsys-ndf/gnowsys_ndf/ndf/views/e-library.py
  242. +148 −36 gnowsys-ndf/gnowsys_ndf/ndf/views/explore.py
  243. +78 −42 gnowsys-ndf/gnowsys_ndf/ndf/views/export_to_epub.py
  244. +2 −1 gnowsys-ndf/gnowsys_ndf/ndf/views/file.py
  245. +15 −8 gnowsys-ndf/gnowsys_ndf/ndf/views/filehive.py
  246. +791 −161 gnowsys-ndf/gnowsys_ndf/ndf/views/gcourse.py
  247. +294 −138 gnowsys-ndf/gnowsys_ndf/ndf/views/group.py
  248. +10 −2 gnowsys-ndf/gnowsys_ndf/ndf/views/home.py
  249. +1 −1 gnowsys-ndf/gnowsys_ndf/ndf/views/imageDashboard.py
  250. +512 −591 gnowsys-ndf/gnowsys_ndf/ndf/views/methods.py
  251. +69 −4 gnowsys-ndf/gnowsys_ndf/ndf/views/module.py
  252. +1 −1 gnowsys-ndf/gnowsys_ndf/ndf/views/page.py
  253. +370 −250 gnowsys-ndf/gnowsys_ndf/ndf/views/quiz.py
  254. +4 −1 gnowsys-ndf/gnowsys_ndf/ndf/views/ratings.py
  255. +58 −0 gnowsys-ndf/gnowsys_ndf/ndf/views/tools.py
  256. +187 −6 gnowsys-ndf/gnowsys_ndf/ndf/views/translation.py
  257. +8 −0 gnowsys-ndf/gnowsys_ndf/ndf/views/trash.py
  258. +138 −30 gnowsys-ndf/gnowsys_ndf/ndf/views/unit.py
  259. +26 −10 gnowsys-ndf/gnowsys_ndf/ndf/views/userDashboard.py
  260. +15 −3 gnowsys-ndf/gnowsys_ndf/ndf/views/utils.py
  261. +1 −1 gnowsys-ndf/gnowsys_ndf/ndf/views/videoDashboard.py
  262. +13 −6 gnowsys-ndf/gnowsys_ndf/settings.py
  263. +15 −6 requirements.txt
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -92,6 +92,7 @@ mathjax/
*~
wikidata/
*local_settings.py
*server_settings.py
img/
media/

12 changes: 10 additions & 2 deletions INSTALL
Original file line number Diff line number Diff line change
@@ -74,8 +74,16 @@
(b) sudo apt-get update
(c) sudo apt-get install python-software-properties python g++ make nodejs
* For latest nodejs version:
(a) apt-get install npm
(b) sudo npm cache clean
- Removing existing node, nodejs and npm (if installed previously):
- apt-get remove nodejs npm node
- sudo apt-get purge nodejs npm node
- sudo rm -rvf /usr/local/bin/npm /usr/local/share/man/man1/node* /usr/local/lib/dtrace/node.d ~/.npm ~/.node-gyp /opt/local/bin/node opt/local/include/node /opt/local/lib/node_modules
- sudo rm -rfv /usr/local/lib/node*
- sudo rm -rfv /usr/local/include/node*
- sudo rm -rfv /usr/local/bin/node*

(a) sudo apt-get install npm
(b) sudo npm cache clean OR sudo npm cache vefify
(c) sudo npm install -g n
(d) sudo n latest
(e) ln -sf /usr/local/n/versions/node/<version no from above step>/bin/node /usr/bin/node
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -2,8 +2,7 @@ gstudio
=======

gstudio is an implementation of http://www.gnu.org/software/gnowsys/
which is a Node Description Framework (NDF). It is a frame-based
knowledge representation model.
which is a Node Description Framework (NDF). It is uses the framework of a graph database for developing user friendly apps for teachers, students and citizens.

The project is released under GNU AGPL v3 license.

@@ -22,7 +21,7 @@ Live sites using gstudio
- http://nroer.gov.in/
- http://i2c-clix.tiss.edu/ and several offline instances running in schools (as school servers)
- http://studio.tiss.edu/ (archived)
-

Mailing list
------------

20 changes: 20 additions & 0 deletions doc/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = python -msphinx
SPHINXPROJ = gstudio
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
52 changes: 44 additions & 8 deletions doc/deployer/Migrating_SQLite_DB_to_PostgreSQL.txt
Original file line number Diff line number Diff line change
@@ -76,30 +76,66 @@ TRANSFERRING DATA FROM OLD/sqlite TO PostgreSQL

=======================================================

# Misc: commands tried:
# Misc commands:

# dumps data with traceback on terminal:
# $ python manage.py dumpdata --indent=2 -v 2 --traceback
$ python manage.py dumpdata --indent=2 -v 2 --traceback


# Dump data excluding above specified excluded apps:
# $ ./manage.py dumpdata --exclude auth.permission --exclude contenttypes --exclude memcache_admin > db.json
$ ./manage.py dumpdata --exclude auth.permission --exclude contenttypes --exclude memcache_admin > db.json


# to inspect DB:
# $ python manage.py inspectdb
$ python manage.py inspectdb


# list all table names from django project shell:
# from django.db import connections
# connection = connections['default']
# connection.introspection.table_names()
>>> from django.db import connections
>>> connection = connections['default']
>>> connection.introspection.table_names()

Updating size of notification columns.

# Updating size of notification columns.
alter table notification_noticetype alter COLUMN display TYPE varchar(1024);
alter table notification_noticetype alter COLUMN label TYPE varchar(1024);
alter table notification_noticetype alter COLUMN description TYPE varchar(1024);


# to reset last author id
select max(id) from auth_user;
select max_value from auth_user_id_seq;
ALTER SEQUENCE auth_user_id_seq RESTART WITH 1261000;
alter sequence auth_user_id_seq restart


# Tabing BACKUP/DUMP of all DBs and table
pg_dumpall > file-name.sql


# DROP database
$ sudo su - postgres
# getting into psql
postgres@62ea0453f8a2:~$ psql
# listing of tables
postgres=# \l
postgres=# drop database gstudio_psql ;


# RESTORE SQL table:
$ echo "psql -f <path and name of dump file e.g: pg_dump_all.sql> ;" | sudo su - postgres


# links:
http://www.thegeekstuff.com/2009/01/how-to-backup-and-restore-postgres-database-using-pg_dump-and-psql/


# To know size of each and every table of db:
root@mz3:/home/docker/code# su - postgres
postgres@mz3:~$ psql
postgres=# \c gstudio_psql
gstudio_psql=# SELECT
relname as "Table",
pg_size_pretty(pg_total_relation_size(relid)) As "Size",
pg_size_pretty(pg_total_relation_size(relid) - pg_relation_size(relid)) as "External Size"
FROM pg_catalog.pg_statio_user_tables ORDER BY pg_total_relation_size(relid) DESC;
10 changes: 6 additions & 4 deletions doc/deployer/create_authusers_from_code_username_password_csv.py
Original file line number Diff line number Diff line change
@@ -24,6 +24,7 @@
with open(file_input, 'rb') as csvfile:
users = csv.reader(csvfile, delimiter=',')
for school_code, username, password in users:
# for school_code, username, password, user_id, first_name, last_name in users:

# email validation from username
email = ''
@@ -33,6 +34,7 @@

temp_csv_log_list = [school_code, username, password]
user_obj = User.objects.create_user(username=username, email=email, password=password)
# user_obj = User.objects.create_user(username=username, email=email, password=password, first_name=first_name, last_name=last_name)
user_id = user_obj.id

temp_csv_log_list.append(str(user_id))
@@ -43,10 +45,10 @@
auth['member_of'] = [auth_gst_id]
auth['group_type'] = u"PUBLIC"
auth['edit_policy'] = u"NON_EDITABLE"
auth['created_by'] = user_id
auth['modified_by'] = user_id
auth['contributors'] = [user_id]
auth['group_admin'] = [user_id]
auth['created_by'] = int(user_id)
auth['modified_by'] = int(user_id)
auth['contributors'] = [int(user_id)]
auth['group_admin'] = [int(user_id)]
auth['agency_type'] = "Student"
auth['_id'] = ObjectId()
auth.save(groupid=auth['_id'])
3 changes: 3 additions & 0 deletions doc/deployer/create_user_detail_csvs.py
Original file line number Diff line number Diff line change
@@ -20,8 +20,10 @@
# statecode_cum_range_dict = {'mz': (1, 200), 'rj': (201, 500), 'ct': (501, 800), 'tg': (801, 1100), 'sp': (1100, 1300)}

statecode_range_dict = {'mz': (1, 200), 'rj': (1, 300), 'ct': (1, 300), 'tg': (1, 300), 'sp': (1, 300)}
# statecode_range_dict = {'dl': (1, 50)}

state_startwith_dict = {'mz': 0, 'rj': 200, 'ct': 500, 'tg': 800, 'sp': 1100}
# state_startwith_dict = {'dl': 1400}


# ------ for generating school codes ------
@@ -112,6 +114,7 @@ def create_users_csv(csv_file_name_path, code, start_user_id, last_user_id, user
# print complete_data_list

user_id_creation_order = ['cc', 'mz', 'rj', 'ct', 'tg', 'sp']
# user_id_creation_order = ['dl']
# user_id_creation_order = ['cc', 'mz']

create_users_csv(st_usernames, 'cc', start_user_id=2, last_user_id=1000, user_type='users')
54 changes: 54 additions & 0 deletions doc/deployer/del_has_thread_update.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
from gnowsys_ndf.ndf.models import *
from gnowsys_ndf.ndf.views.methods import create_gattribute
twist_gst = node_collection.one({'_type': "GSystemType", 'name': "Twist"})
has_thread_rt = node_collection.one({'_type': 'RelationType', 'name': 'has_thread'})
reply_gst = node_collection.one({'_type': "GSystemType", 'name': "Reply"})
# get all has_thread grel having status deleted
del_has_thread_grel = triple_collection.find({'relation_type': has_thread_rt._id, 'status': 'DELETED'})

# for ref.
node_and_del_thread = {each_thread.right_subject:each_thread.subject for each_thread in del_has_thread_grel}
del_has_thread_grel.rewind()
# find all its right_subj i.e thread nodes
del_thread_node_ids = [each_thr.right_subject for each_thr in del_has_thread_grel]
# fetch thread only if it has any comments attached to it
del_thread_cur = node_collection.find({'_id': {'$in': del_thread_node_ids}, 'author_set': {'$ne': []}})
print "\nTotal Old Threads holding comments references: ", del_thread_cur.count()

# if yes find related/newly created thread obj ('PUBLISHED')
# attach the comments to the newly created thread obj
for each_th_obj in del_thread_cur:
# print "\neach_th_obj.author_set: ", each_th_obj.author_set, " -- ", each_th_obj._id
subj_id = node_and_del_thread[each_th_obj._id]
pub_has_thread_grel = triple_collection.find_one({'relation_type': has_thread_rt._id,
'subject': subj_id, 'status': 'PUBLISHED'})
# print "\n ObjectId(pub_has_thread_grel.right_subject): ", ObjectId(pub_has_thread_grel.right_subject)

triples_of_del_th = triple_collection.find({'subject': each_th_obj._id, '_type': 'GAttribute'})
print create_gattribute(ObjectId(pub_has_thread_grel.right_subject), 'release_response', True)
# triple_collection.collection.update({'subject': each_th_obj._id, '_type': 'GAttribute'},
# {'$set': {'subject': ObjectId(pub_has_thread_grel.right_subject)}},upsert=False, multi=True)
pub_thread_res = node_collection.collection.update({
'_id': ObjectId(pub_has_thread_grel.right_subject)},
{'$addToSet': {'author_set': {'$each': each_th_obj.author_set}}},
upsert=False, multi=False)
print "\nPublished Thread updates result: ", pub_thread_res
del_thread_replies = node_collection.collection.update({
'prior_node': each_th_obj._id, 'member_of': reply_gst._id},
{'$set': {'prior_node': [ObjectId(pub_has_thread_grel.right_subject)],
'origin': [{u'thread_id': ObjectId(pub_has_thread_grel.right_subject)}]}},
upsert=False, multi=True)
print "\nDeleted Thread updates result: ", del_thread_replies

th = node_collection.find({'member_of': twist_gst._id})
print "\n Total threads: ", th.count()
th_ids = [e._id for e in th]
rel_resp_at = node_collection.one({'_type': 'AttributeType', 'name': 'release_response'})
tr = triple_collection.find({'attribute_type': rel_resp_at._id, 'subject': {'$in': th_ids}})
th_with_rel_resp = [e.subject for e in tr ]
print "\n Threads having release_response set: ", len(th_with_rel_resp)
th_ids_with_no_rel_resp = set(th_ids) - set(th_with_rel_resp)
print "\n Threads NOT having release_response set: ", len(th_ids_with_no_rel_resp)
th_ids_with_no_rel_resp = list(th_ids_with_no_rel_resp)
for each_th_with_no_rel_resp in th_ids_with_no_rel_resp:
create_gattribute(ObjectId(each_th_with_no_rel_resp), 'release_response', True)
12 changes: 8 additions & 4 deletions doc/deployer/delete_all_non_webm_files.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# This Script will delete all mp4 files if it has webm and will replace mp4 objects with webm objects

from gnowsys_ndf.ndf.models import *

video_files_cur = node_collection.find({
@@ -7,10 +8,11 @@


if video_files_cur:
print "\n All Video files count: ", video_files_cur.count()

for each in video_files_cur:
total_video_files = video_files_cur.count()
print "\n All Video files count: ", total_video_files

for index, each in enumerate(video_files_cur):
print "Processing: [ ", index, " of ", total_video_files, " ]"
each_mid_url = each.if_file.mid.relurl
each_original_url = each.if_file.original.relurl

@@ -20,7 +22,9 @@
print "\n\nUpdating " + each.name + str(each._id)
# following will delete filehive instance as well as file from hashFS.
Filehive.delete_file_from_filehive(each.if_file.original.id, each_original_url)
# TODO: but one additional check needs to be added to check if this particular file is not reference anywhere else.
# TODO:
# 1. but one additional check needs to be added to check if this particular file is not reference anywhere else.
# 2. update 'if_file.mime'

each.if_file.original.relurl = each_mid_url
each.if_file.original.id = each.if_file.mid.id
3 changes: 3 additions & 0 deletions doc/deployer/logout_all_users.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from gnowsys_ndf.ndf.models import ActiveUsers

ActiveUsers.logout_all_users()
4 changes: 3 additions & 1 deletion doc/deployer/migrate_group_resources.py
Original file line number Diff line number Diff line change
@@ -9,12 +9,14 @@
source_group_id = raw_input("Enter source group _id: ")
destination_group_id = raw_input("Enter destination group _id: ")

resource_type_input = raw_input("\nChoose Resource type:\n 1. File\n 2. Page\n 3. Cancel\nEnter option no. (1 or 2 or 3): ")
resource_type_input = raw_input("\nChoose Resource type:\n 1. File\n 2. Page\n 3. Asset\n 4. Cancel\nEnter option no. (1 or 2 or 3): ")
if resource_type_input == '1':
resource_type_name = 'File'
elif resource_type_input == '2':
resource_type_name = 'Page'
elif resource_type_input == '3':
resource_type_name = 'Asset'
elif resource_type_input == '4':
sys.exit()
else:
print '\nYou have choosen wrong option. "File" will be default option selected in this case.'
70 changes: 70 additions & 0 deletions doc/deployer/release2_sept17.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
from gnowsys_ndf.ndf.models import Node, node_collection
from gnowsys_ndf.ndf.views.methods import dig_nodes_field, create_gattribute
try:
from bson import ObjectId
except ImportError: # old pymongo
from pymongo.objectid import ObjectId

units_for_renaming_leaf_nodes = [ObjectId('5944c6954975ac013e9ee760'),
ObjectId('5943f3f94975ac013d36fa53'),
ObjectId('5943ff594975ac013d3701fc'),
ObjectId('5943fd564975ac013d36fdae'),
ObjectId('59425be44975ac013cccb909'),
ObjectId('5943d4a54975ac013f4ddce0'),
ObjectId('59425c964975ac013cccba9d'),
ObjectId('5942605d4975ac013cccbe52'),
ObjectId('59425cc54975ac013cccbae4'),
ObjectId('59425d1a4975ac013cccbb8b'),
ObjectId('594260214975ac013d976c55'),
ObjectId('59425de84975ac013bf0f46e'),
ObjectId('59425e464975ac013cccbc4d'),
ObjectId('59425fc64975ac013d976b32'),
ObjectId('59425f864975ac013d976ac6'),
ObjectId('59425ead4975ac013bf0f54b'),
ObjectId('594260a54975ac013d976dc3')]

module_sort_order_ids = [u'59abb47c69602a0156036296', u'5945db6e2c4796014abd1784',\
u'5945db2e2c4796014ddff67a', u'5945de532c4796014abd181a', u'5945de362c4796014ce12d7f',\
u'5938ed2369602a014cb67195', u'5945ddca2c4796014ddff735', u'599c139269602a013fe31aa2',\
u'59816df569602a015784baea', u'594b833869602a013f0cb6ce', u'594cfbea69602a014089845b', \
u'597ebd7b69602a0154bb417e', u'5945daf42c4796014ce12d2d', u'59aff39869602a0155bfac16']


try:
module_obj_list = []
for each_id in module_sort_order_ids:
try:
each_node = Node.get_node_by_id(ObjectId(each_id))
if each_node:
module_obj_list.append(each_node)
except Exception as modulde_not_found_err:
print "\nError in module_not_found for each_id: ", each_id, "\nError: ", modulde_not_found_err
pass
print "\nTotal modules: ", len(module_obj_list)
home_grp_id = node_collection.one({'_type': 'Group', 'name': 'home'})._id
create_gattribute(home_grp_id, 'items_sort_list', module_obj_list)
except Exception as module_sort_order_ids_err:
pass
print "\nError in module_sort_order_ids. ", module_sort_order_ids_err
units_cur = node_collection.find({'_type': 'Group', '_id': {'$in': units_for_renaming_leaf_nodes}})
for each_unit in units_cur:
try:
if each_unit:
print "\nUnit: ", each_unit.name
all_leaf_node_ids = dig_nodes_field(parent_node=each_unit, only_leaf_nodes=True)
all_leaf_node_cur = node_collection.find({'_id': {'$in': all_leaf_node_ids}})
print "\nLeaf nodes found: ", all_leaf_node_cur.count()
for each_node in all_leaf_node_cur:
name_val = each_node.name
if name_val != each_node.altnames:
each_node.altnames = name_val # Unique name --> Display name
each_node.save()
try:
print "\n ", each_node.altnames , " --->", each_node.name
except Exception as e:
pass
else:
print "\nNo Group found!!"
except Exception as units_for_renaming_leaf_nodes_err:
pass
print "\nError in units_for_renaming_leaf_nodes. ", units_for_renaming_leaf_nodes_err
Loading