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

Navigate to script overview on save and close of lesson edit for lessons without lesson plan #38688

Merged
merged 11 commits into from
Jan 27, 2021

Conversation

dmcavoy
Copy link
Contributor

@dmcavoy dmcavoy commented Jan 22, 2021

If you set has_lesson_plan to false on the lesson edit page and then hit "save and close" it will take you to the script overview page instead of the lesson plan page.

navigate-lesson-wo-lp

You also can't directly access a lesson plan for a lesson for which has_lesson_plan is false.

Screen Shot 2021-01-26 at 4 36 06 PM

Links

Testing story

  • Add test to check that client side navigates correctly based on has_lesson_plan
  • Add tests to check that forbidden from going to a lesson plan page for lesson without lesson plan

Reviewer Checklist:

  • Tests provide adequate coverage
  • Privacy and Security impacts have been assessed
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Pull Request is labeled appropriately
  • Follow-up work items (including potential tech debt) are tracked and linked

@dmcavoy dmcavoy changed the title Save close script page Navigate to script overview on save and close of lesson edit for lessons without lesson plan Jan 26, 2021
);
if (data.hasLessonPlan) {
navigateToHref(
`/lessons/${this.state.originalLessonData.id}${
Copy link
Member

Choose a reason for hiding this comment

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

please pass the lesson path down from the server using the lesson_path helper. this will make it a lot easier to find and change the lesson paths later.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will create a follow up PR with this

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@dmcavoy dmcavoy merged commit d4c424d into staging Jan 27, 2021
@dmcavoy dmcavoy deleted the save-close-script-page branch January 27, 2021 00:54
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.

None yet

3 participants