<?php require 'head.php'; if (empty($_REQUEST['exerc'])) { echo "Erro. Se você usou um link para chegar aqui, notifique o administrador"; exit; } $X = new Exercicio($_REQUEST['exerc']); ?> <h2><?php echo $X->getNome(); if ($USER->admin()) { echo " <a href='cadastra.php?exerc=" . $X->getId() . "'><img src='img/pen.png'></a>"; } ?> </h2> <?php echo $X->getHtml(); ?> <form name="notaR" action="#" method="post" enctype="multipart/form-data"> <input type="hidden" name="exerc" value="<?php echo $X->getId(); ?> "> <input type="hidden" name="MAX_FILE_SIZE" value="30000"> <input type="file" name="rfile" id="rfile" accept=".R"> <br><button type="submit" value="Submit">Submeter!</button> <a href="https://github.com/lageIBUSP/notaR/wiki/Submetendo-respostas">ajuda?</a> </form> <div id="corretoR" > <?php
<?php require_once "head.php"; ### comeca aqui if (!$USER->admin()) { echo "Acesso negado"; exit; } if (isset($_REQUEST['exerc'])) { $X = new Exercicio($_REQUEST['exerc']); } else { $X = new Exercicio(); } $id = $X->getId(); if (isset($_POST['ntestes'])) { $ntestes = $_POST['ntestes']; } elseif (!empty($id) && $X->maxTeste()) { $ntestes = $X->maxTeste(); } else { $ntestes = 10; } $imp = $X->getProibidos(); if (isset($_POST['nimp'])) { $nimp = $_POST['nimp']; } elseif (!empty($id) && $imp) { $nimp = sizeof($imp); } else { $nimp = 0; } if (isset($_POST['submit']) and $_POST['submit'] == "addnimp") { $nimp++;