relatorio_aluno_exercicio.php 5.3 KB

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