Commit 5919d6dd authored by Rachana's avatar Rachana

Conflicts resolved with master

parents ce550ee5 23fb8b14
...@@ -12,12 +12,12 @@ ...@@ -12,12 +12,12 @@
[1] Installing required following packages and its dependencies: [1] Installing required following packages and its dependencies:
> sudo apt-get install python-setuptools git build-essential python-dev rcs mongodb emacs24 python-virtualenv ipython libjpeg-dev memcached libevent-dev libfreetype6-dev zlib1g-dev ffmpeg2theora rabbitmq-server > sudo apt-get install python-setuptools git build-essential python-dev rcs mongodb python-virtualenv ipython libjpeg-dev memcached libevent-dev libfreetype6-dev zlib1g-dev ffmpeg2theora rabbitmq-server
[2] Get latest version of gstudio-mongokit using one of the following commands: [2] Get latest version of gstudio using one of the following commands:
(1) git clone https://github.com/gnowledge/gstudio.git (1) git clone https://github.com/gnowledge/gstudio.git
(2) git clone git@github.com:gnowledge/gstudio.git (2) git clone git@github.com:gnowledge/gstudio.git
[3] Use following commands to install ffmpeg package: [3] Use following commands to install ffmpeg package:
...@@ -25,48 +25,15 @@ ...@@ -25,48 +25,15 @@
(2) sudo apt-get update (2) sudo apt-get update
(3) sudo apt-get install ffmpeg gstreamer0.10-ffmpeg (3) sudo apt-get install ffmpeg gstreamer0.10-ffmpeg
[4] In case your distribution of GNU/Linux is not latest, you may not [4] Set up virtual environment for gstudio:
find emacs24 in your repositories. In that case, satisfy the requirement
by following these instructions:
(1) sudo add-apt-repository ppa:cassou/emacs
(2) sudo apt-get update
(3) sudo apt-get install emacs24 emacs24-el emacs24-common-non-dfsg
[5] Setting up Emacs working environment:
Create an init file in your user directory with filename as '.emacs'
(i.e., /home/<username>/.emacs) to store default settings for emacs
, which includes following lines of code:
NOTE: How to get org-version?
(1) Open emacs editor
(2) Press Alt+X
(3) Enter following command: org-version [Then Press Enter]
(a) For org-version < 8.0: Copy following lines of code in above specified file and save it
(custom-set-variables
'(inhibit-startup-screen t)
'(org-export-html-preamble nil)
'(org-export-html-postamble nil)
)
(b) For org-version >= 8.0: : Copy following lines of code in above specified file and save it
(custom-set-variables
'(inhibit-startup-screen t)
'(org-html-preamble nil)
'(org-html-postamble nil)
)
[6] Set up virtual environment for gstudio-mongokit:
(1) cd gstudio (1) cd gstudio
(2) virtualenv --system-site-packages . # NOTE: Here '.' indicates current directory (2) virtualenv --system-site-packages . # NOTE: Here '.' indicates current directory
(3) source bin/activate # Activates virtual environment (3) source bin/activate # Activates virtual environment
(4) ./bin/pip install -r requirements.txt # NOTE: Here '.' indicates current directory (4) ./bin/pip install -r requirements.txt # NOTE: Here '.' indicates current directory
[7] SMTP configuration for notifications: [5] SMTP configuration for notifications:
To make SMTP server ready for sending mail (development purpose only), you can use To make SMTP server ready for sending mail (development purpose only), you can use
either of the following methods: either of the following methods:
...@@ -79,20 +46,20 @@ ...@@ -79,20 +46,20 @@
(a) Go to settings.py file and search for "#SMTP setting for (a) Go to settings.py file and search for "#SMTP setting for
sending mail" and uncomment gmail smtp setting and comment sending mail" and uncomment gmail smtp setting and comment
default python smtp settings. default python smtp settings.
(b) Edit following with your gmail credentials and save (b) Edit following with your gmail credentials and save
settings.py file:- settings.py file:-
EMAIL_HOST_USER = 'yourcompleteemailid' EMAIL_HOST_USER = 'yourcompleteemailid'
EMAIL_HOST_PASSWORD = 'yourpassword' EMAIL_HOST_PASSWORD = 'yourpassword'
[8] Install JS/CSS dependencies using Bower: [6] Install JS/CSS dependencies using Bower:
(1) Activate your virtual environment: (1) Activate your virtual environment:
> source bin/activate > source bin/activate
(2) A tool to create isolated node.js environment which is integrated (2) A tool to create isolated node.js environment which is integrated
with environment built by python virtualenv: with environment built by python virtualenv:
> sudo apt-get install curl > sudo apt-get install curl
> pip install nodeenv > pip install nodeenv
...@@ -101,7 +68,7 @@ ...@@ -101,7 +68,7 @@
> nodeenv --python-virtualenv > nodeenv --python-virtualenv
If above step gives an error, install NodeJS at root level with If above step gives an error, install NodeJS at root level with
following commands: following commands:
(a) sudo add-apt-repository ppa:chris-lea/node.js (a) sudo add-apt-repository ppa:chris-lea/node.js
(b) sudo apt-get update (b) sudo apt-get update
(c) sudo apt-get install python-software-properties python g++ make nodejs (c) sudo apt-get install python-software-properties python g++ make nodejs
...@@ -113,7 +80,7 @@ ...@@ -113,7 +80,7 @@
> cd gstudio/gnowsys-ndf # Navigate to project-root > cd gstudio/gnowsys-ndf # Navigate to project-root
> bower install # Install depenedencies > bower install # Install depenedencies
[9] Install Search Dependencies: [7] Install Search Dependencies:
(1) Run following command: (1) Run following command:
> pip install -U pyyaml nltk > pip install -U pyyaml nltk
...@@ -156,7 +123,7 @@ ...@@ -156,7 +123,7 @@
> cd gstudio/gnowsys-ndf > cd gstudio/gnowsys-ndf
(3) Start mongodb server: (3) Start mongodb server:
> sudo service mongodb start > sudo service mongodb start
(4) Run following management commands: (4) Run following management commands:
...@@ -170,7 +137,7 @@ ...@@ -170,7 +137,7 @@
refer following file: gstudio/doc/schema_setup.og refer following file: gstudio/doc/schema_setup.og
(5) Now point your browser to http://localhost:8000 to see (5) Now point your browser to http://localhost:8000 to see
gstudio on your browser. Enjoy. gstudio on your browser. Enjoy.
* Follow gstudio UPDATE(s) * Follow gstudio UPDATE(s)
...@@ -179,8 +146,8 @@ ...@@ -179,8 +146,8 @@
from project's git repository. After each update run above specified from project's git repository. After each update run above specified
management commands in the given order. management commands in the given order.
> git pull https://github.com/gnowledge/gstudio.git mongokit > git pull https://github.com/gnowledge/gstudio.git master
> git pull origin mongokit # Or Simply > git pull origin master # Or Simply
* For 'Replication' and 'mail-client' features refer: doc/Mailclient * For 'Replication' and 'mail-client' features refer: doc/Mailclient
...@@ -196,7 +163,7 @@ ...@@ -196,7 +163,7 @@
(b) Running compass: (b) Running compass:
(1) Navigate to project-root directory (where your "manage.py" file resides), i.e. (1) Navigate to project-root directory (where your "manage.py" file resides), i.e.
> cd gstudio/gnowsys-ndf > cd gstudio/gnowsys-ndf
(2) Run following command (to start compass) and then edit scss stylesheets: (2) Run following command (to start compass) and then edit scss stylesheets:
> compass watch > compass watch
......
# 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({
'if_file.mime_type': {'$regex': str('video'), '$options': "i"}
})
if video_files_cur:
print "\n All Video files count: ", video_files_cur.count()
for each in video_files_cur:
each_mid_url = each.if_file.mid.relurl
each_original_url = each.if_file.original.relurl
# `if_file.mid.relurl` contains converted (webm) file.
if each_mid_url and (each_original_url != each_mid_url):
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.
each.if_file.original.relurl = each_mid_url
each.if_file.original.id = each.if_file.mid.id
each.save()
import sys
from gnowsys_ndf.ndf.models import * from gnowsys_ndf.ndf.models import *
from gnowsys_ndf.ndf.views.methods import *
copy_files = False copy_files = False
move_files = False move_files = False
clone_files = False
hard_clone_files = False
source_group_id = raw_input("Enter source group _id: ") source_group_id = raw_input("Enter source group _id: ")
destination_group_id = raw_input("Enter destination 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\nEnter option no. (1 or 2): ") 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): ")
if resource_type_input == '1': if resource_type_input == '1':
resource_type_name = 'File' resource_type_name = 'File'
elif resource_type_input == '2': elif resource_type_input == '2':
resource_type_name = 'Page' resource_type_name = 'Page'
elif resource_type_input == '3':
sys.exit()
else: else:
print '\nYou have choosen wrong option. "File" will be default option selected in this case.' print '\nYou have choosen wrong option. "File" will be default option selected in this case.'
resource_type_name = 'File' resource_type_name = 'File'
print '\nYou have choosen resource type: ', resource_type_name, '\n' print '\nYou have choosen resource type: ', resource_type_name, '\n'
copy_or_move = raw_input("Enter c/C to copy the files OR m/M to move the files :") operation_choice = raw_input("\nChoose Operation type:\n 1. Copy\n 2. Move\n 3. Clone (Does NOT Clone GAttribute and GRelations)\n 4. Hard Clone (Clones GAttribute and GRelations)\n 5. Cancel\nEnter option no. (1 or 2 or 3 or 4 or 5): ")
if copy_or_move == 'c' or copy_or_move == 'C': if operation_choice == '1':
copy_files = True copy_files = True
elif copy_or_move == 'm' or copy_or_move == 'M': elif operation_choice == '2':
move_files = True move_files = True
elif operation_choice == '3':
clone_files = True
elif operation_choice == '4':
hard_clone_files = True
elif operation_choice == '5':
sys.exit()
else: else:
print "\nInvalid option." print "\nInvalid option."
try: try:
source_group_obj = node_collection.one({'_id': ObjectId(source_group_id)}) source_group_obj = node_collection.one({'_id': ObjectId(source_group_id)})
destination_group_obj = node_collection.one({'_id': ObjectId(destination_group_id)}) destination_group_obj = node_collection.one({'_id': ObjectId(destination_group_id)})
...@@ -39,9 +50,6 @@ try: ...@@ -39,9 +50,6 @@ try:
'_type': 'GSystem', '_type': 'GSystem',
'group_set': source_group_obj._id, 'group_set': source_group_obj._id,
'member_of': {'$in': [member_of_gst._id]} 'member_of': {'$in': [member_of_gst._id]}
# 'if_file.mime_type': {
# '$exists': True, '$ne': None
# }
}) })
if source_grp_files.count(): if source_grp_files.count():
...@@ -51,28 +59,33 @@ try: ...@@ -51,28 +59,33 @@ try:
if copy_move_confirmation == 'y' or copy_move_confirmation == 'Y': if copy_move_confirmation == 'y' or copy_move_confirmation == 'Y':
for each_source_file in source_grp_files: for each_source_file in source_grp_files:
if copy_files and not move_files: if copy_files:
if destination_group_obj._id not in each_source_file.group_set: if destination_group_obj._id not in each_source_file.group_set:
each_source_file.group_set.append(destination_group_obj._id) each_source_file.group_set.append(destination_group_obj._id)
each_source_file.save()
elif move_files and not copy_files: elif move_files:
# Remove source_group_id and add destination_group_id # Remove source_group_id and add destination_group_id
# This is to prevent file that are cross-published # This is to prevent file that are cross-published
# to multiple groups other than source_group # to multiple groups other than source_group
each_source_file.group_set.remove(source_group_obj._id) each_source_file.group_set.remove(source_group_obj._id)
if destination_group_obj._id not in each_source_file.group_set: if destination_group_obj._id not in each_source_file.group_set:
each_source_file.group_set.append(destination_group_obj._id) each_source_file.group_set.append(destination_group_obj._id)
each_source_file.save()
# after doing copy/move (update of group_set), save object: elif clone_files:
each_source_file.save() print "\n Preparing to Clone object. Please wait."
each_new_file = create_clone(1, each_source_file, destination_group_obj._id)
elif hard_clone_files:
print "\n Preparing to Hard Clone object. Please wait."
each_new_file = replicate_resource(None, each_source_file, destination_group_obj._id)
# after doing copy/move/object (update of group_set), save object:
else: else:
print "\n No files found in source group." print "\n No files found in source group."
else: else:
print "\n Either source/destination group does not exist." print "\n Either source or destination group does not exist."
except Exception as copy_move_files_err: except Exception as copy_move_files_err:
print "\n Error occurred!!!! ", copy_move_files_err print "\n Error occurred!!!! ", copy_move_files_err
...@@ -4,8 +4,9 @@ COURSE ...@@ -4,8 +4,9 @@ COURSE
total_modules : No. of modules in the course total_modules : No. of modules in the course
total_units : No. of units in the course total_units : No. of units in the course
units_completed : No. of Units the user has completed. units_completed : No. of Units the user has completed.
Completion is calculated on viewing/visiting the activities under a unit. Completion is calculated on viewing/visiting the activities under a unit.
modules_completed : No. of Modules the user has completed. If all the units falling under a module are marked as completed, the module is then considered to be completed. modules_completed : No. of Modules the user has completed. If all the units falling under a module are marked as
completed, the module is then considered to be completed.
module_progress_meter : Completed Modules/ Total Modules module_progress_meter : Completed Modules/ Total Modules
unit_progress_meter : Completed Units/ Total Units unit_progress_meter : Completed Units/ Total Units
=============================================================== ===============================================================
...@@ -15,13 +16,13 @@ user_files : No. of files uploaded by user ...@@ -15,13 +16,13 @@ user_files : No. of files uploaded by user
other_viewing_my_files : No. of other(unique) users who viewed user's files other_viewing_my_files : No. of other(unique) users who viewed user's files
total_rating_rcvd_on_files : Average of all user's files ratings. [(Sum of rating of 'N' files)/ 'N'] total_rating_rcvd_on_files : Average of all user's files ratings. [(Sum of rating of 'N' files)/ 'N']
total_files_viewed_by_user : No. of other's files viewed by the user. total_files_viewed_by_user : No. of other's files viewed by the user.
If a single file is viewed more than once, it will be considered/counted as 1 file view. If a single file is viewed more than once, it will be considered/counted as 1 file view.
=============================================================== ===============================================================
NOTES NOTES
user_notes : No. of notes created by user user_notes : No. of notes created by user
total_notes_read_by_user : No. of other's notes read by the user. total_notes_read_by_user : No. of other's notes read by the user.
If a single note is read more than once, it will be considered/counted as 1 note read. If a single note is read more than once, it will be considered/counted as 1 note read.
total_rating_rcvd_on_notes : Average of all user's notes ratings [(Sum of rating of 'N' notes)/ 'N']. total_rating_rcvd_on_notes : Average of all user's notes ratings [(Sum of rating of 'N' notes)/ 'N'].
others_reading_my_notes : No. of other(unique) users who read user's notes. others_reading_my_notes : No. of other(unique) users who read user's notes.
=============================================================== ===============================================================
...@@ -85,7 +86,7 @@ Module Completion Logic: ...@@ -85,7 +86,7 @@ Module Completion Logic:
But, since Activity_7 is not viewed, Unit_6 and Session_4 will be marked as 'Incomplete' and hence, But, since Activity_7 is not viewed, Unit_6 and Session_4 will be marked as 'Incomplete' and hence,
Module_2 is also 'Incomplete'. Module_2 is also 'Incomplete'.
An Activity may contain: An Activity is one of the following:
1. Page 1. Page
- requires viewing/visiting it to mark complete - requires viewing/visiting it to mark complete
2. File 2. File
......
Create New GSystem
1.The new GSystem can be create from the Admin Designer tab.
1.1. The user is required to select a GSystemType depending on which a corressponding GSystem template would be loaded.
1.2. Here there are two possible cases:
1.2.1. If the GSystemType select, has its own .html page (eg. The GSystemType Page has its own
page.html ) then that page would be loaded.
1.2.2. If the GSystemType selected does not have its own .html page,then a dynamic
page is loaded having the fields based on :
1.2.2.1. attribute_type_set of the GSystemType selected
1.2.2.2. relation_type_set of the GSystemType selected
1.2.2.3. get_possible_attributes of the GSystemType selected, fetched by using the
method in models.py
1.2.2.4. get_possible_relations of the GSystemType selected, fetched by using the
method in models.py
(NOTE: In case, there is any duplicity between attribute_type_set and get_possible_attributes, then the duplicate fields from get_possible_attributed are removed.)
1.2.2.5. Default fields of GSystem class.
1.3. After the form is saved, the corressponding GAttribute's and GRelation's are added.
2. The form saved can be edited from the admin/data/GSystem or admin/designer/GSystem drawer.
3. The Graphs: Concept Graph, Collection Graph, Dependency Graph can be viewed from admin/data/GSystem
and admin/designer/GSystem drawer.
...@@ -85,6 +85,6 @@ quizitem_max_attempts,QuizItem Maximum Attempts,int,[],"[""QuizItem"",""QuizItem ...@@ -85,6 +85,6 @@ quizitem_max_attempts,QuizItem Maximum Attempts,int,[],"[""QuizItem"",""QuizItem
quizitem_check_answer,QuizItem Check Answer,bool,[],"[""QuizItem"",""QuizItemEvent""]",FALSE,TRUE,[],[], quizitem_check_answer,QuizItem Check Answer,bool,[],"[""QuizItem"",""QuizItemEvent""]",FALSE,TRUE,[],[],
quizitempost_user_submitted_ans,QuizItemPost User Submitted Answer,list,[],"[""QuizItemPost""]",TRUE,TRUE,[],[], quizitempost_user_submitted_ans,QuizItemPost User Submitted Answer,list,[],"[""QuizItemPost""]",TRUE,TRUE,[],[],
quizitempost_user_checked_ans,QuizItemPost User Checked Answer,list,[],"[""QuizItemPost""]",TRUE,TRUE,[],[], quizitempost_user_checked_ans,QuizItemPost User Checked Answer,list,[],"[""QuizItemPost""]",TRUE,TRUE,[],[],
discussion_enable,Discussion Enable,bool,[],"[""Page"", ""File"",""E-Book"",""QuizItemEvent""]",TRUE,TRUE,[],[], discussion_enable,Discussion Enable,bool,[],"[""Page"", ""File"",""E-Book"",""QuizItemEvent"", ""Jsmol"", ""TurtleBlocks"", ""PoliceSquad"", ""OpenStoryTool"", ""BioMechanics""]",TRUE,TRUE,[],[],
is_bigbluebutton,Online Meeting,bool,[],"[""Event""]",TRUE,TRUE,[],[], is_bigbluebutton,Online Meeting,bool,[],"[""Event""]",TRUE,TRUE,[],[],
open_event,Open Event (All group members can join the event),bool,[],"[""Event""]",TRUE,TRUE,[],[], open_event,Open Event (All group members can join the event),bool,[],"[""Event""]",TRUE,TRUE,[],[],
...@@ -43,6 +43,6 @@ subject_type,member_of,name,altnames,inverse_name,object_type,object_cardinality ...@@ -43,6 +43,6 @@ subject_type,member_of,name,altnames,inverse_name,object_type,object_cardinality
"[""StudentCourseEnrollment"",""Page"",""File""]","[""Binary""]",has_current_approval_task,Approval Task;Enrollment,task_for_enrollment_approval,"[""Task""]",1 "[""StudentCourseEnrollment"",""Page"",""File""]","[""Binary""]",has_current_approval_task,Approval Task;Enrollment,task_for_enrollment_approval,"[""Task""]",1
"[""Event""]","[""Binary""]",event_has_batch,Batch;Event,batch_for_event,"[""Batch""]",1 "[""Event""]","[""Binary""]",event_has_batch,Batch;Event,batch_for_event,"[""Batch""]",1
"[""CourseEventGroup""]","[""Binary""]",group_has_course_event,CourseEventGroup;Course,course_event_for_group,"[""Course""]",1 "[""CourseEventGroup""]","[""Binary""]",group_has_course_event,CourseEventGroup;Course,course_event_for_group,"[""Course""]",1
"[""Course"",""Group"",""ProgramEventGroup"",""PartnerGroup""]","[""Binary""]",has_logo,Course;File,logo_of,"[""File""]",1 "[""Course"",""BaseCourseGroup"",""Group"",""ProgramEventGroup"",""PartnerGroup""]","[""Binary""]",has_logo,Course;File,logo_of,"[""File""]",1
"[""QuizItemEvent"",""Page"",""File""]","[""Binary""]",clone_of,QuizItemEvent;QuizItem,has_clone,"[""QuizItem"",""Page"",""File""]",1 "[""QuizItemEvent"",""Page"",""File""]","[""Binary""]",clone_of,QuizItemEvent;QuizItem,has_clone,"[""QuizItem"",""Page"",""File""]",1
"[""QuizItem"",""QuizItemEvent"",""Page"",""File"",""Forum""]","[""Binary""]",has_thread,QuizItemEvent;Twist,thread_of,"[""Twist""]",100 "[""QuizItem"",""QuizItemEvent"",""Page"",""File"",""Forum"",""Jsmol"", ""TurtleBlocks"", ""PoliceSquad"", ""OpenStoryTool"", ""BioMechanics""]","[""Binary""]",has_thread,QuizItemEvent;Twist,thread_of,"[""Twist""]",100
...@@ -44,4 +44,11 @@ CourseSectionEvent,[],"[""factory_types""]",[],[],[] ...@@ -44,4 +44,11 @@ CourseSectionEvent,[],"[""factory_types""]",[],[],[]
CourseSubSectionEvent,[],"[""factory_types""]",[],[],[] CourseSubSectionEvent,[],"[""factory_types""]",[],[],[]
CourseUnitEvent,[],"[""factory_types""]",[],[],[] CourseUnitEvent,[],"[""factory_types""]",[],[],[]
QuizItemEvent,"[""QuizItem""]","[""factory_types""]",[],[],[] QuizItemEvent,"[""QuizItem""]","[""factory_types""]",[],[],[]
Jhapp,[],"[""factory_types""]",[],[],[]
QuizItemPost,"[""Reply""]","[""factory_types""]",[],[],[] QuizItemPost,"[""Reply""]","[""factory_types""]",[],[],[]
Jsmol,"[""Jhapp""]","[""factory_types""]",[],[],[]
TurtleBlocks,"[""Jhapp""]","[""factory_types""]",[],[],[]
PoliceSquad,"[""Jhapp""]","[""factory_types""]",[],[],[]
OpenStoryTool,"[""Jhapp""]","[""factory_types""]",[],[],[]
BioMechanics,"[""Jhapp""]","[""factory_types""]",[],[],[]
Template,"[""Page""]","[""factory_types""]",[],[],[]
...@@ -45,3 +45,10 @@ CourseSubSectionEvent,[],"[""factory_types""]","[""course_structure_minutes"", " ...@@ -45,3 +45,10 @@ CourseSubSectionEvent,[],"[""factory_types""]","[""course_structure_minutes"", "
CourseUnitEvent,[],"[""factory_types""]",[],[],[] CourseUnitEvent,[],"[""factory_types""]",[],[],[]
QuizItemEvent,"[""QuizItem""]","[""factory_types""]","[""quizitem_show_correct_ans"",""quizitem_problem_weight"" ,""quizitem_max_attempts"" ]","[""clone_of""]",[] QuizItemEvent,"[""QuizItem""]","[""factory_types""]","[""quizitem_show_correct_ans"",""quizitem_problem_weight"" ,""quizitem_max_attempts"" ]","[""clone_of""]",[]
QuizItemPost,"[""Reply""]","[""factory_types""]","[""quizitempost_user_submitted_ans"", ""quizitempost_user_checked_ans""]",[],[] QuizItemPost,"[""Reply""]","[""factory_types""]","[""quizitempost_user_submitted_ans"", ""quizitempost_user_checked_ans""]",[],[]
Jhapp,[],"[""factory_types""]",[],[],[]
Jsmol,"[""Jhapp""]","[""factory_types""]",[],[],[]
TurtleBlocks,"[""Jhapp""]","[""factory_types""]",[],[],[]
PoliceSquad,"[""Jhapp""]","[""factory_types""]",[],[],[]
OpenStoryTool,"[""Jhapp""]","[""factory_types""]",[],[],[]
BioMechanics,"[""Jhapp""]","[""factory_types""]",[],[],[]
Template,"[""Page""]","[""factory_types""]",[],[],[]
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
"jqtree": "#0.21.0", "jqtree": "#0.21.0",
"jquery-legacy": "jquery#1.10.2", "jquery-legacy": "jquery#1.10.2",
"jquery.transit": "#0.9.12", "jquery.transit": "#0.9.12",
"MathJax": "#2.4.0",
"d3": "#3.4.11", "d3": "#3.4.11",
"FileSaver": "#879b3c228c", "FileSaver": "#879b3c228c",
"underscore": "#1.6.0", "underscore": "#1.6.0",
...@@ -52,7 +51,8 @@ ...@@ -52,7 +51,8 @@
"handlebars": "#4.0.5", "handlebars": "#4.0.5",
"pace": "#1.0.2", "pace": "#1.0.2",
"jquery": "#2.2.1", "jquery": "#2.2.1",
"blueimp-canvas-to-blob" :"#3.3.0" "blueimp-canvas-to-blob" :"#3.3.0",
"jsmol" :"#1.1.0"
}, },
"resolutions": { "resolutions": {
"jquery": "2.2.1" "jquery": "2.2.1"
......
from fabric.api import local
def copy_schema_csvs():
local('cp -v ../doc/schema_directory/* gnowsys_ndf/ndf/management/commands/schema_files/')
def update_data():
copy_schema_csvs()
local('python manage.py filldb')
local('python manage.py create_schema STs_run1.csv')
local('python manage.py create_schema ATs.csv')
local('python manage.py create_schema RTs.csv')
local('python manage.py create_schema STs_run2.csv')
local('python manage.py sync_existing_documents')
def install_requirements():
local('pip install -r ../requirements.txt')
def purge_group():
local('python manage.py purge_group')
from datetime import timedelta
from gnowsys_ndf.local_settings import SYNCDATA_DURATION
BROKER_URL = 'amqp://' BROKER_URL = 'amqp://'
CELERYBEAT_SCHEDULE = { # from datetime import timedelta
'do-every-fixed-seconds': { # from gnowsys_ndf.local_settings import SYNCDATA_DURATION
'task': 'gnowsys_ndf.tasks.run_syncdata_script',
'schedule': timedelta(seconds=SYNCDATA_DURATION), # CELERYBEAT_SCHEDULE = {
#'args': (16, 16) # 'do-every-fixed-seconds': {
}, # 'task': 'gnowsys_ndf.tasks.run_syncdata_script',
} # 'schedule': timedelta(seconds=SYNCDATA_DURATION),
# #'args': (16, 16)
# },
# }
CELERY_TIMEZONE = 'UTC' CELERY_TIMEZONE = 'UTC'
...@@ -38,7 +38,8 @@ factory_gsystem_types = [{'name':'Twist','meta_type':'factory_types'}, ...@@ -38,7 +38,8 @@ factory_gsystem_types = [{'name':'Twist','meta_type':'factory_types'},
{'name':'ModeratingGroup','meta_type':'factory_types'}, {'name':'ModeratingGroup','meta_type':'factory_types'},
{'name':'Info page','meta_type':'factory_types'}, {'name':'Info page','meta_type':'factory_types'},
{'name':'Blog page','meta_type':'factory_types'}, {'name':'Blog page','meta_type':'factory_types'},
{'name':'Wiki page','meta_type':'factory_types'} {'name':'Wiki page','meta_type':'factory_types'},
{'name':'BaseCourseGroup','meta_type':'factory_types'}
] ]
...@@ -79,52 +80,52 @@ factory_attribute_types = [{'start_time':{'gsystem_names_list':['QuizItem','Foru ...@@ -79,52 +80,52 @@ factory_attribute_types = [{'start_time':{'gsystem_names_list':['QuizItem','Foru
{'Estimated_time':{'gsystem_names_list':['Task'], {'Estimated_time':{'gsystem_names_list':['Task'],
'data_type':'float', 'data_type':'float',
'meta_type':'factory_types'}}, 'meta_type':'factory_types'}},
{'age_range':{'gsystem_names_list':['Quiz','Topic','File','Page','Pandora_video', 'E-Book'], {'age_range':{'gsystem_names_list':['Quiz','Topic','File','Page','Pandora_video', 'E-Book','Jsmol'],
'data_type':'basestring', 'data_type':'basestring',
'meta_type':'factory_types'}}, 'meta_type':'factory_types'}},
{'audience':{'gsystem_names_list':['Quiz','Topic','File','Page','Pandora_video', 'E-Book'], {'audience':{'gsystem_names_list':['Quiz','Topic','File','Page','Pandora_video', 'E-Book','Jsmol'],
'data_type':'list', 'data_type':'list',
'meta_type':'factory_types'}}, 'meta_type':'factory_types'}},
{'creator':{'gsystem_names_list':['Quiz','Topic','File','Page','Pandora_video', 'E-Book'], {'creator':{'gsystem_names_list':['Quiz','Topic','File','Page','Pandora_video', 'E-Book','Jsmol'],
'data_type':'basestring', 'data_type':'basestring',
'meta_type':'factory_types'}}, 'meta_type':'factory_types'}},
{'other_contributors':{'gsystem_names_list':['Quiz','Topic','File','Page','Pandora_video', 'E-Book'], {'other_contributors':{'gsystem_names_list':['Quiz','Topic','File','Page','Pandora_video', 'E-Book','Jsmol'],
'data_type':'list', 'data_type':'list',
'meta_type':'factory_types'}}, 'meta_type':'factory_types'}},
{'timerequired':{'gsystem_names_list':['Quiz','Topic','File','Page','Pandora_video', 'E-Book'], {'timerequired':{'gsystem_names_list':['Quiz','Topic','File','Page','Pandora_video', 'E-Book','Jsmol'],
'data_type':'basestring', 'data_type':'basestring',
'meta_type':'factory_types'}}, 'meta_type':'factory_types'}},
{'interactivitytype':{'gsystem_names_list':['Quiz','Topic','File','Page','Pandora_video'], {'interactivitytype':{'gsystem_names_list':['Quiz','Topic','File','Page','Pandora_video','Jsmol'],
'data_type':'basestring', 'data_type':'basestring',
'meta_type':'factory_types'}}, 'meta_type':'factory_types'}},
{'basedonurl':{'gsystem_names_list':['Quiz','Topic','File','Page','Pandora_video', 'E-Book'], {'basedonurl':{'gsystem_names_list':['Quiz','Topic','File','Page','Pandora_video', 'E-Book','Jsmol'],
'data_type':'basestring', 'data_type':'basestring',
'meta_type':'factory_types'}}, 'meta_type':'factory_types'}},
{'educationaluse':{'gsystem_names_list':['Quiz','Topic','File','Page','Pandora_video', 'E-Book'], {'educationaluse':{'gsystem_names_list':['Quiz','Topic','File','Page','Pandora_video', 'E-Book','Jsmol'],
'data_type':'basestring', 'data_type':'basestring',
'meta_type':'factory_types'}}, 'meta_type':'factory_types'}},
{'textcomplexity':{'gsystem_names_list':['Quiz','Topic','File','Page','Pandora_video', 'E-Book'], {'textcomplexity':{'gsystem_names_list':['Quiz','Topic','File','Page','Pandora_video', 'E-Book','Jsmol'],
'data_type':'basestring', 'data_type':'basestring',
'meta_type':'factory_types'}}, 'meta_type':'factory_types'}},
{'readinglevel':{'gsystem_names_list':['Quiz','Topic','File','Page','Pandora_video', 'E-Book'], {'readinglevel':{'gsystem_names_list':['Quiz','Topic','File','Page','Pandora_video', 'E-Book','Jsmol'],
'data_type':'basestring', 'data_type':'basestring',
'meta_type':'factory_types'}}, 'meta_type':'factory_types'}},
{'educationalsubject':{'gsystem_names_list':['Quiz','Topic','File','Page','Pandora_video', 'E-Book'], {'educationalsubject':{'gsystem_names_list':['Quiz','Topic','File','Page','Pandora_video', 'E-Book','Jsmol'],
'data_type':'basestring', 'data_type':'basestring',
'meta_type':'factory_types'}}, 'meta_type':'factory_types'}},
{'educationallevel':{'gsystem_names_list':['Quiz','Topic','File','Page','Pandora_video', 'E-Book'], {'educationallevel':{'gsystem_names_list':['Quiz','Topic','File','Page','Pandora_video', 'E-Book','Jsmol'],
'data_type':'list', 'data_type':'list',
'meta_type':'factory_types'}}, 'meta_type':'factory_types'}},
{'educationalalignment':{'gsystem_names_list':['Quiz','QuizItem','Topic','File','Page','NUSSD Course', 'Pandora_video', 'Theme', 'E-Book'], {'educationalalignment':{'gsystem_names_list':['Quiz','QuizItem','Topic','File','Page','NUSSD Course', 'Pandora_video', 'Theme', 'E-Book','Jsmol'],
'data_type':'basestring', 'data_type':'basestring',
'meta_type':'factory_types'}}, 'meta_type':'factory_types'}},