-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'csv_xls' into development
- Loading branch information
Showing
10 changed files
with
146 additions
and
135 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
module CsvHelper | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -80,6 +80,7 @@ def self.current | |
@current_alumn | ||
end | ||
|
||
|
||
private | ||
def validates_password | ||
if self.password_digest.nil? | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type"></meta> | ||
<table border="1"> | ||
<tr> | ||
<th>Nome</th> | ||
<th>Matrícula</th> | ||
<th>Turma</th> | ||
<th>Faltas</th> | ||
<th>Advertências</th> | ||
<th>Suspensões</th> | ||
<th>Responsável</th> | ||
<%@subjects.each do |subject|%> | ||
<th><%=subject.name_subject%> 1°B</th> | ||
<%end%> | ||
<%@subjects.each do |subject|%> | ||
<th><%=subject.name_subject%> 2°B</th> | ||
<%end%> | ||
<%@subjects.each do |subject|%> | ||
<th><%=subject.name_subject%> 3°B</th> | ||
<%end%> | ||
<%@subjects.each do |subject|%> | ||
<th><%=subject.name_subject%> 4°B</th> | ||
<%end%> | ||
<%@subjects.each do |subject|%> | ||
<th><%=subject.name_subject%> Final</th> | ||
<%end%> | ||
</tr> | ||
|
||
<% @alumns.each do |alumn| %> | ||
<tr> | ||
<td> <%= alumn.name%></td> | ||
<td><%= alumn.registry%></td> | ||
<td><%= alumn.classroom.name_classroom%></td> | ||
<td><%= alumn.school_misses.count %> | ||
</td> | ||
<td><%= alumn.quantity_strike %></td> | ||
<td><%= alumn.suspensions.count %> | ||
<td><%= alumn.parent.name %></td> | ||
<%alumn.classroom.subjects.each do |subject|%> | ||
<%subject.grades.where(alumn_id: alumn.id).each do |grade|%> | ||
<td><%=grade.grade_01%></td> | ||
<%end%> | ||
<%end%> | ||
<%alumn.classroom.subjects.each do |subject|%> | ||
<%subject.grades.where(alumn_id: alumn.id).each do |grade|%> | ||
<td><%=grade.grade_02%></td> | ||
<%end%> | ||
<%end%> | ||
<%alumn.classroom.subjects.each do |subject|%> | ||
<%subject.grades.where(alumn_id: alumn.id).each do |grade|%> | ||
<td><%=grade.grade_03%></td> | ||
<%end%> | ||
<%end%> | ||
<%alumn.classroom.subjects.each do |subject|%> | ||
<%subject.grades.where(alumn_id: alumn.id).each do |grade|%> | ||
<td><%=grade.grade_04%></td> | ||
<%end%> | ||
<%end%> | ||
<%alumn.classroom.subjects.each do |subject|%> | ||
<%subject.grades.where(alumn_id: alumn.id).each do |grade|%> | ||
<td><%=grade.grade_final%></td> | ||
<%end%> | ||
<%end%> | ||
</tr> | ||
<% end %> | ||
<tr> | ||
<td><strong>Data</strong></td> | ||
<td><%=DateTime.now.to_date%></td> | ||
</tr> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
require 'rails_helper' | ||
|
||
# Specs in this file have access to a helper object that includes | ||
# the CsvHelper. For example: | ||
# | ||
# describe CsvHelper do | ||
# describe "string concat" do | ||
# it "concats two strings with spaces" do | ||
# expect(helper.concat_strings("this","that")).to eq("this that") | ||
# end | ||
# end | ||
# end | ||
RSpec.describe CsvHelper, type: :helper do | ||
pending "add some examples to (or delete) #{__FILE__}" | ||
end |