Exemple #1
0
def rebuild_book_assignments(request, module_id):
    """
    Views responsable of building the list of exercises
    in the book. The JSON file created is used to populate
    the exercise on the add_exercise_to_assignment page.
    """
    course_module = CourseModule.objects.get(id=module_id)
    # retrieve books
    book = Books.objects.filter(courses=course_module.course_instance)[0]
    create_book_file(book)
    messages.success(request, _("Book was updated successfully."))
    return HttpResponseRedirect(request.META.get("HTTP_REFERER"))
Exemple #2
0
def rebuild_book_assignments(request, module_id):
    """
    Views responsable of building the list of exercises
    in the book. The JSON file created is used to populate
    the exercise on the add_exercise_to_assignment page.
    """
    course_module = CourseModule.objects.get(id=module_id)
    #retrieve books
    book =  Books.objects.filter(courses=course_module.course_instance)[0]
    create_book_file(book)
    messages.success(request, _('Book was updated successfully.'))
    return HttpResponseRedirect(request.META.get('HTTP_REFERER'))