Skip to content

Commit

Permalink
Merge branch 'refs/heads/main' into issue_477
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorMonardez committed Nov 28, 2024
2 parents 653917a + 2a336dd commit ecf8ccc
Show file tree
Hide file tree
Showing 11 changed files with 107 additions and 65 deletions.
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.2.1
3.2.5
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# ruby=3.2.1
# ruby=3.2.5
# frozen_string_literal: true

source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

# The following line is necessary to allow RVM choosing the correct ruby version. RVM 2.0 will probably be able to interpret the "~>" symbol and we will be able to safely remove the "#ruby=3.2.2" line.
ruby "~> 3.2.1"
ruby "~> 3.2.5"

# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
gem "rails", "~> 7.0.8.1"
Expand Down
118 changes: 58 additions & 60 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -29,76 +29,76 @@ GIT
GEM
remote: https://rubygems.org/
specs:
actioncable (7.0.8.4)
actionpack (= 7.0.8.4)
activesupport (= 7.0.8.4)
actioncable (7.0.8.5)
actionpack (= 7.0.8.5)
activesupport (= 7.0.8.5)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (7.0.8.4)
actionpack (= 7.0.8.4)
activejob (= 7.0.8.4)
activerecord (= 7.0.8.4)
activestorage (= 7.0.8.4)
activesupport (= 7.0.8.4)
actionmailbox (7.0.8.5)
actionpack (= 7.0.8.5)
activejob (= 7.0.8.5)
activerecord (= 7.0.8.5)
activestorage (= 7.0.8.5)
activesupport (= 7.0.8.5)
mail (>= 2.7.1)
net-imap
net-pop
net-smtp
actionmailer (7.0.8.4)
actionpack (= 7.0.8.4)
actionview (= 7.0.8.4)
activejob (= 7.0.8.4)
activesupport (= 7.0.8.4)
actionmailer (7.0.8.5)
actionpack (= 7.0.8.5)
actionview (= 7.0.8.5)
activejob (= 7.0.8.5)
activesupport (= 7.0.8.5)
mail (~> 2.5, >= 2.5.4)
net-imap
net-pop
net-smtp
rails-dom-testing (~> 2.0)
actionpack (7.0.8.4)
actionview (= 7.0.8.4)
activesupport (= 7.0.8.4)
actionpack (7.0.8.5)
actionview (= 7.0.8.5)
activesupport (= 7.0.8.5)
rack (~> 2.0, >= 2.2.4)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (7.0.8.4)
actionpack (= 7.0.8.4)
activerecord (= 7.0.8.4)
activestorage (= 7.0.8.4)
activesupport (= 7.0.8.4)
actiontext (7.0.8.5)
actionpack (= 7.0.8.5)
activerecord (= 7.0.8.5)
activestorage (= 7.0.8.5)
activesupport (= 7.0.8.5)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.0.8.4)
activesupport (= 7.0.8.4)
actionview (7.0.8.5)
activesupport (= 7.0.8.5)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
active_scaffold_duplicate (1.1.4)
active_scaffold (>= 3.6.0.pre)
activejob (7.0.8.4)
activesupport (= 7.0.8.4)
activejob (7.0.8.5)
activesupport (= 7.0.8.5)
globalid (>= 0.3.6)
activemodel (7.0.8.4)
activesupport (= 7.0.8.4)
activerecord (7.0.8.4)
activemodel (= 7.0.8.4)
activesupport (= 7.0.8.4)
activemodel (7.0.8.5)
activesupport (= 7.0.8.5)
activerecord (7.0.8.5)
activemodel (= 7.0.8.5)
activesupport (= 7.0.8.5)
activerecord-session_store (2.1.0)
actionpack (>= 6.1)
activerecord (>= 6.1)
cgi (>= 0.3.6)
multi_json (~> 1.11, >= 1.11.2)
rack (>= 2.0.8, < 4)
railties (>= 6.1)
activestorage (7.0.8.4)
actionpack (= 7.0.8.4)
activejob (= 7.0.8.4)
activerecord (= 7.0.8.4)
activesupport (= 7.0.8.4)
activestorage (7.0.8.5)
actionpack (= 7.0.8.5)
activejob (= 7.0.8.5)
activerecord (= 7.0.8.5)
activesupport (= 7.0.8.5)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (7.0.8.4)
activesupport (7.0.8.5)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
Expand Down Expand Up @@ -206,7 +206,7 @@ GEM
globalid (1.2.1)
activesupport (>= 6.1)
htmlentities (4.3.4)
i18n (1.14.5)
i18n (1.14.6)
concurrent-ruby (~> 1.0)
ice_nine (0.11.2)
image_processing (1.12.2)
Expand Down Expand Up @@ -262,7 +262,7 @@ GEM
mini_magick (4.12.0)
mini_mime (1.1.5)
mini_portile2 (2.8.7)
minitest (5.25.0)
minitest (5.25.1)
msgpack (1.7.2)
multi_json (1.15.0)
mysql2 (0.5.5)
Expand All @@ -277,7 +277,7 @@ GEM
timeout
net-smtp (0.5.0)
net-protocol
nio4r (2.5.9)
nio4r (2.7.3)
nokogiri (1.16.7)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
Expand Down Expand Up @@ -307,27 +307,27 @@ GEM
psych (5.1.2)
stringio
public_suffix (6.0.1)
puma (6.4.2)
puma (6.4.3)
nio4r (~> 2.0)
raabro (1.4.0)
racc (1.8.1)
rack (2.2.8.1)
rack-test (2.1.0)
rack (>= 1.3)
rails (7.0.8.4)
actioncable (= 7.0.8.4)
actionmailbox (= 7.0.8.4)
actionmailer (= 7.0.8.4)
actionpack (= 7.0.8.4)
actiontext (= 7.0.8.4)
actionview (= 7.0.8.4)
activejob (= 7.0.8.4)
activemodel (= 7.0.8.4)
activerecord (= 7.0.8.4)
activestorage (= 7.0.8.4)
activesupport (= 7.0.8.4)
rails (7.0.8.5)
actioncable (= 7.0.8.5)
actionmailbox (= 7.0.8.5)
actionmailer (= 7.0.8.5)
actionpack (= 7.0.8.5)
actiontext (= 7.0.8.5)
actionview (= 7.0.8.5)
activejob (= 7.0.8.5)
activemodel (= 7.0.8.5)
activerecord (= 7.0.8.5)
activestorage (= 7.0.8.5)
activesupport (= 7.0.8.5)
bundler (>= 1.15.0)
railties (= 7.0.8.4)
railties (= 7.0.8.5)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
Expand All @@ -340,9 +340,9 @@ GEM
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
railties (7.0.8.4)
actionpack (= 7.0.8.4)
activesupport (= 7.0.8.4)
railties (7.0.8.5)
actionpack (= 7.0.8.5)
activesupport (= 7.0.8.5)
method_source
rake (>= 12.2)
thor (~> 1.0)
Expand All @@ -363,8 +363,7 @@ GEM
responders (3.1.1)
actionpack (>= 5.2)
railties (>= 5.2)
rexml (3.3.6)
strscan
rexml (3.3.9)
rouge (4.2.0)
rspec-collection_matchers (1.2.1)
rspec-expectations (>= 2.99.0.beta1)
Expand Down Expand Up @@ -464,7 +463,6 @@ GEM
mini_portile2 (~> 2.8.0)
ssrf_filter (1.1.2)
stringio (3.1.1)
strscan (3.1.0)
thor (1.3.1)
tilt (2.3.0)
timeliness (0.4.5)
Expand Down
1 change: 1 addition & 0 deletions app/controllers/enrollments_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ class EnrollmentsController < ApplicationController
:thesis_title,
:thesis_defense_date,
:obs,
:obs_to_academic_transcript,

