123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161 |
- <?php
- require 'functions.php';
- $cursos = listarCursos();
- $alunos = listarAlunos($_GET['curso']);
- $exercicios = listarExercicios($_GET['curso']);
- $curso_selecionado = $_GET['curso'];
- // $aluno_selecionado = $_GET['aluno'];
- $exercicio_selecionado = $_GET['exercicio'];
- ?>
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>ivprog_log_analysis</title>
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta http-equiv="X-UA-Compatible" content="ie=edge">
- <link rel="stylesheet" href="dist/style.css">
- <link href="css/bootstrap.min.css" rel="stylesheet" />
- <link href="css/style.css" rel="stylesheet" />
- <style>
- #line-heatmap-canvas { width:1200px; height:1200px; position:absolute;}
- #line-heatmap-view { width:1200px; height:1200px; position:absolute;}
- #line-heatmap-tooltip { position:absolute; left:0; top:0; background:rgba(0,0,0,.8); color:white; font-size:14px; padding:5px; line-height:18px; display:none; z-index:10}
- </style>
- <title>Test</title>
- <script src="dist/line_heatmap.js"></script>
- <style type="text/css">
- </style>
- </head>
- <body>
- <nav class="navbar navbar-expand-md navbar-dark fixed-top" style="background-color: #03396c;">
- <b><a class="navbar-brand" href="./">ivprog_log_analysis - Ambiente de análise dos logs do iVProgH</a></b>
- <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
- <span class="navbar-toggler-icon"></span>
- </button>
- <div class="collapse navbar-collapse" id="navbarsExampleDefault">
- <ul class="navbar-nav mr-auto">
- <li class="nav-item active">
- <a class="nav-link" href="./" title=""></a>
- </li>
- </ul>
- </div>
- </nav>
- <main role="main">
- <div class="jumbotron ivprogh-desc">
- <div class="container">
- <?= instrucoes() ?>
- </div>
- </div>
- <div class="container ivprog-container" style="padding: 3em; margin-top: 3em;">
- <form action="process.php" method="get" novalidate>
- <div class="form-group row">
- <label for="inputname" class="col-sm-2 col-form-label">Curso:</label>
- <div class="col-sm-10">
- <select class="form-control" id="inputname" name="curso">
- <?php
- for ($i = 0; $i < count($cursos); $i++) {
- echo "<option" . ($cursos[$i] == $_GET['curso']?" selected":"") . ">" . $cursos[$i] . "</option>";
- }
- ?>
- </select>
- </div>
- </div>
- <div class="form-group row">
- <label for="inputaluno" class="col-sm-2 col-form-label">Aluno:</label>
- <div class="col-sm-10">
- <select class="form-control" id="inputaluno" name="aluno">
- <option>Todos</option>
- <?php
- foreach ($alunos as $aluno) {
- echo "<option value='$aluno' ". ($aluno == $_GET['aluno']?" selected":"") .">$aluno</option>";
- }
- ?>
- </select>
- </div>
- </div>
- <div class="form-group row">
- <label for="inputexercicio" class="col-sm-2 col-form-label">Exercício:</label>
- <div class="col-sm-10">
- <select class="form-control" id="inputexercicio" name="exercicio">
- <?php
- foreach ($exercicios as $exercicio) {
- echo "<option value='$exercicio' " . ($exercicio == $_GET['exercicio']?" selected":"") . ">$exercicio</option>";
- }
- ?>
- </select>
- </div>
- </div>
- <div class="form-group row">
- <div class="offset-sm-2 col-sm-10">
- <button type="button" class="btn btn-secondary" onclick="window.history.back();">Voltar</button>
- <button type="submit" class="btn btn-primary">Continuar</button>
- <span class="reported" style="color: green; font-size: 120%;"></span>
- <span class="error" style="color: red; font-size: 120%;"></span>
- </div>
- </div>
- </form>
- </div>
- <div>
-
- </div>
- </main>
- <script src="./js/jquery.min.js"></script>
- <script src="./js/bootstrap.bundle.min.js"></script>
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/octicons/3.5.0/octicons.min.css">
- <div>
- <div id="hea">
- </div>
-
- <?php
- $arquivoLogsAluno = null;
-
- $logsTodosAlunos = "";
- for ($i=0; $i < count($alunos); ++$i) {
- $tempAluno = $alunos[$i];
- $logAluno = pegarLogsDoAlunoComoString($curso_selecionado, $aluno_selecionado, $exercicio_selecionado);
- if(!empty($logAluno) && is_null($arquivoLogsAluno)) {
- $arquivoLogsAluno = $tempArquivoLogsAluno;
- }
- $logsTodosAlunos .= $logAluno;
- }
- $qualVersao = qualVersaoDoIVProg($arquivoLogsAluno);
- if (is_null($arquivoLogsAluno)) {
- echo "<center><h4>Não houve submissões para o exercício selecionado!</h4></center>";
- } else {
- ?>
-
- <script>
- line_heatmap.Container.init('hea',"<?= $logsTodosAlunos ?>", true);
- </script>
- <iframe frameborder="0" name="iLM" src="ivprog_<?= $qualVersao ?>/index.html?1=1&iLM_PARAM_AssignmentURL=true&iLM_PARAM_Assignment=../temp/<?= $arquivoLogsAluno ?>&iLM_PARAM_SendAnswer=false&iLM_PARAM_ServerToGetAnswerURL=&lang=pt" <?= ($qualVersao == "menu"?"style='width: 1400px; height: 1500px;'":"style='width: 800px; height: 1500px;'") ?> >
- </iframe>
- <?php
- }
- ?>
- </div>
- </body>
- </html>
|