relatorio_aluno_exercicio.php 5.5 KB

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