-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Loading status checks…
Changes in EduTutorialNew for the documentation site
1 parent
5b37bb6
commit 56eec16
Showing
33 changed files
with
912 additions
and
40 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
packages/samples/EduTutorialNew/lesson3-defs/edu-flow-table.edit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* This file contains the rules-as-tables editor definition. */ | ||
|
||
editor rules_as_table | ||
|
||
FlowRule {[ | ||
------------------------------------- | ||
Name: ${name} | ||
Description: ${self.description} | ||
For page ${page} | ||
|
||
${self.transitions table rows} | ||
]} | ||
|
||
PageTransition { table [ | ||
Condition | Goto Page | ||
${self.condition} | ${self.toPage} | ||
]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
language Education | ||
|
||
modelunit Flow { | ||
reference subject: Subject; | ||
rules: FlowRule[]; | ||
} | ||
|
||
concept FlowRule { | ||
name: identifier; | ||
description: string; | ||
reference page: Page; | ||
transitions: PageTransition[]; | ||
} | ||
|
||
concept PageTransition { /* E.g. Grade A => show pageA, Grade F => show pageC */ | ||
condition: Grade; | ||
reference toPage: Page; | ||
} | ||
|
||
limited Grade { | ||
gradeA; | ||
gradeB; | ||
gradeC; | ||
gradeD; | ||
gradeE; | ||
gradeF; | ||
} |
22 changes: 22 additions & 0 deletions
22
packages/samples/EduTutorialNew/lesson3-defs/edu-flow.edit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* This file contains the default editor definition. */ | ||
|
||
editor default | ||
|
||
Flow {[ | ||
Flow ${self.name} for subject ${self.subject} | ||
|
||
${self.rules vertical} | ||
]} | ||
|
||
FlowRule {[ | ||
------------------------------------- | ||
Name: ${self.name} | ||
Description: ${self.description} | ||
From page ${self.page} | ||
|
||
${self.transitions} | ||
]} | ||
|
||
PageTransition {[ | ||
when ${self.condition} goto page ${self.toPage} | ||
]} |
17 changes: 17 additions & 0 deletions
17
packages/samples/EduTutorialNew/lesson3-defs/edu-subjects.ast
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
language Education | ||
|
||
model Education /* Computer Aided Learning */ { | ||
name: identifier; | ||
topic: Topic[]; | ||
flow: Flow[]; | ||
tests: Test[]; | ||
overviews: Subject[]; | ||
} | ||
|
||
modelunit Subject { | ||
name: identifier; | ||
description: string; /* e.g. Mathematics, fractions for students age 10 */ | ||
reference topics: Topic[]; | ||
reference flows: Flow[]; | ||
reference tests: Test[]; | ||
} |
15 changes: 15 additions & 0 deletions
15
packages/samples/EduTutorialNew/lesson3-defs/edu-subjects.edit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* This file contains the default editor definition. */ | ||
|
||
editor default | ||
|
||
Subject {[ | ||
Subject Overview | ||
|
||
Name: ${self.name} | ||
|
||
Description: ${self.description} | ||
|
||
Topics: ${self.topics} | ||
|
||
Flows: ${self.flows} | ||
]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
language Education | ||
|
||
modelunit Test { | ||
name: identifier; | ||
} |
56 changes: 56 additions & 0 deletions
56
packages/samples/EduTutorialNew/lesson3-defs/edu-topics.ast
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
language Education | ||
|
||
modelunit Topic { | ||
name: identifier; | ||
reference subject: Subject; | ||
description: string; | ||
pages: Page[]; | ||
} | ||
|
||
abstract concept Page { | ||
name: identifier; | ||
questions: Question[]; | ||
} | ||
|
||
concept Theory base Page { | ||
/* For the sake of the example this is simplified. | ||
Should be formatted text including pictures, etc. */ | ||
content: Line[]; | ||
} | ||
|
||
concept Line { // todo use MultiLine Component | ||
content: string; | ||
} | ||
|
||
concept Video base Page { | ||
url: string; | ||
} | ||
|
||
concept WorkSheet base Page { | ||
} | ||
|
||
concept ExamplePage base Page { | ||
content: Line[]; | ||
} | ||
|
||
concept InDepthMaterial base Page { | ||
content: Line[]; | ||
} | ||
|
||
concept Question { | ||
name: identifier; | ||
content: string; | ||
correctAnswer: NumberConcept; | ||
} | ||
|
||
abstract concept NumberConcept { | ||
} | ||
|
||
concept SimpleNumber base NumberConcept { | ||
value: number; | ||
} | ||
|
||
concept Fraction base NumberConcept { | ||
numerator: number; | ||
denominator: number; | ||
} |
80 changes: 80 additions & 0 deletions
80
packages/samples/EduTutorialNew/lesson3-defs/edu-topics.edit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
/* This file contains the default editor definition. */ | ||
|
||
editor default | ||
|
||
Topic {[ | ||
Subject: ${self.subject} | ||
Topic: ${self.name} | ||
Topic description: ${self.description} | ||
|
||
Pages: | ||
${self.pages vertical } | ||
]} | ||
|
||
Page {[ | ||
${self.name} | ||
]} | ||
|
||
Theory {[ | ||
---------------------------------------------------- | ||
Theory [=>Page] | ||
${self.content vertical terminator[== END OF LINE]} | ||
|
||
[=>Page:footing] | ||
]} | ||
|
||
Video {[ | ||
---------------------------------------------------- | ||
Video [=>Page] | ||
Maybe this video will help you understand. | ||
${self.url} | ||
|
||
[=>Page:footing] | ||
]} | ||
|
||
WorkSheet {[ | ||
---------------------------------------------------- | ||
Worksheet [=>Page] | ||
See if you can answer the following questions. | ||
|
||
[=>Page:footing] | ||
]} | ||
|
||
ExamplePage {[ | ||
---------------------------------------------------- | ||
Example [=>Page] | ||
${self.content} | ||
|
||
Now, please, answer the following questions. | ||
|
||
[=>Page:footing] | ||
]} | ||
|
||
InDepthMaterial {[ | ||
---------------------------------------------------- | ||
InDepthMaterial [=>Page] | ||
${self.content} | ||
|
||
Test your understanding by answering the following questions. | ||
|
||
[=>Page:footing] | ||
]} | ||
|
||
Question {[ | ||
${self.name} | ||
${self.content} | ||
Correct Answer: ${self.correctAnswer} | ||
]} | ||
|
||
Line { | ||
[${self.content}] | ||
} | ||
|
||
SimpleNumber { | ||
[${self.value}] | ||
} | ||
|
||
Fraction { | ||
[${numerator} / ${denominator}] | ||
trigger = "/" | ||
} |
8 changes: 8 additions & 0 deletions
8
packages/samples/EduTutorialNew/lesson3-defs/page-footing.edit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
/* This file contains the footing editor definition. */ | ||
|
||
editor footing | ||
|
||
Page {[ | ||
Questions: | ||
${self.questions vertical terminator [END]} | ||
]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
packages/samples/EduTutorialNew/lesson5-defs/edu-flow-table.edit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* This file contains the rules-as-tables editor definition. */ | ||
|
||
editor rules_as_table | ||
|
||
FlowRule {[ | ||
------------------------------------- | ||
Name: ${name} | ||
Description: ${self.description} | ||
For page ${page} | ||
|
||
${self.transitions table rows} | ||
]} | ||
|
||
PageTransition { table [ | ||
Condition | Goto Page | ||
${self.condition} | ${self.toPage} | ||
]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
language Education | ||
|
||
modelunit Flow { | ||
reference subject: Subject; | ||
rules: FlowRule[]; | ||
} | ||
|
||
concept FlowRule { | ||
name: identifier; | ||
description: string; | ||
reference page: Page; | ||
transitions: PageTransition[]; | ||
} | ||
|
||
concept PageTransition { /* E.g. Grade A => show pageA, Grade F => show pageC */ | ||
condition: Grade; /* Note: will be changed into an expression later in the tutorial. */ | ||
reference toPage: Page; | ||
} | ||
|
||
limited Grade { | ||
gradeA; | ||
gradeB; | ||
gradeC; | ||
gradeD; | ||
gradeE; | ||
gradeF; | ||
} |
22 changes: 22 additions & 0 deletions
22
packages/samples/EduTutorialNew/lesson5-defs/edu-flow.edit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* This file contains the default editor definition. */ | ||
|
||
editor default | ||
|
||
Flow {[ | ||
Flow ${self.name} for subject ${self.subject} | ||
|
||
${self.rules vertical} | ||
]} | ||
|
||
FlowRule {[ | ||
------------------------------------- | ||
Name: ${self.name} | ||
Description: ${self.description} | ||
From page ${self.page} | ||
|
||
${self.transitions} | ||
]} | ||
|
||
PageTransition {[ | ||
when ${self.condition} goto page ${self.toPage} | ||
]} |
70 changes: 70 additions & 0 deletions
70
packages/samples/EduTutorialNew/lesson5-defs/edu-scoring.ast
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
language Education | ||
|
||
concept GradeScore { | ||
grade: Grade; | ||
expr: ScoreExpression; | ||
} | ||
|
||
/////////////////////////////////// | ||
/// Expressions | ||
////////////////////////////////// | ||
abstract expression ScoreExpression { | ||
} | ||
|
||
/* The value of a question reference is the answer given to the | ||
given question */ | ||
expression QuestionReference base ScoreExpression { | ||
reference question: Question; | ||
} | ||
|
||
/* The value of NrOfCorrectAnswers is the total number of correct | ||
answers on a page. */ | ||
expression NrOfCorrectAnswers base ScoreExpression { | ||
} | ||
|
||
/* The value of a NumberLiteralExpression is simply a number, like '24' */ | ||
expression NumberLiteralExpression base ScoreExpression { | ||
value: number; | ||
} | ||
|
||
/////////////////////////////////// | ||
/// Boolean AND and OR | ||
////////////////////////////////// | ||
abstract binary expression BinaryExpression base ScoreExpression { | ||
left: ScoreExpression; | ||
right: ScoreExpression; | ||
} | ||
|
||
binary expression AndExpression base BinaryExpression { | ||
priority = 1; | ||
} | ||
|
||
binary expression OrExpression base BinaryExpression { | ||
priority = 1; | ||
} | ||
|
||
/////////////////////////////////// | ||
/// Comparisons: <=, >=, >, <, === | ||
////////////////////////////////// | ||
abstract binary expression ComparisonExpression base BinaryExpression { | ||
} | ||
|
||
binary expression LessOrEqualsExpression base ComparisonExpression { | ||
priority = 2; | ||
} | ||
|
||
binary expression GreaterOrEqualsExpression base ComparisonExpression { | ||
priority = 2; | ||
} | ||
|
||
binary expression LessThenExpression base ComparisonExpression { | ||
priority = 2; | ||
} | ||
|
||
binary expression GreaterThenExpression base ComparisonExpression { | ||
priority = 2; | ||
} | ||
|
||
binary expression EqualsExpression base ComparisonExpression { | ||
priority = 2; | ||
} |
54 changes: 54 additions & 0 deletions
54
packages/samples/EduTutorialNew/lesson5-defs/edu-scoring.edit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
editor default | ||
|
||
GradeScore {[ | ||
${self.grade} : ${self.expr} | ||
]} | ||
|
||
/////////////////////////////////// | ||
/// Expressions | ||
////////////////////////////////// | ||
|
||
QuestionReference { | ||
[ Answer to ${self.question} is correct ] | ||
trigger = "question" | ||
referenceShortcut = ${self.question} | ||
} | ||
|
||
NrOfCorrectAnswers { | ||
[Number Of Correct Answers] | ||
} | ||
|
||
NumberLiteralExpression { | ||
[${value}] | ||
} | ||
|
||
/////////////////////////////////// | ||
/// Boolean AND and OR | ||
////////////////////////////////// | ||
|
||
OrExpression { | ||
symbol = "or" | ||
} | ||
AndExpression { | ||
symbol = "and" | ||
} | ||
|
||
/////////////////////////////////// | ||
/// Comparisons: <=, >=, >, <, === | ||
////////////////////////////////// | ||
|
||
LessOrEqualsExpression { | ||
symbol = "<=" | ||
} | ||
GreaterOrEqualsExpression { | ||
symbol = ">=" | ||
} | ||
LessThenExpression { | ||
symbol = "<" | ||
} | ||
GreaterThenExpression { | ||
symbol = ">" | ||
} | ||
EqualsExpression { | ||
symbol = "==" | ||
} |
17 changes: 17 additions & 0 deletions
17
packages/samples/EduTutorialNew/lesson5-defs/edu-subjects.ast
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
language Education | ||
|
||
model Education /* Computer Aided Learning */ { | ||
name: identifier; | ||
topic: Topic[]; | ||
flow: Flow[]; | ||
tests: Test[]; | ||
overviews: Subject[]; | ||
} | ||
|
||
modelunit Subject { | ||
name: identifier; | ||
description: string; /* e.g. Mathematics, fractions for students age 10 */ | ||
reference topics: Topic[]; | ||
reference flows: Flow[]; | ||
reference tests: Test[]; | ||
} |
15 changes: 15 additions & 0 deletions
15
packages/samples/EduTutorialNew/lesson5-defs/edu-subjects.edit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
/* This file contains the default editor definition. */ | ||
|
||
editor default | ||
|
||
Subject {[ | ||
Subject Overview | ||
|
||
Name: ${self.name} | ||
|
||
Description: ${self.description} | ||
|
||
Topics: ${self.topics} | ||
|
||
Flows: ${self.flows} | ||
]} |
57 changes: 57 additions & 0 deletions
57
packages/samples/EduTutorialNew/lesson5-defs/edu-topics.ast
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
language Education | ||
|
||
modelunit Topic { | ||
name: identifier; | ||
reference subject: Subject; | ||
description: string; | ||
pages: Page[]; | ||
} | ||
|
||
abstract concept Page { | ||
name: identifier; | ||
questions: Question[]; | ||
grading: GradeScore[]; /* concept from 'edu-scoring.ast' */ | ||
} | ||
|
||
concept Theory base Page { | ||
/* For the sake of the example this is simplified. | ||
Should be formatted text including pictures, etc. */ | ||
content: Line[]; | ||
} | ||
|
||
concept Line { // todo use MultiLine Component | ||
content: string; | ||
} | ||
|
||
concept Video base Page { | ||
url: string; | ||
} | ||
|
||
concept WorkSheet base Page { | ||
} | ||
|
||
concept ExamplePage base Page { | ||
content: Line[]; | ||
} | ||
|
||
concept InDepthMaterial base Page { | ||
content: Line[]; | ||
} | ||
|
||
concept Question { | ||
name: identifier; | ||
content: string; | ||
correctAnswer: NumberConcept; | ||
} | ||
|
||
abstract concept NumberConcept { | ||
} | ||
|
||
concept SimpleNumber base NumberConcept { | ||
value: number; | ||
} | ||
|
||
concept Fraction base NumberConcept { | ||
numerator: number; | ||
denominator: number; | ||
} |
80 changes: 80 additions & 0 deletions
80
packages/samples/EduTutorialNew/lesson5-defs/edu-topics.edit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
/* This file contains the default editor definition. */ | ||
|
||
editor default | ||
|
||
Topic {[ | ||
Subject: ${self.subject} | ||
Topic: ${self.name} | ||
Topic description: ${self.description} | ||
|
||
Pages: | ||
${self.pages vertical } | ||
]} | ||
|
||
Page {[ | ||
${self.name} | ||
]} | ||
|
||
Theory {[ | ||
---------------------------------------------------- | ||
Theory [=>Page] | ||
${self.content vertical} | ||
|
||
[=>Page:footing] | ||
]} | ||
|
||
Video {[ | ||
---------------------------------------------------- | ||
Video [=>Page] | ||
Maybe this video will help you understand. | ||
${self.url} | ||
|
||
[=>Page:footing] | ||
]} | ||
|
||
WorkSheet {[ | ||
---------------------------------------------------- | ||
Worksheet [=>Page] | ||
See if you can answer the following questions. | ||
|
||
[=>Page:footing] | ||
]} | ||
|
||
ExamplePage {[ | ||
---------------------------------------------------- | ||
Example [=>Page] | ||
${self.content} | ||
|
||
Now, please, answer the following questions. | ||
|
||
[=>Page:footing] | ||
]} | ||
|
||
InDepthMaterial {[ | ||
---------------------------------------------------- | ||
InDepthMaterial [=>Page] | ||
${self.content} | ||
|
||
Test your understanding by answering the following questions. | ||
|
||
[=>Page:footing] | ||
]} | ||
|
||
Question {[ | ||
${self.name} | ||
${self.content} | ||
Correct Answer: ${self.correctAnswer} | ||
]} | ||
|
||
Line { | ||
[${self.content}] | ||
} | ||
|
||
SimpleNumber { | ||
[${self.value}] | ||
} | ||
|
||
Fraction { | ||
[${numerator} / ${denominator}] | ||
trigger = "/" | ||
} |
11 changes: 11 additions & 0 deletions
11
packages/samples/EduTutorialNew/lesson5-defs/page-footing.edit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* This file contains the footing editor definition. */ | ||
|
||
editor footing | ||
|
||
Page {[ | ||
Questions: | ||
${self.questions vertical terminator [END]} | ||
|
||
Score | ||
${self.grading vertical} | ||
]} |
32 changes: 32 additions & 0 deletions
32
packages/samples/EduTutorialNew/lesson7-defs/edu-tests.ast
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
language Education | ||
|
||
modelunit Test { | ||
name: identifier; | ||
scenarios: Scenario[]; | ||
reference subject: Subject; | ||
reference flow: Flow; | ||
} | ||
|
||
concept Scenario { | ||
description: string; | ||
testFlow: TestFlow[]; | ||
steps: Step[]; /* Note that the order is of importance */ | ||
} | ||
concept TestFlow { | ||
steps: Step[]; /* Note that the order is of importance */ | ||
} | ||
concept Step { | ||
reference expectedPage: Page; | ||
answerSeries: Answer[]; | ||
} | ||
|
||
concept StartStep base Step { | ||
reference fromPage: Page; | ||
reference expectedPage: Page; | ||
answerSeries: Answer[]; | ||
} | ||
|
||
concept Answer { | ||
reference question: Question; | ||
value: NumberConcept; | ||
} |
File renamed without changes.
17 changes: 17 additions & 0 deletions
17
packages/samples/EduTutorialNew/src/defs/edu-flow-table.edit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* This file contains the rules-as-tables editor definition. */ | ||
|
||
editor rules_as_table | ||
|
||
FlowRule {[ | ||
------------------------------------- | ||
Name: ${name} | ||
Description: ${self.description} | ||
For page ${page} | ||
|
||
${self.transitions table rows} | ||
]} | ||
|
||
PageTransition { table [ | ||
Condition | Goto Page | ||
${self.condition} | ${self.toPage} | ||
]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
/* This file contains the default editor definition. */ | ||
|
||
editor default | ||
|
||
Flow {[ | ||
Flow ${self.name} for subject ${self.subject} | ||
|
||
${self.rules vertical} | ||
]} | ||
|
||
FlowRule {[ | ||
------------------------------------- | ||
Name: ${self.name} | ||
Description: ${self.description} | ||
From page ${self.page} | ||
|
||
${self.transitions} | ||
]} | ||
|
||
PageTransition {[ | ||
when ${self.condition} goto page ${self.toPage} | ||
]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
language Education | ||
|
||
concept GradeScore { | ||
grade: Grade; | ||
expr: ScoreExpression; | ||
} | ||
|
||
/////////////////////////////////// | ||
/// Expressions | ||
////////////////////////////////// | ||
abstract expression ScoreExpression { | ||
} | ||
|
||
/* The value of a question reference is the answer given to the | ||
given question */ | ||
expression QuestionReference base ScoreExpression { | ||
reference question: Question; | ||
} | ||
|
||
/* The value of NrOfCorrectAnswers is the total number of correct | ||
answers on a page. */ | ||
expression NrOfCorrectAnswers base ScoreExpression { | ||
} | ||
|
||
/* The value of a NumberLiteralExpression is simply a number, like '24' */ | ||
expression NumberLiteralExpression base ScoreExpression { | ||
value: number; | ||
} | ||
|
||
/////////////////////////////////// | ||
/// Boolean AND and OR | ||
////////////////////////////////// | ||
abstract binary expression BinaryExpression base ScoreExpression { | ||
left: ScoreExpression; | ||
right: ScoreExpression; | ||
} | ||
|
||
binary expression AndExpression base BinaryExpression { | ||
priority = 1; | ||
} | ||
|
||
binary expression OrExpression base BinaryExpression { | ||
priority = 1; | ||
} | ||
|
||
/////////////////////////////////// | ||
/// Comparisons: <=, >=, >, <, === | ||
////////////////////////////////// | ||
abstract binary expression ComparisonExpression base BinaryExpression { | ||
} | ||
|
||
binary expression LessOrEqualsExpression base ComparisonExpression { | ||
priority = 2; | ||
} | ||
|
||
binary expression GreaterOrEqualsExpression base ComparisonExpression { | ||
priority = 2; | ||
} | ||
|
||
binary expression LessThenExpression base ComparisonExpression { | ||
priority = 2; | ||
} | ||
|
||
binary expression GreaterThenExpression base ComparisonExpression { | ||
priority = 2; | ||
} | ||
|
||
binary expression EqualsExpression base ComparisonExpression { | ||
priority = 2; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
editor default | ||
|
||
GradeScore {[ | ||
${self.grade} : ${self.expr} | ||
]} | ||
|
||
/////////////////////////////////// | ||
/// Expressions | ||
////////////////////////////////// | ||
|
||
QuestionReference { | ||
[ Answer to ${self.question} is correct ] | ||
trigger = "question" | ||
referenceShortcut = ${self.question} | ||
} | ||
|
||
NrOfCorrectAnswers { | ||
[Number Of Correct Answers] | ||
} | ||
|
||
NumberLiteralExpression { | ||
[${value}] | ||
} | ||
|
||
/////////////////////////////////// | ||
/// Boolean AND and OR | ||
////////////////////////////////// | ||
|
||
OrExpression { | ||
symbol = "or" | ||
} | ||
AndExpression { | ||
symbol = "and" | ||
} | ||
|
||
/////////////////////////////////// | ||
/// Comparisons: <=, >=, >, <, === | ||
////////////////////////////////// | ||
|
||
LessOrEqualsExpression { | ||
symbol = "<=" | ||
} | ||
GreaterOrEqualsExpression { | ||
symbol = ">=" | ||
} | ||
LessThenExpression { | ||
symbol = "<" | ||
} | ||
GreaterThenExpression { | ||
symbol = ">" | ||
} | ||
EqualsExpression { | ||
symbol = "==" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
packages/samples/EduTutorialNew/src/defs/page-footing.edit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/* This file contains the footing editor definition. */ | ||
|
||
editor footing | ||
|
||
Page {[ | ||
Questions: | ||
${self.questions vertical terminator [END]} | ||
|
||
Score | ||
${self.grading vertical} | ||
]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters