Skip to content

Commit 84607eb

Browse files
committed
Add an example about files order
1 parent d54951a commit 84607eb

File tree

10 files changed

+35
-1
lines changed

10 files changed

+35
-1
lines changed

.courseignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
README.md
1+
README.md
2+
/.run

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,7 @@ It provides the list of files or directories that will be ignored in the final c
155155
156156
```text
157157
README.md
158+
/.run
158159
```
159160

160161
You can find more information about the course preview in the [Course preview][ref:course.preview] section. Information
593 KB
Loading

courseSection/courseLesson/lesson-info.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ content:
33
- theoryTask
44
- quizTask
55
- programmingTask
6+
- multiFileTask
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fun main() {
2+
helloWorld()
3+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
fun helloWorld(): Unit = println("Hello, world!")
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
type: output
2+
files:
3+
- name: src/MainTaskFile.kt
4+
visible: true
5+
placeholders:
6+
- offset: 25
7+
length: 24
8+
placeholder_text: TODO("Not implemented yet")
9+
- name: src/Main.kt
10+
visible: true
11+
placeholders:
12+
- offset: 17
13+
length: 12
14+
placeholder_text: // invoke the implemented functions here
15+
- name: test/output.txt
16+
visible: false
17+
- name: test/input.txt
18+
visible: false
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
This is an example of an input/output task.
2+
In this type of task, you can give an expected input and output to the program instead of implementing
3+
your own tests.
4+
5+
This task also demonstrates how you can set up which file should be opened in the student mode if the task has several files.
6+
You just need to put this file as the first file in the `task-info.yaml` config, e.g. in this task the `MainTaskFile.kt` will be opened:
7+
8+
![Expected behaviour](../../../common/src/main/resources/images/files-order.gif)

courseSection/courseLesson/multiFileTask/test/input.txt

Whitespace-only changes.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Hello, world!

0 commit comments

Comments
 (0)