diff --git a/.courseignore b/.courseignore index 42061c0..bb9a83f 100644 --- a/.courseignore +++ b/.courseignore @@ -1 +1,2 @@ -README.md \ No newline at end of file +README.md +/.run diff --git a/README.md b/README.md index 24ed60a..16140c7 100644 --- a/README.md +++ b/README.md @@ -155,6 +155,7 @@ It provides the list of files or directories that will be ignored in the final c ```text README.md +/.run ``` You can find more information about the course preview in the [Course preview][ref:course.preview] section. Information diff --git a/common/src/main/resources/images/files-order.gif b/common/src/main/resources/images/files-order.gif new file mode 100644 index 0000000..b19689e Binary files /dev/null and b/common/src/main/resources/images/files-order.gif differ diff --git a/courseSection/courseLesson/lesson-info.yaml b/courseSection/courseLesson/lesson-info.yaml index dbafe8e..7a40575 100644 --- a/courseSection/courseLesson/lesson-info.yaml +++ b/courseSection/courseLesson/lesson-info.yaml @@ -3,3 +3,4 @@ content: - theoryTask - quizTask - programmingTask + - multiFileTask diff --git a/courseSection/courseLesson/multiFileTask/src/Main.kt b/courseSection/courseLesson/multiFileTask/src/Main.kt new file mode 100644 index 0000000..e5bd56b --- /dev/null +++ b/courseSection/courseLesson/multiFileTask/src/Main.kt @@ -0,0 +1,3 @@ +fun main() { + helloWorld() +} diff --git a/courseSection/courseLesson/multiFileTask/src/MainTaskFile.kt b/courseSection/courseLesson/multiFileTask/src/MainTaskFile.kt new file mode 100644 index 0000000..aef3b3b --- /dev/null +++ b/courseSection/courseLesson/multiFileTask/src/MainTaskFile.kt @@ -0,0 +1 @@ +fun helloWorld(): Unit = println("Hello, world!") \ No newline at end of file diff --git a/courseSection/courseLesson/multiFileTask/task-info.yaml b/courseSection/courseLesson/multiFileTask/task-info.yaml new file mode 100644 index 0000000..dc6bc59 --- /dev/null +++ b/courseSection/courseLesson/multiFileTask/task-info.yaml @@ -0,0 +1,18 @@ +type: output +files: + - name: src/MainTaskFile.kt + visible: true + placeholders: + - offset: 25 + length: 24 + placeholder_text: TODO("Not implemented yet") + - name: src/Main.kt + visible: true + placeholders: + - offset: 17 + length: 12 + placeholder_text: // invoke the implemented functions here + - name: test/output.txt + visible: false + - name: test/input.txt + visible: false diff --git a/courseSection/courseLesson/multiFileTask/task.md b/courseSection/courseLesson/multiFileTask/task.md new file mode 100644 index 0000000..f427fbe --- /dev/null +++ b/courseSection/courseLesson/multiFileTask/task.md @@ -0,0 +1,8 @@ +This is an example of an input/output task. +In this type of task, you can give an expected input and output to the program instead of implementing +your own tests. + +This task also demonstrates how you can set up which file should be opened in the student mode if the task has several files. +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: + +![Expected behaviour](../../../common/src/main/resources/images/files-order.gif) diff --git a/courseSection/courseLesson/multiFileTask/test/input.txt b/courseSection/courseLesson/multiFileTask/test/input.txt new file mode 100644 index 0000000..e69de29 diff --git a/courseSection/courseLesson/multiFileTask/test/output.txt b/courseSection/courseLesson/multiFileTask/test/output.txt new file mode 100644 index 0000000..af5626b --- /dev/null +++ b/courseSection/courseLesson/multiFileTask/test/output.txt @@ -0,0 +1 @@ +Hello, world!