relatorio_exercicio.php 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. <?php
  2. require 'functions.php';
  3. $cursos = listarCursos();
  4. $alunos = listarAlunos($_GET['curso']);
  5. $exercicios = listarExercicios($_GET['curso']);
  6. $curso_selecionado = $_GET['curso'];
  7. // $aluno_selecionado = $_GET['aluno'];
  8. $exercicio_selecionado = $_GET['exercicio'];
  9. ?>
  10. <!DOCTYPE html>
  11. <html lang="en">
  12. <head>
  13. <meta charset="UTF-8">
  14. <title>ivprog_log_analysis</title>
  15. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  16. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  17. <link rel="stylesheet" href="dist/style.css">
  18. <link href="css/bootstrap.min.css" rel="stylesheet" />
  19. <link href="css/style.css" rel="stylesheet" />
  20. <style>
  21. #line-heatmap-canvas { width:1200px; height:1200px; position:absolute;}
  22. #line-heatmap-view { width:1200px; height:1200px; position:absolute;}
  23. #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}
  24. </style>
  25. <title>Test</title>
  26. <script src="dist/line_heatmap.js"></script>
  27. <style type="text/css">
  28. </style>
  29. </head>
  30. <body>
  31. <nav class="navbar navbar-expand-md navbar-dark fixed-top" style="background-color: #03396c;">
  32. <b><a class="navbar-brand" href="./">ivprog_log_analysis - Ambiente de análise dos logs do iVProgH</a></b>
  33. <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
  34. <span class="navbar-toggler-icon"></span>
  35. </button>
  36. <div class="collapse navbar-collapse" id="navbarsExampleDefault">
  37. <ul class="navbar-nav mr-auto">
  38. <li class="nav-item active">
  39. <a class="nav-link" href="./" title=""></a>
  40. </li>
  41. </ul>
  42. </div>
  43. </nav>
  44. <main role="main">
  45. <div class="jumbotron ivprogh-desc">
  46. <div class="container">
  47. <?= instrucoes() ?>
  48. </div>
  49. </div>
  50. <div class="container ivprog-container" style="padding: 3em; margin-top: 3em;">
  51. <form action="process.php" method="get" novalidate>
  52. <div class="form-group row">
  53. <label for="inputname" class="col-sm-2 col-form-label">Curso:</label>
  54. <div class="col-sm-10">
  55. <select class="form-control" id="inputname" name="curso">
  56. <?php
  57. for ($i = 0; $i < count($cursos); $i++) {
  58. echo "<option" . ($cursos[$i] == $_GET['curso']?" selected":"") . ">" . $cursos[$i] . "</option>";
  59. }
  60. ?>
  61. </select>
  62. </div>
  63. </div>
  64. <div class="form-group row">
  65. <label for="inputaluno" class="col-sm-2 col-form-label">Aluno:</label>
  66. <div class="col-sm-10">
  67. <select class="form-control" id="inputaluno" name="aluno">
  68. <option>Todos</option>
  69. <?php
  70. foreach ($alunos as $aluno) {
  71. echo "<option value='$aluno' ". ($aluno == $_GET['aluno']?" selected":"") .">$aluno</option>";
  72. }
  73. ?>
  74. </select>
  75. </div>
  76. </div>
  77. <div class="form-group row">
  78. <label for="inputexercicio" class="col-sm-2 col-form-label">Exercício:</label>
  79. <div class="col-sm-10">
  80. <select class="form-control" id="inputexercicio" name="exercicio">
  81. <?php
  82. foreach ($exercicios as $exercicio) {
  83. echo "<option value='$exercicio' " . ($exercicio == $_GET['exercicio']?" selected":"") . ">$exercicio</option>";
  84. }
  85. ?>
  86. </select>
  87. </div>
  88. </div>
  89. <div class="form-group row">
  90. <div class="offset-sm-2 col-sm-10">
  91. <button type="button" class="btn btn-secondary" onclick="window.history.back();">Voltar</button>
  92. <button type="submit" class="btn btn-primary">Continuar</button>
  93. <span class="reported" style="color: green; font-size: 120%;"></span>
  94. <span class="error" style="color: red; font-size: 120%;"></span>
  95. </div>
  96. </div>
  97. </form>
  98. </div>
  99. <div>
  100. </div>
  101. </main>
  102. <script src="./js/jquery.min.js"></script>
  103. <script src="./js/bootstrap.bundle.min.js"></script>
  104. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/octicons/3.5.0/octicons.min.css">
  105. <div>
  106. <div id="hea">
  107. </div>
  108. <?php
  109. $arquivoLogsAluno = null;
  110. $logsTodosAlunos = "";
  111. for ($i=0; $i < count($alunos); ++$i) {
  112. $tempAluno = $alunos[$i];
  113. $logAluno = pegarLogsDoAlunoComoString($curso_selecionado, $aluno_selecionado, $exercicio_selecionado);
  114. if(!empty($logAluno) && is_null($arquivoLogsAluno)) {
  115. $arquivoLogsAluno = $tempArquivoLogsAluno;
  116. }
  117. $logsTodosAlunos .= $logAluno;
  118. }
  119. $qualVersao = qualVersaoDoIVProg($arquivoLogsAluno);
  120. if (is_null($arquivoLogsAluno)) {
  121. echo "<center><h4>N&atilde;o houve submiss&otilde;es para o exerc&iacute;cio selecionado!</h4></center>";
  122. } else {
  123. ?>
  124. <script>
  125. line_heatmap.Container.init('hea',"<?= $logsTodosAlunos ?>", true);
  126. </script>
  127. <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;'") ?> >
  128. </iframe>
  129. <?php
  130. }
  131. ?>
  132. </div>
  133. </body>
  134. </html>