Ejemplo n.º 1
0
 def get_assignment_stats(self, request, groups_id, requested_assignments):
     list_for_csv = assignment_table_generator(requested_assignments,
                                               groups_id)
     group_name = self.get_groups_name(groups_id)
     return csv_response(request,
                         data_table=list_for_csv,
                         file_name=group_name + "-assignment-score-sheet")
Ejemplo n.º 2
0
def quiz_submission_create_data_sheet(request, object_slug,
                                      table_generator_cls, file_postfix):
    quiz = get_object_or_404(Quiz, slug=object_slug)
    generator = table_generator_cls(quiz=quiz)
    result_table = generator.get_result_table()
    return csv_response(request,
                        data_table=result_table,
                        file_name="quiz-" + quiz.title + "-" + file_postfix)
Ejemplo n.º 3
0
def assignment_submission_create_data_sheet(request, object_slug,
                                            table_generator_cls, file_postfix):
    assignment = get_object_or_404(Assignment, slug=object_slug)
    generator = table_generator_cls(assignment=assignment)
    result_table = generator.get_result_table()
    return csv_response(request,
                        data_table=result_table,
                        file_name="assignment-" + assignment.title + "-" +
                        file_postfix)
Ejemplo n.º 4
0
 def get_score_stats(self, request, groups_id, requested_assignment_1,
                     requested_assignment_2, requested_test_1,
                     requested_test_2, score_weight):
     list_for_csv = score_table_generator(requested_assignment_1,
                                          requested_assignment_2,
                                          requested_test_1,
                                          requested_test_2, score_weight,
                                          groups_id)
     group_name = self.get_groups_name(groups_id)
     return csv_response(request,
                         data_table=list_for_csv,
                         file_name=group_name + "-score-sheet")
Ejemplo n.º 5
0
 def get_test_grade(self, request, groups_id, requested_tests):
     list_for_csv = test_grade_table_generator(requested_tests, groups_id)
     group_name = self.get_groups_name(groups_id)
     return csv_response(request,
                         data_table=list_for_csv,
                         file_name=group_name + "-test-grade-sheet")
Ejemplo n.º 6
0
def online_test_submission_create_data_sheet(request, object_slug, table_generator_cls, file_postfix):
    test = get_object_or_404(OnlineTest, slug=object_slug)
    generator = table_generator_cls(test=test)
    result_table = generator.get_result_table()
    return csv_response(request, data_table=result_table, file_name="online-test-" + test.title + "-" + file_postfix)