Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

760 acknowledge page #786

Merged
merged 9 commits into from
Jul 31, 2024
Merged

760 acknowledge page #786

merged 9 commits into from
Jul 31, 2024

Conversation

jlandiseigsti
Copy link
Contributor

Closes #760

Adds a page of things authors must acknowledge before proceeding with a submission.

Will convert to a proper PR once the Graduate school provides title.

@jlandiseigsti jlandiseigsti requested a review from Smullz622 June 7, 2024 19:08
@jlandiseigsti jlandiseigsti force-pushed the 760-acknowledge-page branch 2 times, most recently from bf0bdb0 to c971db0 Compare June 10, 2024 16:52
Copy link
Contributor

@ajkiessl ajkiessl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few small things. Everything else looks good.

<%= form.input :sig_4, label: false, placeholder: I18n.t("graduate.submission.acknowledge.initial") %>
<%= form.label :sig_5, I18n.t("graduate.submission.acknowledge.point5", degree_type: @degree_type) %>
<%= form.input :sig_5, label: false, placeholder: I18n.t("graduate.submission.acknowledge.initial") %>
<%= form.label :sig_5, I18n.t("graduate.submission.acknowledge.point6") %>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be :sig_6. I think this affects the id of the rendered html element.

@@ -0,0 +1,5 @@
class AddAcknowledgementPageToSubmission < ActiveRecord::Migration[6.1]
def change
add_column :submissions, :acknowledgment_page_viewed_at, :datetime
Copy link
Contributor

@ajkiessl ajkiessl Jun 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a major issue, so this is more of a suggestion, but I think :acknowledgment_page_submitted_at would be better here. Just so it's clear that the timestamp is set after submission. I've found (particularly since returning to ETDA) that being precise with the timestamp name can help to remember exactly when it should be set.

@jlandiseigsti jlandiseigsti force-pushed the 760-acknowledge-page branch from c971db0 to caf6f80 Compare June 24, 2024 19:46
@jlandiseigsti jlandiseigsti force-pushed the 760-acknowledge-page branch from caf6f80 to 53a65fd Compare July 26, 2024 14:42
@jlandiseigsti jlandiseigsti marked this pull request as ready for review July 26, 2024 15:10
@jlandiseigsti jlandiseigsti requested a review from ajkiessl July 26, 2024 15:10
Copy link
Contributor

@ajkiessl ajkiessl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a couple of suggestions below. Otherwise looking good.

<%= form.input :sig_6, label: false, placeholder: I18n.t("graduate.submission.acknowledge.initial") %>
<%= form.label :sig_7, I18n.t("graduate.submission.acknowledge.point7") %>
<%= form.input :sig_7, label: false, placeholder: I18n.t("graduate.submission.acknowledge.initial") %>
<%= form.button :submit, class: "btn-primary", value: "Submit", disabled: @is_good %>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious about the disabled: @is_good. Does that need to be there? I might be missing something.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's my mistake...it's leftover from an earlier experiment I was trying. I'll remove it.

db/schema.rb Outdated
@@ -301,6 +301,8 @@
t.string "lionpath_semester"
t.string "academic_program"
t.string "degree_checkout_status"
t.datetime "author_release_warning_sent_at"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably be removed before we merge this to main so the migrations don't get mixed up

allow(controller).to receive(:find_submission).and_return(submission)
expect(get(:edit, params:)).to redirect_to author_submission_acknowledge_path(submission.id)
end
end
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be good to also test what happens when acknowledgment_page_submitted_at is set and when the partner is not graduate here.

field.set('JLE')
end
find_button('Submit').click
expect(page).to have_content("Update #{new_submission.degree_type} Title")
select second_program.name, from: current_partner.program_label.to_s
second_program_id = Program.where(name: second_program.name).first.id
click_on "Update #{new_submission.degree_type} Title" if current_partner.graduate?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is a graduate only test, then we should be able to remove the if current_partner.graduate? logic here and the line below.

@jlandiseigsti jlandiseigsti force-pushed the 760-acknowledge-page branch from 5a48726 to 910e3fb Compare July 26, 2024 20:00
end

unless current_partner.graduate?
it 'renders the edit page regardless of the acknowledgment page status' do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In order to get this to run in CI it'll need the honors: true tag (or something other than graduate). So it would look like: it 'renders the edit page regardless of the acknowledgment page status', honors: true do

@jlandiseigsti jlandiseigsti force-pushed the 760-acknowledge-page branch from 910e3fb to f4aa8bf Compare July 30, 2024 19:00
If the value for acknowledgment_page_viewed_at is a Datetime, the page has been viewed.
Hitting submit on the validation page will save when the acknowledgment page was viewed and will reroute it to the standard edit page.
The students must initial the fields...they cannot be blank.
Also includes some tweaks to the appearance of the page.
Tests that the new methods do what they are intended to do.
Now updates an integration test to ensure that the acknowledgment page appears for the grad program.
Renames the model field to `acknowledgment_page_submitted_at`
@jlandiseigsti jlandiseigsti force-pushed the 760-acknowledge-page branch from f4aa8bf to 15ebd7f Compare July 31, 2024 14:07
@jlandiseigsti jlandiseigsti requested a review from ajkiessl July 31, 2024 15:08
Copy link
Contributor

@ajkiessl ajkiessl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm!

@jlandiseigsti jlandiseigsti merged commit cee471d into main Jul 31, 2024
1 check passed
@jlandiseigsti jlandiseigsti deleted the 760-acknowledge-page branch July 31, 2024 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ETD Submission Acknowledgment Format Review
2 participants