:advisements,
:scholarship_durations,
Expand Down
1 change: 0 additions & 1 deletion app/controllers/report_configurations_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

class ReportConfigurationsController < ApplicationController
authorize_resource
skip_before_action :verify_authenticity_token, only: [:preview]

include ApplicationHelper
active_scaffold :report_configuration do |config|
Expand Down
26 changes: 26 additions & 0 deletions app/helpers/enrollments_pdf_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -710,6 +710,32 @@ def thesis_table(curr_pdf, options = {})
end
end

def obs_table(pdf, options = {})
if options[:enrollment]&.obs_to_academic_transcript.present?
data_table_rows = [[
"#{I18n.t("pdf_content.enrollment.academic_transcript.obs_to_academic_transcript")} <b>#{
rescue_blank_text(options[:enrollment].obs_to_academic_transcript)
}</b>"
]]

pdf.table(
data_table_rows,
cell_style: {
borders: [:left, :right, :bottom, :top],
border_bottom_width: 0.5,
border_top_width: 0.15,
width: 560,
padding_top: 5.5,
padding_bottom: 7.5,
inline_format: true,
font: "FreeMono",
size: 8,
border_color: "000080"
}
)
end
end

def justification_grade_not_count_in_gpr_table(curr_pdf, options = {})
enrollment ||= options[:enrollment]

Expand Down
2 changes: 2 additions & 0 deletions app/views/enrollments/academic_transcript_pdf.pdf.prawn
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,7 @@ new_document(

thesis_table(pdf, enrollment: @enrollment)

obs_table(pdf, enrollment: @enrollment)

enrollment_holds_table(pdf, enrollment: @enrollment)
end
2 changes: 2 additions & 0 deletions app/views/enrollments/grades_report_pdf.pdf.prawn
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ new_document(

thesis_table(pdf, enrollment: @enrollment, show_advisors: true)

obs_table(pdf, enrollment: @enrollment)

accomplished_table(pdf, accomplished_phases: @accomplished_phases)

deferrals_table(pdf, deferrals: @deferrals)
Expand Down
2 changes: 2 additions & 0 deletions config/locales/enrollment.pt-BR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ pt-BR:
thesis_defense_committee_participations: "Banca Avaliadora"
thesis_defense_committee_professors: "Banca Avaliadora"
accomplishment_conclusion_date_not_given: "---------/----"
obs_to_academic_transcript: "Observação para o Histórico"

errors:
models:
Expand Down Expand Up @@ -101,6 +102,7 @@ pt-BR:
title: "Histórico Escolar"
total_credits: "Total"
scholarships: "BOLSAS"
obs_to_academic_transcript: "OBSERVAÇÕES:"
grade_list:
title: "DISCIPLINAS CURSADAS COM APROVEITAMENTO"
course_approved: "AP"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Copyright (c) Universidade Federal Fluminense (UFF).
# This file is part of SAPOS. Please, consult the license terms in the LICENSE file.

class AddObsToAcademicTranscriptToEnrollments < ActiveRecord::Migration[7.0]
def up
add_column :enrollments, :obs_to_academic_transcript, :text
end
def down
remove_column :enrollments, :obs_to_academic_transcript
end
end
3 changes: 2 additions & 1 deletion db/schema.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ecf8ccc

Please sign in to comment.