Teaching Kotlin with EduTools plugin
With EduTools plugin you can learn and teach Kotlin through code practicing tasks. It is available both in Android Studio and IntelliJ IDEA. This tutorial describes course creation for an educator. If you want to use EduTools plugin for learning, read "Learning Kotlin with EduTools plugin".
Installing EduTools plugin
Go to Preferences -> Plugins (or Configure -> Plugins from the Welcome Screen), press Install JetBrains Plugin… and search for EduTools plugin:
When installed for the first time, EduTools plugin asks if you're a Learner or an Educator. Please choose Educator to enable course creation functionality:
If you need to enable the course creation functionality later, you can go to Help Menu -> Enable Course Creator Features.
Creating a course
To create a course, go to Create New Course from the Welcome Screen or in the File Menu, fill in the title, author and description:
Every Kotlin course created with EduTools is structured as a list of lessons. Each lesson contains tasks. A task has the following components: a description, a
Task.kt file with exercise code, a
Tests.kt file with the task check, and any other files needed for the learner to complete the task.
Go to View -> Tool Windows -> Project to look at the course structure:
Add more lessons and tasks via the File Menu -> New, drag-n-drop items to reorder them, or to rename items right-click them then in the menu use Refactor -> Rename:
If you need additional files for the task, just add them and decide whether you want to make them visible to learners or not with the Course Creator -> Make Visible to / Hide from Student.
Working with tasks
Task.kt file to write the code you want for the exercise:
Once the code is ready, select a fragment you want a learner to fill in, invoke Add Answer Placeholder command from the right-click menu and add the placeholder text and some hints to help the learner find the right solution:
If you want to see how your task will be look to the learner, right-click the
Task.kt file in the Project tool window, and choose Course Creator -> Show Preview:
Now it's time to add the task description. Click the Edit icon at the top of Task Description panel to switch to the editing mode:
EduTools supports HTML and Markdown, so you can start editing with your preferred format, or even a combination of both.
You can write your custom tests using EduTools testing framework to automatically verify the learner's solution. Every task has a
Tests.kt file already filled in with a test template that you will need to modify:
testSolution() function content with the following:
To check that your code passes your own test click the Check icon at the top of Task Description panel. If your code and test are correct, you will see the "Congratulations!" text:
When you have finished creating your course, it's a good idea to view your course from a learner's perspective and test it. Right-click on the course view and go to Course Creator -> Create Course Preview to open your course in learner mode:
So you can solve tasks:
And verify them:
You can share your learning materials publicly or privately with your students or co-workers on Stepik, a learning management and MOOC platform. Or you can save your course as an archive file.
To save your course as a zip file, go to Course Creator -> Generate Course Archive action. The generated archive can be opened via the Browse Courses available from the Welcome Screen and in the File Menu with the Import Course icon: