-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #793 from psu-libraries/763-admins-upload-corrections
763 admins upload corrections
- Loading branch information
Showing
28 changed files
with
318 additions
and
15 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
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,33 @@ | ||
# frozen_string_literal: true | ||
|
||
class AdminFeedbackFile < ApplicationRecord | ||
mount_uploader :asset, SubmissionFileUploader | ||
|
||
belongs_to :submission | ||
|
||
def self.feedback_types | ||
['format-review', 'final-submission'].freeze | ||
end | ||
|
||
validates :submission_id, :asset, presence: true | ||
validates :asset, virus_free: true | ||
validates :feedback_type, inclusion: { in: feedback_types }, presence: true | ||
|
||
def class_name | ||
self.class.to_s.underscore.dasherize | ||
end | ||
|
||
def link_identifier | ||
self.class.to_s.underscore.split('_file').first.pluralize | ||
end | ||
|
||
def full_file_path | ||
# file path only | ||
"#{WORKFLOW_BASE_PATH}admin_feedback_files/#{EtdaFilePaths.new.detailed_file_path(id)}" | ||
end | ||
|
||
def current_location | ||
# full file path including file name | ||
full_file_path + asset_identifier | ||
end | ||
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
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
22 changes: 22 additions & 0 deletions
22
app/views/admin/submissions/edit/_admin_feedback_files.html.erb
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,22 @@ | ||
<div id="admin-feedback-files"> | ||
<div class="links cocoon-links"> | ||
<label> <strong> <%= feedback_type.gsub('_', ' ').titleize %> Notes – Files </strong> </label> | ||
<div id="admin-feedback-file-fields-<%= feedback_type %>"> | ||
<p> Any files containing corrections may be uploaded here. They will not be included with the final submission.</p> | ||
<%= f.simple_fields_for :admin_feedback_files do |file| %> | ||
<% if file.object.feedback_type == feedback_type %> | ||
<%= render 'admin/submissions/file_fields', file_fields: file %> | ||
<% end %> | ||
<% end %> | ||
</div> | ||
<%= link_to_add_association f, :admin_feedback_files, | ||
class: 'btn btn-info btn-sm can-toggle-clickability', | ||
data: { association_insertion_node: '#admin-feedback-file-fields-' + feedback_type, association_insertion_method: 'append' }, | ||
form_name: 'file_fields', | ||
wrap_object: Proc.new{|file| file.feedback_type = feedback_type; file }, | ||
partial: '/admin/submissions/file_fields' do %> | ||
<span class="fa fa-plus"></span> Add File | ||
<% end %> | ||
</div> | ||
</div> | ||
|
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
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 |
---|---|---|
|
@@ -428,6 +428,10 @@ en: | |
login_html: 'Login using your Penn State access account to view the paper.' | ||
approval_help: | ||
message: "If you know you need to approve a student's work, but do not see it in your queue or the link is broken, your ability to vote has expired. To resolve this issue, please try clearing your cache and then trying the link again or try the link on a different browser. If that doesn't work, please call OTD at 814-865-5448 or email us at <a href='mailto:[email protected]' target='_blank'>[email protected]</a> so that we may proxy for you." | ||
default_format_review_note: | ||
"The documents below contain your format review corrections, information on supporting materials, and the graduation checklist. Please refer to the Thesis and Dissertation Handbook when making corrections. \n \n The next step is to submit your final dissertation. The final dissertation must be reviewed and approved by all committee members and all changes made before it is uploaded to the eTD site for electronic approval. Formatting changes requested by the Office of Theses and Dissertations will be the only changes permitted after the final is uploaded." | ||
default_final_submission_note: | ||
"Your final submission requires further revisions. To see these revisions, open the PDF below in Adobe Acrobat. Please note this DOES NOT require you to get committee approvals again. Rather, make the requested revisions and then upload the corrected file to the ETDA. The Office of Theses and Dissertations will review your submission again until it is error-free. Please resubmit by the deadline for your intended graduation semester requirements. Not doing so puts you at risk of being removed from the graduation list. \n \n Thank you and do reach out if you have any questions!" | ||
fee_message: | ||
master_thesis: | ||
message: "Before proceeding to your final submission, you must pay the $10 thesis fee. The fee can be paid at the <a href='https://secure.gradsch.psu.edu/paymentportal/' target='_blank'>Payment Section</a> of the Graduate School Thesis and Dissertation Information <a href='https://gradschool.psu.edu/completing-your-degree/thesis-and-dissertation-information/' target='_blank'>webpage</a>." | ||
|
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,11 @@ | ||
class CreateAdminFeedbackFiles < ActiveRecord::Migration[6.1] | ||
def change | ||
create_table :admin_feedback_files do |t| | ||
t.bigint :submission_id | ||
t.text :asset | ||
t.string :feedback_type | ||
|
||
t.timestamps | ||
end | ||
end | ||
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
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,8 @@ | ||
# # frozen_string_literal: true | ||
|
||
FactoryBot.define do | ||
factory :admin_feedback_file, class: 'AdminFeedbackFile' do |_f| | ||
submission | ||
asset { File.open(fixture('admin_feedback_01.pdf')) } | ||
end | ||
end |
Binary file not shown.
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
Oops, something went wrong.