Educational Products 2019.2 Help

Educator Start Guide

With Educational Products, you can learn programming languages in the form of coding tasks and get instant feedback right inside of IDEs based on JetBrains IntelliJ Platform.

Educational Products support Java, Kotlin, Python, JavaScript, Rust, and Scala, with more to come.

Choose your programming language

This tutorial will walk you through creating a simple JavaKotlinPythonScala course with a set of programming tasks and integrated tests. You can switch to a different programming language using the Section drop-down menu at the top of the page:

Choose a language
Choose a language
Choose a language
Choose a language
Choose a language
Choose a language

Prerequisites

You can create a Java course in IntelliJ IDEA with EduTools plugin installed.

Download IntelliJ IDEA Community with EduTools plugin , or Install EduTools Plugin if you have already installed IntelliJ IDEA Community or Ultimate.

Prerequisites

You can create a Kotlin course in IntelliJ IDEA or Android Studio with EduTools plugin installed.

Prerequisites

You can create a Python course in PyCharm Educational Edition.

Download PyCharm Educational , or Install EduTools Plugin if you have already installed PyCharm Community or Professional.

Prerequisites

You can create a Java course in WebStorm with EduTools plugin installed.

Download WebStorm and Install EduTools plugin if you have already installed IntelliJ IDEA Community or Ultimate.

Prerequisites

You can create a Java course in CLion with EduTools plugin installed.

Download IntelliJ IDEA Community with EduTools plugin , or Install EduTools Plugin if you have already installed IntelliJ IDEA Community or Ultimate.

Start teaching

Creating a course

  1. When installed for the first time, the IDE asks if you're a Learner or an Educator. Choose Educator to enable course creation functionality:

    edu choose role educator
  2. To create a new course, go to Create New Course from the Welcome Screen or in the File Menu, fill in the title, author and description:

    edu new course java
    edu new course kotlin
    edu new course python
    edu new course js
    edu new course rust
    edu new course scala
  3. Every course created with your IDE is structured as a list of lessons. Each lesson contains tasks.

    A task has the following components:

    • a task.html description file,

    • a Task.java Task.kt task.py Task.scala lib.rs task.js file with exercise code,

    • Test.java Tests.kt test_task.py Test.scala tests.rs test.js file with the task check,

    • any other files needed for the learner to complete the task.

    Go to View | Tool Windows | Project or invoke Alt+1 to look at the course structure:

    edu course structure java
    edu course structure kotlin
    edu course structure python
    edu course structure scala
    edu course structure rust
    edu course structure js
  4. Add more lessons, tasks, or group lessons into sections via the File Menu | New, drag-n-drop items to reorder them.

    To rename items right-click them then in the menu use Refactor | Rename or invoke Shift+F6:

    edu rename task java
    edu rename task kotlin
    edu rename task python
    edu rename task scala
    edu rename task rust
    edu rename task js

Working with tasks

  1. Open Task.java Task.kt task.py Task.scala lib.rs task.js file to write the code you want for the exercise, for example:

    class HelloJava { public static void main(String[] args) { System.out.println(sayHello()); } private static String sayHello(){ return "Hello, Java!"; } }
    fun hello(): String = "Hello, Kotlin!" fun main(args: Array<String>) { println(hello()) }
    def test_sum(a, b): return a + b print("Sum is", test_sum(1, 2))
    object Task extends App { def hello() = { "Hello, Scala!" } println(hello()) }
    pub fn hello_world() -> String { String::from("Hello, World!") }
    function sum(a, b) { return a + b; }
    edu task code java
    edu task code kotlin
    edu task code python
    edu task code scala
    edu task code rust
    edu task code js
  2. Choose the execute Run option from the context menu or press Shift+F10 to run your code and check if it works as expected:

    edu run task java
    edu run task kotlin
    edu run task python
    edu run task scala
    edu run task js
  3. Once the code is ready, select a fragment you want a learner to fill in, invoke Add Answer Placeholder command from the context menu and add the placeholder text and some hints to help the learner find the right solution:

    edu answer placeholder java
    edu answer placeholder kotlin
    edu answer placeholder python
    edu answer placeholder scala
    edu answer placeholder rust
    edu answer placeholder js
  4. If you want to see how your task will be look to the learner, right-click the Task.java Task.kt task.py Task.scala lib.rs file in the Project tool window, and choose Course Creator | Preview Task File:

    edu task preview java
    edu task preview kotlin
    edu task preview python
    edu task preview scala
    edu task preview rust
    edu task preview js
  5. Now it's time to add the task description. Click the Edit icon edit at the top of the Task Description panel, or just open task.html file. Preview all the changes on the Task Description panel while editing.

    edu task description java
    edu task description kotlin
    edu task description python
    edu task description scala
    edu task description rust
    edu task description js

