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

[MER-2573] Task to create contained objectives for existing sections #4238

Conversation

gastonabella
Copy link
Contributor

@gastonabella gastonabella commented Sep 21, 2023

MER-2573

This PR is the first of three parts to create and use the new ContainedObjectives table. Similar to ContainedPages, this works as a quick way of knowing which objectives are attached to activities within a specific container.

As part of this pull request:

  • New contained_objectives table and new v25_migration field under sections that states if the contained objectives were built for a section.
  • A new Mix Task is created for building all the contained objectives for the existing sections. You can run it with mix create_contained_objectives in the console.

The remaining two PRs will include the changes for automatically building the contained objectives when a section gets created, remixed, or updated, and the new Filter By implementation on the Learning Objectives tab under the Instructor Dashboard.

@gastonabella gastonabella force-pushed the mer-2573-task-to-create-contained-objectives-for-existing-sections branch from 6b8d238 to 6afaaf3 Compare September 21, 2023 14:22
Copy link
Contributor

@augusto1024 augusto1024 left a comment

Choose a reason for hiding this comment

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

Amazing job 🤩!!! I just left a couple of small NITs/questions

As we discussed yesterday in the office, when I ran the task while running the app, the app crashed, so maybe we should take a look at that. I tested it with a couple more sections and works great!

@gastonabella gastonabella force-pushed the mer-2573-task-to-create-contained-objectives-for-existing-sections branch from 65f3534 to 204903d Compare September 25, 2023 16:35
@gastonabella
Copy link
Contributor Author

Based on Augusto's comment and after some debugging I noticed an Oban weird error caused by having two instances of Oban running at the same time (server running locally and the Oban instance started by the mix task).
What is weird is that it only happens when running the server with an iex shell (via iex -S mix phx.server) and running the task at the same time. I think that should not be an issue in staging or prod, but I made the task accessible from iex via Mix.Tasks.CreateContainedObjectives.run_now() just in case.

@gastonabella gastonabella force-pushed the mer-2573-task-to-create-contained-objectives-for-existing-sections branch from 204903d to a6bda48 Compare September 27, 2023 20:08
@darrensiegel darrensiegel merged commit 1247781 into master Sep 28, 2023
@darrensiegel darrensiegel deleted the mer-2573-task-to-create-contained-objectives-for-existing-sections branch September 28, 2023 15:29
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.

3 participants