Beispiel #1
0
def move_content_down( request, course_id, content_id ):
    try:
        course_model.reorder_course_content(
            "/uri/content/{0}".format(content_id), "DOWN"
        )
    except:
        messages.error(request, _("Could not move content down!"))
    redirect_url = reverse('courses_admin_content', kwargs={'course_id': course_id})
    return http.HttpResponseRedirect(redirect_url)
Beispiel #2
0
def move_content_down( request, course_id, content_id ):
    try:
        course_model.reorder_course_content(
            "/uri/content/{0}".format(content_id), "DOWN"
        )
    except:
        messages.error(request, _("Could not move content down!"))
    redirect_url = reverse('courses_admin_content', kwargs={'course_id': course_id})
    return http.HttpResponseRedirect(redirect_url)
Beispiel #3
0
def move_content_up( request, course_id, content_id ):
    result = course_model.reorder_course_content(
        "/uri/content/{0}".format(content_id), "UP"
    )
    if not result:
        messages.error(request, _("Could not move content up!"))
    redirect_url = reverse('courses_admin_content', kwargs={'course_id': course_id})
    return http.HttpResponseRedirect(redirect_url)