Writing tests

  1. You can write your custom tests to automatically verify the learner's solution. Every task has a Test.java Tests.kt test_task.py Test.scala tests.rs test.js file that you will need to modify:

    edu test file java
    edu test file kotlin
    edu test file python
    edu test file scala
    edu test file rust
    edu test file js
  2. Let's replace the test file content with the following:

    import org.junit.Test; import static org.junit.Assert.*; public class HelloJavaTest { @Test public void testSolution() { assertEquals("You should say hello to Java", "Hello, Java!", HelloJava.sayHello()); } }
    import org.junit.Assert import org.junit.Test class Test { @Test fun testSolution() { Assert.assertEquals( "You should say hello to Kotlin", "Hello, Kotlin!", hello()) } }
    import unittest from ..task import test_sum class TestCase(unittest.TestCase): def test(self): self.assertEqual(3, test_sum(1, 2), msg="1 + 2 = 3")
    import org.junit.runner.RunWith import org.scalatest.junit.JUnitRunner import org.scalatest.FunSuite @RunWith(classOf[JUnitRunner]) class TaskTest extends FunSuite { test("Task.hello") { assert(Task.hello === "Hello, Scala!") } }
    use task1::hello_world; #[test] fn test() { assert_eq!("Hello, World!", hello_world()); }
    test('adds 1 + 2 to equal 3', () => { import_task_file("task.js"); expect(sum(1, 2)).toBe(3); }); }
  3. To check that your code passes your own tests go back to Task.java Task.kt task.py Task.scala lib.rs task.js and click the Check button at the bottom of the Task Description panel. If your code and test are correct, you will see the Correct message:

    edu run test java
    edu test code java
    edu run test kotlin
    edu test code kotlin
    edu run test python
    edu test code python
    edu run test scala
    edu test code scala
    edu test code rust
    edu run test js

Course preview

  1. 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 the course view and go to Course Creator | Create Course Preview to open your course in learner mode:

    edu course preview java
    edu course preview kotlin
    edu course preview python
    edu course preview scala
    edu course preview rust
    edu course preview js
  2. So you can verify the course structure:

    edu course preview java 1
    edu course preview kotlin 1
    edu course preview python 1
    edu course preview scala 1
    edu course preview rust 1
    edu course preview js 1
  3. Solve tasks with the Check button and verify the wrong answer feedback:

    edu course preview java 2
    edu course preview kotlin 2
    edu course preview python 2
    edu course preview scala 2
    edu course preview rust 2
    edu course preview js 2
  4. Check your hints with the links available below the task description:

    edu course preview java 3
  5. Check your hints with the links available below the task description:

    edu course preview kotlin 3
  6. Check your hints with the links available below the task description:

    edu course preview python 3
  7. Check your hints with the links available below the task description:

    edu course preview scala 3
  8. Compare the solution with the suggestions and verify the suggested solution

    edu course preview js 3
  9. Compare the solution with the suggestions and verify the suggested solution

    edu course preview rust 3
  10. Check the right answer feedback:

    edu course preview java 4
    edu course preview java 5
    edu course preview kotlin 4
    edu course preview kotlin 5
    edu course preview python 4
    edu course preview python 5
    edu course preview scala 4
    edu course preview scala 5
    edu course preview rust 4
    edu course preview js 4

Course sharing

  1. 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.

  2. 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:

    edu import course java
    edu course imported java
    edu import course kotlin
    edu course imported kotlin
    edu import course python
    edu course imported python
    edu import course scala
    edu course imported scala
    edu import course rust
    edu course imported rust
    edu import course javascript
    edu course imported javascript
  3. If you have an account on Stepik, you can easily upload your course there, update it anytime you need, and share publicly or privately.

Last modified: 18 September 2019