From 638a8e24d19d8cd558b336f0a8010128e680f676 Mon Sep 17 00:00:00 2001 From: Ruben Carlo Benante Date: Mon, 29 Jun 2026 17:05:10 -0300 Subject: [PATCH] =?UTF-8?q?guard=20empty=20m=C3=A9dia=20curricular=20with?= =?UTF-8?q?=20a=20clear=20message=20instead=20of=20a=20misleading=20zeroed?= =?UTF-8?q?=20score?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- simuladormobout.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/simuladormobout.php b/simuladormobout.php index eba39c7..6f339e7 100644 --- a/simuladormobout.php +++ b/simuladormobout.php @@ -221,7 +221,12 @@ if ($_SERVER['REQUEST_METHOD'] == 'POST'){ if (isset($_POST["calcular"])) { validar_entrada(); global $entradas; - if ($entradas["programa"] != 4){ + if ($entradas["media"] <= 0){ + // Media curricular e a base da nota (peso 5 no Padrao V2, peso 7 no + // BRAFITEC). Sem ela, evita exibir uma nota baixa enganosa. + global $h, $h_brafitec; + $h = $h_brafitec = "Preencha a média curricular para calcular a nota."; + } elseif ($entradas["programa"] != 4){ global $o, $ro, $s, $y, $a, $h, $entradas; $ro = nota_reprovacoes($entradas["repro_rec"], $entradas["repro_nrec"]); $o = nota_historico($entradas["porcentagem"], $ro, $entradas["media"]);