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

Add forms example #12

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: [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"