Commit 444aaf16 authored by Bruno Meyer's avatar Bruno Meyer 😢

#160: Fix broken url bug with old submissions

parent 323caa1b
......@@ -17,7 +17,7 @@ def detail(request, submission_id, ano, semestre):
return redirect("adega:dashboard")
for admission in get_list_admission(request.session, degree):
for admission in get_list_admission(request.session, degree, submission_id):
if(admission["ano"] == ano and admission["semestre"] == semestre):
admission_info = admission
break
......@@ -26,7 +26,8 @@ def detail(request, submission_id, ano, semestre):
request.session,
degree,
ano,
semestre
semestre,
submission_id
)
for x in admission_detail:
......@@ -51,7 +52,11 @@ def index(request, submission_id):
return redirect("adega:dashboard")
return render(request, 'admission/index.html', {
"listage_admissions": get_list_admission(request.session, degree),
"listage_admissions": get_list_admission(
request.session,
degree,
submission_id
),
"degree": degree,
"submission": submission
})
......@@ -15,7 +15,12 @@ def detail(request, submission_id, codigo_disciplina):
if not (degree in request.user.educator.degree.all()):
return redirect("adega:dashboard")
course_detail = get_course_detail(request.session, degree, codigo_disciplina)
course_detail = get_course_detail(
request.session,
degree,
codigo_disciplina,
submission_id
)
return render(request, 'course/detail.html',{
"analysis_result": course_detail,
......@@ -34,7 +39,7 @@ def index(request, submission_id):
if not (degree in request.user.educator.degree.all()):
return redirect("adega:dashboard")
analysis_result = get_list_courses(request.session, degree)
analysis_result = get_list_courses(request.session, degree, submission_id)
courses_list = analysis_result["cache"]
code_to_name = analysis_result["disciplinas"]
for code in courses_list:
......
......@@ -18,7 +18,12 @@ def detail(request, submission_id, grr):
if not (degree in request.user.educator.degree.all()):
return redirect("adega:dashboard")
cache_j = get_student_detail(request.session, degree, grr)
cache_j = get_student_detail(
request.session,
degree,
grr,
submission_id
)
analysis_result = {
......@@ -50,11 +55,36 @@ def index(request, submission_id):
return redirect("adega:dashboard")
sem_evasao = get_list_students(request.session, degree, "Sem evasão")
formatura = get_list_students(request.session, degree, "Formatura")
abandono = get_list_students(request.session, degree, "Abandono")
desistencia = get_list_students(request.session, degree, "Desistência")
outros = get_list_students(request.session, degree, "Outro")
sem_evasao = get_list_students(
request.session,
degree,
"Sem evasão",
submission_id
)
formatura = get_list_students(
request.session,
degree,
"Formatura",
submission_id
)
abandono = get_list_students(
request.session,
degree,
"Abandono",
submission_id
)
desistencia = get_list_students(
request.session,
degree,
"Desistência",
submission_id
)
outros = get_list_students(
request.session,
degree,
"Outro",
submission_id
)
return render(request, 'student/index.html', {
'degree': degree,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment