curso.php 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. <?php
  2. require 'functions.php';
  3. $cursos = listarCursos();
  4. $alunos = listarAlunos($_GET['curso']);
  5. $exercicios = listarExercicios($_GET['curso']);
  6. ?>
  7. <!doctype html>
  8. <html lang="en">
  9. <head>
  10. <meta charset="utf-8" />
  11. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no" />
  12. <title>ivprog_log_analysis</title>
  13. <link href="css/bootstrap.min.css" rel="stylesheet" />
  14. <link href="css/style.css" rel="stylesheet" />
  15. </head>
  16. <body>
  17. <nav class="navbar navbar-expand-md navbar-dark fixed-top" style="background-color: #03396c;">
  18. <b><a class="navbar-brand" href="./">ivprog_log_analysis - Ambiente de análise dos logs do iVProgH</a></b>
  19. <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarsExampleDefault" aria-controls="navbarsExampleDefault" aria-expanded="false" aria-label="Toggle navigation">
  20. <span class="navbar-toggler-icon"></span>
  21. </button>
  22. <div class="collapse navbar-collapse" id="navbarsExampleDefault">
  23. <ul class="navbar-nav mr-auto">
  24. <li class="nav-item active">
  25. <a class="nav-link" href="./" title=""></a>
  26. </li>
  27. </ul>
  28. </div>
  29. </nav>
  30. <main role="main">
  31. <div class="jumbotron ivprogh-desc">
  32. <div class="container">
  33. <?= instrucoes() ?>
  34. </div>
  35. </div>
  36. <div class="container ivprog-container" style="padding: 3em; margin-top: 3em;">
  37. <form action="process.php" method="get" novalidate>
  38. <div class="form-group row">
  39. <label for="inputname" class="col-sm-2 col-form-label">Curso:</label>
  40. <div class="col-sm-10">
  41. <select class="form-control" id="inputname" name="curso">
  42. <?php
  43. for ($i = 0; $i < count($cursos); $i++) {
  44. echo "<option" . ($cursos[$i] == $_GET['curso']?" selected":"") . ">" . $cursos[$i] . "</option>";
  45. }
  46. ?>
  47. </select>
  48. </div>
  49. </div>
  50. <div class="form-group row">
  51. <label for="inputaluno" class="col-sm-2 col-form-label">Aluno:</label>
  52. <div class="col-sm-10">
  53. <select class="form-control" id="inputaluno" name="aluno">
  54. <option>Todos</option>
  55. <?php
  56. foreach ($alunos as $aluno) {
  57. echo "<option value='$aluno'>$aluno</option>";
  58. }
  59. ?>
  60. </select>
  61. </div>
  62. </div>
  63. <div class="form-group row">
  64. <label for="inputexercicio" class="col-sm-2 col-form-label">Exercício:</label>
  65. <div class="col-sm-10">
  66. <select class="form-control" id="inputexercicio" name="exercicio">
  67. <option value="Todos">Todos</option>
  68. <?php
  69. <<<<<<< HEAD
  70. foreach ($exercicios as $exercicio) {
  71. echo "<option value='$exercicio'>$exercicio</option>";
  72. =======
  73. for ($i = 0; $i < count($exercicios); $i++) {
  74. echo "<option value='".$exercicios[$i][1]."'>" . str_replace('_', ' ', $exercicios[$i][0]) . "</option>";
  75. >>>>>>> master
  76. }
  77. ?>
  78. </select>
  79. </div>
  80. </div>
  81. <div class="form-group row">
  82. <div class="offset-sm-2 col-sm-10">
  83. <button type="button" class="btn btn-secondary" onclick="window.history.back();">Voltar</button>
  84. <button type="submit" class="btn btn-primary">Continuar</button>
  85. <span class="reported" style="color: green; font-size: 120%;"></span>
  86. <span class="error" style="color: red; font-size: 120%;"></span>
  87. </div>
  88. </div>
  89. </form>
  90. </div>
  91. <div>
  92. </div>
  93. </main>
  94. <footer class="container text-center">
  95. <a href="http://www.ime.usp.br/line">iVProgH</a> |
  96. <a href="http://www.ime.usp.br/line">LInE</a> |
  97. <a href="http://www.matematica.br">iM&aacute;tica</a>
  98. </footer>
  99. <script src="./js/jquery.min.js"></script>
  100. <script src="./js/bootstrap.bundle.min.js"></script>
  101. <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/octicons/3.5.0/octicons.min.css">
  102. </body>
  103. </html>