Skip to content

Commit

Permalink
Add forms example
Browse files Browse the repository at this point in the history
  • Loading branch information
isuruf committed Oct 19, 2019
1 parent da10522 commit 783ba51
Show file tree
Hide file tree
Showing 2 changed files with 101 additions and 0 deletions.
47 changes: 47 additions & 0 deletions flows/instant_flow.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
title: "{{ title }}"

description: |
# RELATE Instant Flow

rules:
start:
-
if_before: end_of_class
if_has_role: [student, ta, instructor]
if_has_fewer_sessions_than: 1
may_start_new_session: True
may_list_existing_sessions: True

-
may_start_new_session: False
may_list_existing_sessions: True

access:
-
permissions: [view, submit_answer, end_session, see_correctness, see_answer_after_submission]

grade_identifier: instant_quiz_{{ id }}
grade_aggregation_strategy: use_latest

grading:
-
if_completed_before: "{{ created_time }} + {{ duration }} minutes"
credit_percent: 100

-
credit_percent: 0

pages:
-
type: ChoiceQuestion
id: instant_{{ id }}
title: {{ title }}
shuffle: True
prompt: |

{{ description }}

choices:
- ~CORRECT~ {{ choice1 }}
- {{ choice2 }}
- {{ choice3 }}
54 changes: 54 additions & 0 deletions forms/instant.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
title: "Create an instant flow with one multiple choice question"

description: |
Instructions on filling out this form
type: flow

access_roles: [ta, instructor]

fields:
- id: title
type: Text
value: "InClass quiz"
label: "Title"

- id: description
type: Text
value: ""
label: "Question"

- id: duration
type: Integer
value: 20
label: "Duration in minutes for the flow"

- id: choice1
type: Text
value: "(a)"
label: "Correct choice"

- id: choice2
type: Text
value: "(b)"
label: "Incorrect choice"

- id: choice3
type: Text
value: "(c)"
label: "Incorrect choice"

- id: template_in
type: Hidden
value: "flows/instant_flow.jinja"

- id: template_out
type: Hidden
value: "flows/instant_flow.yml"

- id: announce
type: Choice
choices:
- ~DEFAULT~ True
- False
label: "Announce to the class"

0 comments on commit 783ba51

Please sign in to comment.