Lança as faltas e condição de aprovado.

parent cbd2fd79
......@@ -182,9 +182,15 @@ if (!is.null(nt$MF2)) {
nt$"M. final" <- nt$MF2
}
# Verifica se o aluno está aprovado.
if (!is.null(nt$"M. final") & !is.null(nt$E) & !is.null(nt$F)) {
nt$A <- ifelse(nt$"M. final" >= 50 &
nt$F <= 15, "A", "R")
}
#-----------------------------------------------------------------------
v <- c("GRR", u, c("M. parcial", "E", "M. final"))
v <- c("GRR", u, c("M. parcial", "E", "M. final", "F", "A"))
v <- v[v %in% names(nt)]
# nt <- plyr::arrange(nt, -mp)
......@@ -242,8 +248,13 @@ dt <- datatable(data = subset(nt, select = v),
lengthMenu = NULL))
dt <- formatStyle(table = dt,
columns = !(v %in% c("Nome", "GRR", "F", "M. final")),
color = styleInterval(cuts = c(39.999999, 69.999999),
columns = !(v %in% c("Nome",
"GRR",
"F",
"M. final",
"A")),
color = styleInterval(cuts = c(39.999999,
69.999999),
values = c("#ff3300",
"gray",
"#3333ff")))
......@@ -256,6 +267,22 @@ if ("E" %in% v) {
"#3333ff")))
}
if ("F" %in% v) {
dt <- formatStyle(table = dt,
columns = (v %in% c("F")),
color = styleInterval(cuts = c(16),
values = c("#ff3300",
"#3333ff")[2:1]))
}
if ("A" %in% v) {
dt <- formatStyle(table = dt,
columns = (v %in% c("A")),
color = styleEqual(levels = c("R", "A"),
values = c("#ff3300",
"#3333ff")))
}
is.decimal <- function(x) is.numeric(x) && !is.integer(x)
formatRound(table = dt,
......
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