Commit 58361b0f authored by Odair M.'s avatar Odair M.

Merge branch '188-fix-bug-error-on-analysis' into 'development'

Resolve "Fix bug: Erro nas análises"

Closes #188

See merge request !86
parents 62c80578 974676a8
Pipeline #22304 failed with stage
in 5 minutes
...@@ -121,6 +121,9 @@ class AdegaChart{ ...@@ -121,6 +121,9 @@ class AdegaChart{
} }
} }
if(this.mode && this.mode[i]){ if(this.mode && this.mode[i]){
data[i].mode = this.mode[i];
}
if(this.text && this.text[i]){
data[i].text = this.text[i]; data[i].text = this.text[i];
} }
if(this.marker != undefined){ if(this.marker != undefined){
......
from django.shortcuts import render, redirect from django.shortcuts import render, redirect
from django.views.generic import View from django.views.generic import View
from django.contrib.auth import logout as process_logout from django.contrib.auth import logout as process_logout
from report_api.views import get_degree_information from report_api.views import get_cepe9615_information
from degree.models import Degree from degree.models import Degree
from submission.models import Submission from submission.models import Submission
import json import json
......
...@@ -20,7 +20,7 @@ class StudentAnalysis: ...@@ -20,7 +20,7 @@ class StudentAnalysis:
self.current_year = current_year self.current_year = current_year
self.current_semester = current_semester self.current_semester = current_semester
@memoize
def student_info(self, df=None): def student_info(self, df=None):
df = df if df is not None else self.data_frame df = df if df is not None else self.data_frame
students = df.groupby([ students = df.groupby([
...@@ -52,7 +52,7 @@ class StudentAnalysis: ...@@ -52,7 +52,7 @@ class StudentAnalysis:
} }
return info return info
@memoize
def list_students(self, df=None): def list_students(self, df=None):
df = df if df is not None else self.data_frame df = df if df is not None else self.data_frame
situations = df.groupby(["MATR_ALUNO", "NOME_PESSOA", "FORMA_EVASAO"]) situations = df.groupby(["MATR_ALUNO", "NOME_PESSOA", "FORMA_EVASAO"])
...@@ -77,7 +77,7 @@ class StudentAnalysis: ...@@ -77,7 +77,7 @@ class StudentAnalysis:
return list_situations return list_situations
@memoize
def ira_alunos(self, df=None): def ira_alunos(self, df=None):
""" """
Calculates the average IRA per student Calculates the average IRA per student
...@@ -113,7 +113,7 @@ class StudentAnalysis: ...@@ -113,7 +113,7 @@ class StudentAnalysis:
ira_per_student[i] = 0 ira_per_student[i] = 0
return ira_per_student return ira_per_student
@memoize
def taxa_aprovacao(self, df=None): def taxa_aprovacao(self, df=None):
df = df if df is not None else self.data_frame df = df if df is not None else self.data_frame
...@@ -142,7 +142,7 @@ class StudentAnalysis: ...@@ -142,7 +142,7 @@ class StudentAnalysis:
"/"+std["SEMESTRE_INGRESSO"] "/"+std["SEMESTRE_INGRESSO"]
return admissions return admissions
@memoize
def posicao_turmaIngresso_semestral(self, df=None): def posicao_turmaIngresso_semestral(self, df=None):
df = df if df is not None else self.data_frame df = df if df is not None else self.data_frame
...@@ -175,7 +175,7 @@ class StudentAnalysis: ...@@ -175,7 +175,7 @@ class StudentAnalysis:
return positions return positions
@memoize
def periodo_real(self, df=None): def periodo_real(self, df=None):
df = df if df is not None else self.data_frame df = df if df is not None else self.data_frame
...@@ -186,7 +186,7 @@ class StudentAnalysis: ...@@ -186,7 +186,7 @@ class StudentAnalysis:
students[x[0]] = None students[x[0]] = None
return students return students
@memoize
def periodo_pretendido(self, df=None): def periodo_pretendido(self, df=None):
df = df if df is not None else self.data_frame df = df if df is not None else self.data_frame
...@@ -197,7 +197,7 @@ class StudentAnalysis: ...@@ -197,7 +197,7 @@ class StudentAnalysis:
self.current_semester - int(x[0][2]) + 1) self.current_semester - int(x[0][2]) + 1)
return students return students
@memoize
def ira_semestral(self, df=None): def ira_semestral(self, df=None):
df = df if df is not None else self.data_frame df = df if df is not None else self.data_frame
...@@ -207,7 +207,7 @@ class StudentAnalysis: ...@@ -207,7 +207,7 @@ class StudentAnalysis:
aux[matr][periodo] = aux[matr][periodo][0] aux[matr][periodo] = aux[matr][periodo][0]
return aux return aux
@memoize
def ira_por_quantidade_disciplinas(self, df=None): def ira_por_quantidade_disciplinas(self, df=None):
""" """
Calculates the ira per year/semester Calculates the ira per year/semester
...@@ -258,7 +258,7 @@ class StudentAnalysis: ...@@ -258,7 +258,7 @@ class StudentAnalysis:
return students return students
@memoize
def indice_aprovacao_semestral(self, df=None): def indice_aprovacao_semestral(self, df=None):
df = df if df is not None else self.data_frame df = df if df is not None else self.data_frame
...@@ -285,7 +285,7 @@ class StudentAnalysis: ...@@ -285,7 +285,7 @@ class StudentAnalysis:
return (students) return (students)
@memoize
def aluno_turmas(self, df=None): def aluno_turmas(self, df=None):
""" """
......
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