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

offer to upgrade course after unarchiving it #2288

Merged
merged 2 commits into from
Jan 24, 2024

Conversation

Alex-Jordan
Copy link
Contributor

This makes it so when you unarchive a course, you have an option to immediately go and upgrade it. Without this, after unarchiving a course, if it needs to be upgraded you must go to the Upgrade Courses page and wait while all courses are assessed for upgrade needs. But this lets you bypass that page and go straight to the confirmation page for only the one newly unarchived course.

Since now there are three things you can do (upgrade the new course, log in to the new course, and move on to unarchive something else) I changed the layout to look like three buttons in a row.

Copy link
Member

@drgrice1 drgrice1 left a comment

Choose a reason for hiding this comment

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

This generally looks good, but I see a couple of minor problems.

First, the usage of the Bootstrap grid layout for the buttons doesn't look the best to me. Mostly the issue is that the "Log into Course" button is too wide. To fix this I suggest using a direct flex layout instead. Change the class on the div containing the buttons (on line 1294) to d-flex justify-content-between, delete the class attribute on the forms contained therein (on lines 1299 and 1319), and remove the col-4 class from the "Log into Course" button (on line 1314).

Second, there are duplicate id's created on the page by calling the ContentGenerator hidden_authen_fields method twice in the two forms for the "Upgrade Course" and "Unarchive More" buttons. There is an optional id prefix argument to the hidden_authen_fields method that should be utilized to fix this. So change line 1301 to something like $c->hidden_authen_fields('upgrade_course_') and line 1321 to something like $c->hidden_authen_fields('unarchive_more_'). The actual prefixes used here don't matter as these id's are not used for anything in this case. What matters is that they are different.

@Alex-Jordan
Copy link
Contributor Author

OK, I made the changes you suggested here.

Copy link
Member

@drgrice1 drgrice1 left a comment

Choose a reason for hiding this comment

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

This looks good now. Thanks for making the suggested changes.

@drgrice1 drgrice1 merged commit fc0736b into openwebwork:develop Jan 24, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants