def home(request, course_key_string): course_module = get_course(course_key_string) if not request.user.is_staff and not request.user.is_superuser: # Are we in a deactivation period? now = timezone.now() deactivations = VideoUploaderDeactivationPeriod.objects.filter( start_time__lte=now, end_time__gte=now ).order_by('-end_time') if deactivations: deactivation = deactivations[0] end_date = date_format(deactivation.end_time) end_time = time_format(deactivation.end_time) return render_to_response('videoupload/deactivated.html', { "context_course": course_module, "end_date": end_date, "end_time": end_time, }) return render_to_response('videoupload/index.html', { "context_course": course_module, })
def home(request, course_key_string): course_module = get_course(course_key_string) if not request.user.is_staff and not request.user.is_superuser: # Are we in a deactivation period? now = timezone.now() deactivations = VideoUploaderDeactivationPeriod.objects.filter( start_time__lte=now, end_time__gte=now).order_by('-end_time') if deactivations: deactivation = deactivations[0] end_date = date_format(deactivation.end_time) end_time = time_format(deactivation.end_time) return render_to_response( 'videoupload/deactivated.html', { "context_course": course_module, "end_date": end_date, "end_time": end_time, }) return render_to_response('videoupload/index.html', { "context_course": course_module, })
def __init__(self, course_key_string): self.course_id = CourseKey.from_string(course_key_string) self.course_module = get_course(course_key_string) self._auth = None
def home(request, course_key_string): course_module = get_course(course_key_string) return render_to_response("videoupload/index.html", {"context_course": course_module})
def __init__(self, course_key_string): self.course_module = get_course(course_key_string) self._auth = None