relatorio_exercicio.php 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  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. <<<<<<< HEAD
  83. foreach ($exercicios as $exercicio) {
  84. echo "<option value='$exercicio' " . ($exercicio == $_GET['exercicio']?" selected":"") . ">$exercicio</option>";
  85. =======
  86. for ($i = 0; $i < count($exercicios); $i++) {
  87. echo "<option value='".$exercicios[$i][1]."'" . ($exercicios[$i][1] == $_GET['exercicio']?" selected":"") . ">" . str_replace('_', ' ', $exercicios[$i][0]) . "</option>";
  88. >>>>>>> master
  89. }
  90. ?>
  91. </select>
  92. </div>
  93. </div>
  94. <div class="form-group row">
  95. <div class="offset-sm-2 col-sm-10">
  96. <button type="button" class="btn btn-secondary" onclick="window.history.back();">Voltar</button>
  97. <button type="submit" class="btn btn-primary">Continuar</button>
  98. <span class="reported" style="color: green; font-size: 120%;"></span>
  99. <span class="error" style="color: red; font-size: 120%;"></span>
  100. </div>
  101. </div>
  102. </form>
  103. </div>
  104. <div>
  105. </div>
  106. </main>
  107. <script src="./js/jquery.min.js"></script>
  108. <script src="./js/bootstrap.bundle.min.js"></script>
  109. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/octicons/3.5.0/octicons.min.css">
  110. <div>
  111. <div id="hea">
  112. </div>
  113. <?php
  114. $arquivoLogsAluno = null;
  115. $logsTodosAlunos = "";
  116. for ($i=0; $i < count($alunos); ++$i) {
  117. $tempAluno = $alunos[$i];
  118. $logAluno = pegarLogsDoAlunoComoString($curso_selecionado, $aluno_selecionado, $exercicio_selecionado);
  119. if(!empty($logAluno) && is_null($arquivoLogsAluno)) {
  120. $arquivoLogsAluno = $tempArquivoLogsAluno;
  121. }
  122. $logsTodosAlunos .= $logAluno;
  123. }
  124. $qualVersao = qualVersaoDoIVProg($arquivoLogsAluno);
  125. if (is_null($arquivoLogsAluno)) {
  126. echo "<center><h4>N&atilde;o houve submiss&otilde;es para o exerc&iacute;cio selecionado!</h4></center>";
  127. } else {
  128. ?>
  129. <script>
  130. line_heatmap.Container.init('hea',"<?= $logsTodosAlunos ?>", true);
  131. </script>
  132. <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;'") ?> >
  133. </iframe>
  134. <?php
  135. }
  136. ?>
  137. </div>
  138. </body>
  139. </html>