relatorio_aluno_exercicio.php 5.5 KB

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