Example #1
0
def attestationectsclassepdf(request, id_classe):
    classe = get_object_or_404(Classe, pk=id_classe)
    form = ECTSForm(classe, request.POST)
    if request.method == "POST":
        if form.is_valid():
            return attestationects(form, None, classe)
        else:
            return ectscredits(request, classe.pk, form)
    else:
        raise Http404
Example #2
0
def attestationectsclassepdf(request,id_classe):
	classe = get_object_or_404(Classe,pk=id_classe)
	form = ECTSForm(classe, request.POST)
	if request.method=="POST":
		if form.is_valid():
			return attestationects(form,None,classe)
		else:
			return ectscredits(request,classe.pk,form)
	else:
		raise Http404
Example #3
0
def attestationectspdf(request, id_eleve):
    eleve = get_object_or_404(Eleve, pk=id_eleve)
    form = ECTSForm(eleve.classe, request.POST)
    if request.method == "POST":
        if form.is_valid():
            return attestationects(form, eleve, eleve.classe)
        else:
            return ectscredits(request, eleve.classe.pk, form)
    else:
        raise Http404
Example #4
0
def attestationectspdf(request,id_eleve):
	eleve = get_object_or_404(Eleve,pk=id_eleve)
	form = ECTSForm(eleve.classe, request.POST)
	if request.method=="POST":
		if form.is_valid():
			return attestationects(form,eleve,eleve.classe)
		else:
			return ectscredits(request,eleve.classe.pk,form)
	else:
		raise Http404
Example #5
0
def attestationectsclassepdf(request,id_classe):
	classe = get_object_or_404(Classe,pk=id_classe)
	if not is_profprincipal(request.user,classe):
		return HttpResponseForbidden("Accès non autorisé")
	form = ECTSForm(classe, request.POST)
	if request.method=="POST":
		if form.is_valid():
			return attestationects(form,None,classe)
		else:
			return ectscredits(request,classe.pk,form)
	else:
		raise Http404
Example #6
0
def ficheectspdf(request,id_eleve):
	eleve = get_object_or_404(Eleve,pk=id_eleve)
	if not is_profprincipal(request.user,eleve.classe):
		return HttpResponseForbidden("Accès non autorisé")
	form = ECTSForm(eleve.classe, request.POST)
	if request.method=="POST":
		if form.is_valid():
			return creditsects(form,eleve,eleve.classe)
		else:
			return ectscredits(request,eleve.classe.pk,form)
	else:
		raise Http404
Example #7
0
def ectscredits(request,id_classe,form=None):
	classe =get_object_or_404(Classe,pk=id_classe)
	eleves = Eleve.objects.filter(classe=classe).order_by('user__last_name','user__first_name')
	if not form:
		form=ECTSForm(classe,request.POST or None)
	credits,total = NoteECTS.objects.credits(classe)
	return render(request,'mixte/ectscredits.html',{'classe':classe,'credits':credits,'form':form,'total':total,"nbeleves":eleves.order_by().count()})
Example #8
0
def ectscredits(request,id_classe,form=None):
	classe =get_object_or_404(Classe,pk=id_classe)
	if not is_profprincipal(request.user,classe):
		return HttpResponseForbidden("Accès non autorisé")
	eleves = Eleve.objects.filter(classe=classe).order_by('user__last_name','user__first_name')
	if form is None:
		form=ECTSForm(classe,request.POST or None)
	credits,total = NoteECTS.objects.credits(classe)		
	return render(request,'mixte/ectscredits.html',{'classe':classe,'credits':credits,'form':form,'total':total,"nbeleves":eleves.order_by().count()})