Example #1
0
 def test_create_learning_path(self):
     solution_list = create_list(sample_solution)
     student_tests = create_list(student_test)
     domain_orders = create_list(domain_order)
     domain_order_dict = create_domain_dict(domain_orders)
     student_list_dict = student_setup(update_values(student_tests))
     #Check to see that all student results are in solution set 
     self.assertEqual(all(create_learning_path(domain_order_dict, student) in solution_list for student in student_list_dict), True)
Example #2
0
def index(request):
    if request.method == 'POST':
        domain_order = request.FILES['domainorder']
        student_test = request.FILES['studenttests']
        student_test_list = create_list(student_test)
        domain_order_list = create_list(domain_order)
        domain_order = create_domain_dict(domain_order_list)
        student_list = student_setup(update_values(student_test_list))
        student_learning_paths = []
        for student in student_list:
            student_order = create_learning_path(domain_order, student)
            student_learning_paths.append(student_order)
        html_table = create_html_table(student_learning_paths)
        context = {'myhtml': html_table}
        return JsonResponse(context)
    return render(request, 'index.html')