1
personal I have the following doubt that my code it increments for whenever it has an evaluation it shows, but, the media always gets after as if it were a note
<% @registration.matrix.blocks.each do |block| %>
<h5>Bloco: <%= block.description %></h5>
<div class="table-responsive">
<table class="table table-sm table-striped table-bordered shadow-sm">
<thead class="thead-dark">
<tr>
<th>Disciplina</th>
<th>Faltas Atribuidas</th>
<th>Prova 1</th>
<th>Prova 2</th>
<th>Prova 3</th>
<th>Prova 4</th>
<th>Prova 5</th>
<th>Prova 6</th>
<th>Prova 7</th>
<th>Prova 8</th>
<th>Prova Final</th>
<th>Média</th>
</tr>
</thead>
<tbody>
<% block.disciplines.distinct.each do |discipline| %>
<tr>
<td><%= discipline.name %></td>
<td>
<%= number_of_absences(current_user, discipline) %>
</td>
<% discipline.evaluations.each do |evaluation| %>
<td><%= Evaluate.get_evaluate(current_user.id, evaluation.id).present? ? Evaluate.get_evaluate(current_user.id, evaluation.id).note : '0,0' %></td>
<% end %>
<td><%= get_media(current_user, discipline) %></td>
</tr>
<% end %>
</tbody>
</table>
<% end %>
</div>
So I’d like to know how I do to fix the error, for example I put the note 10, it divides by 8 as I programmed, but the average is 10/8 since 10 was the only note that assigns, it is 1.25 but the media is on the side and not at the end, how do I put at the end in the table "average"
face until "worked" happens that when I assign the second note, ai jumps and Buga kk
– Louan Fontenele