Spaces:
Running
Running
mude o botão Professor para em baixo no iniciar questionário - Follow Up Deployment
Browse files- index.html +129 -26
- prompts.txt +5 -1
index.html
CHANGED
|
@@ -5,6 +5,7 @@
|
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
<title>Questionário sobre Cidade Cinza</title>
|
| 7 |
<script src="https://cdn.tailwindcss.com"></script>
|
|
|
|
| 8 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 9 |
<style>
|
| 10 |
/* Custom CSS for shuffle animation */
|
|
@@ -81,10 +82,12 @@
|
|
| 81 |
<!-- Login Screen -->
|
| 82 |
<div id="loginScreen" class="min-h-screen flex items-center justify-center px-4 py-12">
|
| 83 |
<div class="w-full max-w-md bg-white rounded-lg shadow-md overflow-hidden">
|
| 84 |
-
<div class="bg-blue-600 py-4 px-6
|
| 85 |
<h2 class="text-2xl font-bold text-white">Questionário sobre "Cidade Cinza"</h2>
|
| 86 |
<p class="text-blue-100 mt-1">Por favor, insira suas informações para começar</p>
|
| 87 |
-
|
|
|
|
|
|
|
| 88 |
Professor
|
| 89 |
</button>
|
| 90 |
</div>
|
|
@@ -199,9 +202,6 @@
|
|
| 199 |
<button id="viewResultsBtn" class="bg-blue-600 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition duration-150">
|
| 200 |
Ver Resultados Detalhados
|
| 201 |
</button>
|
| 202 |
-
<a href="index.html" class="bg-gray-300 hover:bg-gray-400 text-gray-800 font-bold py-2 px-4 rounded-md focus:outline-none focus:ring-2 focus:ring-gray-500 focus:ring-offset-2 transition duration-150">
|
| 203 |
-
Voltar ao Início
|
| 204 |
-
</a>
|
| 205 |
</div>
|
| 206 |
</div>
|
| 207 |
</div>
|
|
@@ -778,7 +778,7 @@
|
|
| 778 |
}, 0);
|
| 779 |
|
| 780 |
const score = Math.round((correctCount / questions.length) * 10);
|
| 781 |
-
const percentage =
|
| 782 |
|
| 783 |
// Update results display
|
| 784 |
studentNameDisplay.textContent = quizState.studentName;
|
|
@@ -935,14 +935,59 @@
|
|
| 935 |
}
|
| 936 |
|
| 937 |
// Load results for admin panel
|
| 938 |
-
function loadResults() {
|
| 939 |
-
const
|
| 940 |
|
| 941 |
// Clear table
|
| 942 |
resultsTableBody.innerHTML = '';
|
| 943 |
|
| 944 |
-
// Add
|
| 945 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 946 |
|
| 947 |
results.forEach(result => {
|
| 948 |
const row = document.createElement('tr');
|
|
@@ -1047,25 +1092,83 @@
|
|
| 1047 |
|
| 1048 |
function filterResults() {
|
| 1049 |
const selectedClass = classFilter.value;
|
| 1050 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1051 |
|
| 1052 |
-
//
|
| 1053 |
-
|
| 1054 |
-
|
| 1055 |
-
|
| 1056 |
-
|
| 1057 |
-
|
| 1058 |
-
|
| 1059 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1060 |
}
|
| 1061 |
});
|
| 1062 |
-
|
| 1063 |
-
// Filter results for stats
|
| 1064 |
-
const filteredResults = selectedClass
|
| 1065 |
-
? results.filter(result => result.class === selectedClass)
|
| 1066 |
-
: results;
|
| 1067 |
-
|
| 1068 |
-
updateClassStatistics(filteredResults);
|
| 1069 |
}
|
| 1070 |
|
| 1071 |
// Export results to CSV
|
|
|
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
<title>Questionário sobre Cidade Cinza</title>
|
| 7 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
| 9 |
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 10 |
<style>
|
| 11 |
/* Custom CSS for shuffle animation */
|
|
|
|
| 82 |
<!-- Login Screen -->
|
| 83 |
<div id="loginScreen" class="min-h-screen flex items-center justify-center px-4 py-12">
|
| 84 |
<div class="w-full max-w-md bg-white rounded-lg shadow-md overflow-hidden">
|
| 85 |
+
<div class="bg-blue-600 py-4 px-6">
|
| 86 |
<h2 class="text-2xl font-bold text-white">Questionário sobre "Cidade Cinza"</h2>
|
| 87 |
<p class="text-blue-100 mt-1">Por favor, insira suas informações para começar</p>
|
| 88 |
+
</div>
|
| 89 |
+
<div class="px-6 pb-4">
|
| 90 |
+
<button id="teacherAccessBtn" class="w-full bg-blue-500 hover:bg-blue-600 text-white font-bold py-2 px-4 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition duration-150">
|
| 91 |
Professor
|
| 92 |
</button>
|
| 93 |
</div>
|
|
|
|
| 202 |
<button id="viewResultsBtn" class="bg-blue-600 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded-md focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 transition duration-150">
|
| 203 |
Ver Resultados Detalhados
|
| 204 |
</button>
|
|
|
|
|
|
|
|
|
|
| 205 |
</div>
|
| 206 |
</div>
|
| 207 |
</div>
|
|
|
|
| 778 |
}, 0);
|
| 779 |
|
| 780 |
const score = Math.round((correctCount / questions.length) * 10);
|
| 781 |
+
const percentage = (correctCount / questions.length * 100).toFixed(1);
|
| 782 |
|
| 783 |
// Update results display
|
| 784 |
studentNameDisplay.textContent = quizState.studentName;
|
|
|
|
| 935 |
}
|
| 936 |
|
| 937 |
// Load results for admin panel
|
| 938 |
+
function loadResults(filterClass = '') {
|
| 939 |
+
const allResults = JSON.parse(localStorage.getItem('quizResults')) || [];
|
| 940 |
|
| 941 |
// Clear table
|
| 942 |
resultsTableBody.innerHTML = '';
|
| 943 |
|
| 944 |
+
// Add all results to the table (filtering will be handled by filterResults)
|
| 945 |
+
allResults.forEach(result => {
|
| 946 |
+
const row = document.createElement('tr');
|
| 947 |
+
row.className = 'hover:bg-gray-50';
|
| 948 |
+
|
| 949 |
+
// Name
|
| 950 |
+
const nameCell = document.createElement('td');
|
| 951 |
+
nameCell.className = 'py-2 px-4';
|
| 952 |
+
nameCell.textContent = result.name;
|
| 953 |
+
row.appendChild(nameCell);
|
| 954 |
+
|
| 955 |
+
// Class
|
| 956 |
+
const classCell = document.createElement('td');
|
| 957 |
+
classCell.className = 'py-2 px-4';
|
| 958 |
+
classCell.textContent = result.class;
|
| 959 |
+
row.appendChild(classCell);
|
| 960 |
+
|
| 961 |
+
// Date
|
| 962 |
+
const dateCell = document.createElement('td');
|
| 963 |
+
dateCell.className = 'py-2 px-4';
|
| 964 |
+
dateCell.textContent = formatDate(result.date);
|
| 965 |
+
row.appendChild(dateCell);
|
| 966 |
+
|
| 967 |
+
// Answers
|
| 968 |
+
const answersCell = document.createElement('td');
|
| 969 |
+
answersCell.className = 'py-2 px-4 font-mono text-sm';
|
| 970 |
+
answersCell.textContent = result.answers;
|
| 971 |
+
row.appendChild(answersCell);
|
| 972 |
+
|
| 973 |
+
// Score
|
| 974 |
+
const scoreCell = document.createElement('td');
|
| 975 |
+
scoreCell.className = 'py-2 px-4 font-semibold';
|
| 976 |
+
scoreCell.textContent = `${result.correct}/${questions.length} (${result.score}/10)`;
|
| 977 |
+
row.appendChild(scoreCell);
|
| 978 |
+
|
| 979 |
+
// Time
|
| 980 |
+
const timeCell = document.createElement('td');
|
| 981 |
+
timeCell.className = 'py-2 px-4';
|
| 982 |
+
timeCell.textContent = result.time;
|
| 983 |
+
row.appendChild(timeCell);
|
| 984 |
+
|
| 985 |
+
resultsTableBody.appendChild(row);
|
| 986 |
+
});
|
| 987 |
+
|
| 988 |
+
// Update stats and chart (will be filtered by filterResults)
|
| 989 |
+
updateClassStatistics(allResults);
|
| 990 |
+
updateClassPieChart(allResults);
|
| 991 |
|
| 992 |
results.forEach(result => {
|
| 993 |
const row = document.createElement('tr');
|
|
|
|
| 1092 |
|
| 1093 |
function filterResults() {
|
| 1094 |
const selectedClass = classFilter.value;
|
| 1095 |
+
loadResults(selectedClass);
|
| 1096 |
+
}
|
| 1097 |
+
|
| 1098 |
+
// Update pie chart for class stats
|
| 1099 |
+
function updateClassPieChart(results) {
|
| 1100 |
+
// Get container or create it
|
| 1101 |
+
let chartContainer = document.getElementById('pieChartContainer');
|
| 1102 |
+
if (!chartContainer) {
|
| 1103 |
+
chartContainer = document.createElement('div');
|
| 1104 |
+
chartContainer.id = 'pieChartContainer';
|
| 1105 |
+
chartContainer.className = 'w-full max-w-md mx-auto mt-6 bg-white p-4 rounded-lg shadow-md';
|
| 1106 |
+
chartContainer.innerHTML = '<h4 class="font-bold text-center mb-4">Distribuição de Notas</h4>';
|
| 1107 |
+
|
| 1108 |
+
const chartCanvas = document.createElement('canvas');
|
| 1109 |
+
chartCanvas.id = 'resultsPieChart';
|
| 1110 |
+
chartContainer.appendChild(chartCanvas);
|
| 1111 |
+
document.querySelector('#adminPanel .max-w-6xl').appendChild(chartContainer);
|
| 1112 |
+
}
|
| 1113 |
+
|
| 1114 |
+
if (results.length === 0) {
|
| 1115 |
+
chartContainer.innerHTML = '<p class="text-gray-500 text-center py-4">Nenhum dado disponível para exibir</p>';
|
| 1116 |
+
return;
|
| 1117 |
+
}
|
| 1118 |
+
|
| 1119 |
+
// Grade buckets
|
| 1120 |
+
const gradeBuckets = [0, 0, 0, 0, 0]; // 0-2, 2-4, 4-6, 6-8, 8-10
|
| 1121 |
+
results.forEach(result => {
|
| 1122 |
+
const score = result.score;
|
| 1123 |
+
if (score <= 2) gradeBuckets[0]++;
|
| 1124 |
+
else if (score <= 4) gradeBuckets[1]++;
|
| 1125 |
+
else if (score <= 6) gradeBuckets[2]++;
|
| 1126 |
+
else if (score <= 8) gradeBuckets[3]++;
|
| 1127 |
+
else gradeBuckets[4]++;
|
| 1128 |
+
});
|
| 1129 |
+
|
| 1130 |
+
const ctx = document.getElementById('resultsPieChart').getContext('2d');
|
| 1131 |
|
| 1132 |
+
// If existing chart exists, destroy it
|
| 1133 |
+
if (window.resultsPieChart) {
|
| 1134 |
+
window.resultsPieChart.destroy();
|
| 1135 |
+
}
|
| 1136 |
+
|
| 1137 |
+
window.resultsPieChart = new Chart(ctx, {
|
| 1138 |
+
type: 'pie',
|
| 1139 |
+
data: {
|
| 1140 |
+
labels: ['0-2', '2-4', '4-6', '6-8', '8-10'],
|
| 1141 |
+
datasets: [{
|
| 1142 |
+
data: gradeBuckets,
|
| 1143 |
+
backgroundColor: [
|
| 1144 |
+
'#EF4444',
|
| 1145 |
+
'#F59E0B',
|
| 1146 |
+
'#3B82F6',
|
| 1147 |
+
'#6366F1',
|
| 1148 |
+
'#10B981'
|
| 1149 |
+
],
|
| 1150 |
+
borderWidth: 1
|
| 1151 |
+
}]
|
| 1152 |
+
},
|
| 1153 |
+
options: {
|
| 1154 |
+
responsive: true,
|
| 1155 |
+
plugins: {
|
| 1156 |
+
legend: {
|
| 1157 |
+
position: 'bottom'
|
| 1158 |
+
},
|
| 1159 |
+
tooltip: {
|
| 1160 |
+
callbacks: {
|
| 1161 |
+
label: function(context) {
|
| 1162 |
+
const total = results.length;
|
| 1163 |
+
const value = context.raw;
|
| 1164 |
+
const percentage = Math.round((value / total) * 100);
|
| 1165 |
+
return `${context.label}: ${value} (${percentage}%)`;
|
| 1166 |
+
}
|
| 1167 |
+
}
|
| 1168 |
+
}
|
| 1169 |
+
}
|
| 1170 |
}
|
| 1171 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1172 |
}
|
| 1173 |
|
| 1174 |
// Export results to CSV
|
prompts.txt
CHANGED
|
@@ -3,4 +3,8 @@ as turmas são 1n1, 1n2, 2n1, 2n2, 3n1, 3n2, 1eja, 2eja, 3eja
|
|
| 3 |
queria que eu como professor tivesse uma area de loguin onde eu tivesse acesso a uma listagem por turma onde constasse a listagem de notas dos alunos
|
| 4 |
gostaria que após o preenchimento não pudesse voltar
|
| 5 |
acrescente um botão professor no início, quando clicar tenha a opção de por senha: Profandre123 e vá para planílhas por turma com nome e nota dos alunos
|
| 6 |
-
na planilha, qdo selecionar a turma só apareça a listagem daquela turma
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
queria que eu como professor tivesse uma area de loguin onde eu tivesse acesso a uma listagem por turma onde constasse a listagem de notas dos alunos
|
| 4 |
gostaria que após o preenchimento não pudesse voltar
|
| 5 |
acrescente um botão professor no início, quando clicar tenha a opção de por senha: Profandre123 e vá para planílhas por turma com nome e nota dos alunos
|
| 6 |
+
na planilha, qdo selecionar a turma só apareça a listagem daquela turma
|
| 7 |
+
calcular corretamente a porcentagem de acerto, gere um gráfico pizza do total de acetos por turma selecionada e somente dela, só apareça as notas e alunos da turma selecionada no filtro de turmas
|
| 8 |
+
quando selecionar no filtro uma turma apareça a planilha daquela turma
|
| 9 |
+
retire o botão voltar, mude a posição do botão professor para baixo
|
| 10 |
+
mude o botão Professor para em baixo no iniciar questionário
|