Skip to content

Commit f3e9d31

Browse files
committed
Add forms example
1 parent da10522 commit f3e9d31

File tree

2 files changed

+101
-0
lines changed

2 files changed

+101
-0
lines changed

flows/instant_flow.jinja

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
title: "{{ title }}"
2+
3+
description: |
4+
# RELATE Instant Flow
5+
6+
rules:
7+
start:
8+
-
9+
if_before: end_of_class
10+
if_has_role: [student, ta, instructor]
11+
if_has_fewer_sessions_than: 1
12+
may_start_new_session: True
13+
may_list_existing_sessions: True
14+
15+
-
16+
may_start_new_session: False
17+
may_list_existing_sessions: True
18+
19+
access:
20+
-
21+
permissions: [view, submit_answer, end_session, see_correctness, see_answer_after_submission]
22+
23+
grade_identifier: instant_quiz_{{ id }}
24+
grade_aggregation_strategy: use_latest
25+
26+
grading:
27+
-
28+
if_completed_before: "{{ created_time }} + {{ duration }} minutes"
29+
credit_percent: 100
30+
31+
-
32+
credit_percent: 0
33+
34+
pages:
35+
-
36+
type: ChoiceQuestion
37+
id: instant_{{ id }}
38+
title: {{ title }}
39+
shuffle: True
40+
prompt: |
41+
42+
{{ description }}
43+
44+
choices:
45+
- ~CORRECT~ {{ choice1 }}
46+
- {{ choice2 }}
47+
- {{ choice3 }}

forms/instant.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
title: "Create an instant flow with one multiple choice question"
2+
3+
description: |
4+
Instructions on filling out this form
5+
type: flow
6+
7+
access_roles: [instructor]
8+
9+
fields:
10+
- id: title
11+
type: Text
12+
value: "InClass quiz"
13+
label: "Title"
14+
15+
- id: description
16+
type: Text
17+
value: ""
18+
label: "Question"
19+
20+
- id: duration
21+
type: Integer
22+
value: 20
23+
label: "Duration in minutes for the flow"
24+
25+
- id: choice1
26+
type: Text
27+
value: "(a)"
28+
label: "Correct choice"
29+
30+
- id: choice2
31+
type: Text
32+
value: "(b)"
33+
label: "Incorrect choice"
34+
35+
- id: choice3
36+
type: Text
37+
value: "(c)"
38+
label: "Incorrect choice"
39+
40+
- id: template_in
41+
type: Hidden
42+
value: "flows/instant_flow.jinja"
43+
44+
- id: template_out
45+
type: Hidden
46+
value: "flows/instant_flow.yml"
47+
48+
- id: announce
49+
type: Choice
50+
choices:
51+
- ~DEFAULT~ True
52+
- False
53+
label: "Announce to the class"
54+

0 commit comments

Comments
 (0)