Commit cec894b8 authored by Martin Juhás's avatar Martin Juhás
Browse files

feat: add more links to learning activities

### Additions

* added field `injects: [DefinitionInjectType!]!` to `LearningActivityType` type
* added field `questionnaires: [QuestionnaireType!]!` to `LearningActivityType` type
* added field `tools: [ExtendedToolType!]!` to `LearningActivityType` type
* added field `addresses: [EmailAddressType!]!` to `LearningActivityType` type
* added field `activity: LearningActivityType` to `DefinitionInjectType` type
* added field `activity: LearningActivityType` to `QuestionnaireType` type
* added field `activity: LearningActivityType` to `ExtendedToolType` type
* added field `activity: LearningActivityType` to `EmailAddressType` type

Closes #415
parent 0084ef62
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -122,7 +122,7 @@ class ExerciseDefinitionType(graphene.ObjectType):
class ToolType(DjangoObjectType):
    class Meta:
        model = Tool
        exclude = ["responses"]
        exclude = ["responses", "activity"]

    definition = graphene.Field(ExerciseDefinitionType, required=True)

+13 −0
Original line number Diff line number Diff line
## 0.23.1
Issues: inject/backend#415

Add more links between definition objects and learning activities.

### objectives.yml

- added field `tools` to learning activities
- added field `injects` to learning activities
- added field `addresses` to learning activities
- added field `questionnaires` to learning activities


## 0.23.0
Issues: inject/backend#417

+8 −0
Original line number Diff line number Diff line
@@ -178,6 +178,14 @@ Each learning objective has the following fields:
    - **tags**: _list of strings, default=empty_ - a list of tags corresponding to this activity
    - **milestones**: _list of strings, default=empty_ - list of milestones related to this activity,
      a milestone can only be linked to _one_ activity
    - **tools**: _list of strings, default=empty_ - list of tools related to this activity,
      a tools can only be linked to _one_ activity
    - **injects**: _list of strings, default=empty_ - list of injects related to this activity,
      an inject can only be linked to _one_ activity
    - **addresses**: _list of strings, default=empty_ - list of addresses related to this activity,
      an address can only be linked to _one_ activity
    - **questionnaires**: _list of strings, default=empty_ - list of questionnaires related to this activity,
      a questionnaire can only be linked to _one_ activity

### channels.yml

+1 −1
Original line number Diff line number Diff line
exercise_duration: 60
show_exercise_time: False
version: 0.23.0
version: 0.23.1
description: Some description about this definition.
instructor_notes: { content: Some notes about this definition }
target_audience: Some description of target audience
+4 −0
Original line number Diff line number Diff line
@@ -7,11 +7,14 @@
      description: Some description about this activity.
      tags: [ analyze, prioritize ]
      milestones: [ website_visited ]
      tools: [ browser, contacts ]

    - name: Download file and block website
      description: Some description about this activity.
      tags: [ download, block ]
      milestones: [ website_traffic_blocked, file_downloaded ]
      injects: [ Auto timed inject depends on website_traffic_blocked milestone, Conditional delayed inject ]
      tools: [ block_traffic ]

- name: Answer questionnaire
  tags: [ answer ]
@@ -21,3 +24,4 @@
    - name: Answer the sent questionnaire
      tags: [ answer ]
      milestones: [ questionnaire_answered, likes_apples ]
      questionnaires: [ intro_questionnaire ]
Loading