Exemple #1
0
def ccx_students_management(request, course, ccx=None):
    """
    Manage the enrollment of the students in a CCX
    """
    if not ccx:
        raise Http404

    action, identifiers = get_enrollment_action_and_identifiers(request)
    email_students = 'email-students' in request.POST
    course_key = CCXLocator.from_course_locator(course.id, unicode(ccx.id))
    email_params = get_email_params(course, auto_enroll=True, course_key=course_key, display_name=ccx.display_name)

    errors = ccx_students_enrolling_center(action, identifiers, email_students, course_key, email_params, ccx.coach)

    for error_message in errors:
        messages.error(request, error_message)

    url = reverse('ccx_coach_dashboard', kwargs={'course_id': course_key})
    return redirect(url)
Exemple #2
0
def ccx_students_management(request, course, ccx=None):
    """
    Manage the enrollment of the students in a CCX
    """
    if not ccx:
        raise Http404

    action, identifiers = get_enrollment_action_and_identifiers(request)
    email_students = 'email-students' in request.POST
    course_key = CCXLocator.from_course_locator(course.id, unicode(ccx.id))
    email_params = get_email_params(course, auto_enroll=True, course_key=course_key, display_name=ccx.display_name)

    errors = ccx_students_enrolling_center(action, identifiers, email_students, course_key, email_params, ccx.coach)

    for error_message in errors:
        messages.error(request, error_message)

    url = reverse('ccx_coach_dashboard', kwargs={'course_id': course_key})
    return redirect(url)