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

Associate PublishableEntities with Collections [FC-0062] #216

Merged
merged 9 commits into from
Sep 3, 2024

Commits on Aug 28, 2024

  1. docs: adds guidelines for the Collection models

    copied and modified slightly from @ormsbee's #131
    pomegranited committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    534e8d9 View commit details
    Browse the repository at this point in the history
  2. feat: adds CollectionObject model and APIs

    to associate PublishableEntities with Collections.
    
    Collection.modified timestamp is updated whenever its contents are changed.
    pomegranited committed Aug 28, 2024
    Configuration menu
    Copy the full SHA
    1fda3e5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    a2cd234 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    7ec9ba5 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    0e15dd0 View commit details
    Browse the repository at this point in the history

Commits on Aug 29, 2024

  1. refactor: use "entities" instead of "contents" or "objects"

    Addresses PR review.
    
    * CollectionObject -> CollectionPublishableEntity,
      with added created_by and created fields
    * contents -> entities, contents_qset -> entities_qset
    * get_object_collections -> get_entity_collections,
      with added learning_package_id argument
    pomegranited committed Aug 29, 2024
    Configuration menu
    Copy the full SHA
    00111bc View commit details
    Browse the repository at this point in the history
  2. refactor: merge get_collections + get_learning_package_collections

    We ended up not needing a "get all collections" function; we always
    fetch them for a given learning package.
    
    So we merged them into a single api.get_collections method that takes a
    `learning_package_id` + optional `enabled` (defaults to True).
    pomegranited committed Aug 29, 2024
    Configuration menu
    Copy the full SHA
    b723d79 View commit details
    Browse the repository at this point in the history

Commits on Aug 30, 2024

  1. refactor: address PR review

    API:
    * create_collection -- removed entities_qset param, added enabled param
    * add/remove entities from a single collection, not a qset
    * raise ValidationError if adding entities to a collection with
      mismatching learning packages
    * add/remove returns updated collection object (not count)
    
    Tests:
    * use authoring API
    * simplified data used by test classes
    pomegranited committed Aug 30, 2024
    Configuration menu
    Copy the full SHA
    2fe2e70 View commit details
    Browse the repository at this point in the history

Commits on Sep 3, 2024

  1. fix: use fewer queries to discover invalid entities

    being added to a collection
    pomegranited committed Sep 3, 2024
    Configuration menu
    Copy the full SHA
    e03daaa View commit details
    Browse the repository at this point in the history