Beispiel #1
0
def export_group_analytics(group_obj, assessment_and_quiz_data):

    # print "Enter 'group name(case sensitive)' OR 'id': "
    # group_name_or_id = raw_input()
    # group_obj = Group.get_group_name_id(group_name_or_id, get_obj=True)

    # if not group_obj:
    #     raise ValueError('\nSorry. Request could not be visited. \
    #         \nGroup/Course, matching argument entered "' + group_name_or_id + '" does not exists!!')

    # group_users = group_obj.author_set
    # Previously, above was implementation strategy. Now we are using counter users instead of group's author_set,
    # because we do wanted to gather all data irrespective of student enrollment.
    group_users = Counter.get_group_counters(group_obj._id).distinct('user_id')
    # group_users is a list of integer user ids
    #print group_users

    # CSV file name-convention: schoolcode-course-name-datetimestamp.csv
    try:
        group_name = slugify(group_obj['name'])
    except Exception, e:
        # print e
        group_name = str(group_obj['_id'])
def export_group_analytics(group_obj, assessment_and_quiz_data):

    # print "Enter 'group name(case sensitive)' OR 'id': "
    # group_name_or_id = raw_input()
    # group_obj = Group.get_group_name_id(group_name_or_id, get_obj=True)

    # if not group_obj:
    #     raise ValueError('\nSorry. Request could not be visited. \
    #         \nGroup/Course, matching argument entered "' + group_name_or_id + '" does not exists!!')

    # group_users = group_obj.author_set
    # Previously, above was implementation strategy. Now we are using counter users instead of group's author_set,
    # because we do wanted to gather all data irrespective of student enrollment.
    group_users = Counter.get_group_counters(group_obj._id).distinct('user_id')
    # group_users is a list of integer user ids
    # print group_users

    # CSV file name-convention: schoolcode-course-name-datetimestamp.csv
    try:
        group_name = slugify(group_obj['name'])
    except Exception, e:
        # print e
        group_name = str(group_obj['_id'])