Educational Products 2020.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, Scala, JavaScript, Rust, C++ and Go with more to come.

Choose your programming language

This tutorial will walk you through creating a simple JavaKotlin PythonScalaJavaScript RustC++Go 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
Choose a language
Choose a language

Prerequisites

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

Download IntelliJ IDEA Edu , 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.

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

Prerequisites

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

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

Prerequisites

You can create a JavaScript course in WebStorm, IntelliJ IDEA Ultimate and PyCharm Professional with EduTools plugin installed.

Download WebStorm, IntelliJ IDEA Ultimate or PyCharm Professional bundled with evaluation license key for a free 30-day trial , and Install EduTools plugin.

If you are a student or academic staff member, apply to our Educational Licenses Program to get access to all JetBrains desktop products, including WebStorm.

Prerequisites

You can create a Rust course in CLion with EduTools and Rust plugins installed.

Download CLionbundled with evaluation license key for a free 30-day trial , and Install EduTools Plugin. Alternatively, you can downloadIntelliJ IDEA Edu.

To learn how to install the Rust plugin, see this guide.

Prerequisites

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

Download CLionbundled with evaluation license key for a free 30-day trial , and Install EduTools Plugin.

If you are a student or academic staff member, apply to our Educational Licenses Program to get access to all JetBrains desktop products, including CLion.

Prerequisites

You can create a Go course in GoLand and IntelliJ IDEA Ultimate with EduTools plugin installed.

Download GoLand or IntelliJ IDEA Ultimatebundled with evaluation license key for a free 30-day trial , and Install EduTools Plugin.

If you are a student or academic staff member, apply to our Educational Licenses Program to get access to all JetBrains desktop products, including GoLand.

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 png
  2. 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 png
  3. 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 png
  4. 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 png
  5. 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 png
  6. To create a new course, go to Learn and Teach | Create New Course from the Welcome Screen or in the File Menu, fill in the title, author and description:

    edu new course java png
    edu new course kotlin png
    edu new course python png
    edu new course scala png
    edu new course js png
    edu new course rust png
    edu new course cpp png
    edu new course go png
  7. Every course created with your IDE is structured as a list of lessons. Each lesson contains tasks. There are 5 types of tasks:

    • Edu - a coding exercise validated by tests.

    • Output - a coding exercise validated by output.

    • Theory - theoretical learning material without validation.

    • Multiple-choice - single or multiple choice quiz.

    • IDE - a task that helps to learn IDE functionality.

    edu task types png

    A task has the following components:

    • a task.html description file,

    • a main.go file with main function declaration,

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

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

    • CMakeLists.txt file that contains a set of directives and instructions describing the project's source files and targets,

    • 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 png
    edu course structure kotlin png
    edu course structure python png
    edu course structure scala png
    edu course structure js png
    edu course structure rust png
    edu course structure cpp png
    edu course structure go png
  8. 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 in the menu use Refactor | Rename or invoke Shift+F6:

    edu rename task java png
    edu rename task kotlin png
    edu rename task python png
    edu rename task scala png
    edu rename task js png
    edu rename task rust png
    edu rename task cpp png
    edu rename task go png

Working with tasks

  1. Open the main.go file to declare the main function, for example:

    package main import ( "fmt" task "task1" ) func main() { fmt.Println("The result of sum is:", task.Sum(2, 3)) }

  2. Open the Task.java Task.kt task.py Task.scala task.js lib.rs task.cpp task.go 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; }
    #include <iostream> int sum(int a, int b) { return a + b; } int main() { std::cout << sum(1, 2) << std::endl; }
    package task func Sum(a, b int) int { return a + b }
    edu task code java png
    edu task code kotlin png
    edu task code python png
    edu task code scala png
    edu task code rust png
    edu task code js png
    edu task code cpp png
  3. Choose the execute svg Run option from the context menu or press Shift+F10 to run your code and check if it works as expected:

    Choose the execute svg Run option from the context menu or press Shift+F10 to run your code and check if it works as expected:

    Choose the execute svg Run option from the context menu or press Shift+F10 to run your code and check if it works as expected:

    Choose the execute svg Run option from the context menu or press Shift+F10 to run your code and check if it works as expected:

    Choose the execute svg Run option from the context menu or press Shift+F10 to run your code and check if it works as expected:

    Choose the execute svg Run option from the context menu or press Shift+F10 to run your code and check if it works as expected:

    Go to Run | Run 'global...run' or press Shift+F10 to run your code and check if it works as expected:

    Go to Run | Run 'go build.../main' option from the context menu or press Shift+F10 to run your code and check if it works as expected:

    edu run task java png
    edu run task kotlin png
    edu run task python png
    edu run task scala png
    edu run task js png
    edu run task rust png
    edu run task cpp png
    edu run task go png
  4. 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 png
    edu answer placeholder kotlin png
    edu answer placeholder python png
    edu answer placeholder scala png
    edu answer placeholder rust png
    edu answer placeholder js png
    edu answer placeholder cpp png
    edu answer placeholder go png
  5. If you want to see how your task will look to the learner, right-click the Task.java Task.kt task.py Task.scala task.js lib.rs task.cpp task.go file in the Project tool window, and choose Course Creator | Preview Task File:

    edu task preview java png
    edu task preview kotlin png
    edu task preview python png
    edu task preview scala png
    edu task preview rust png
    edu task preview js png
    edu task preview cpp png
    edu task preview go png
  6. Now it's time to add the task description. Click the Edit icon edit svg 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 png
    edu task description kotlin png
    edu task description python png
    edu task description scala png
    edu task description rust png
    edu task description js png
    edu task description cpp png
    edu task description go png

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 test.cpp file that you will need to modify:

    edu test file java png
    edu test file kotlin png
    edu test file python png
    edu test file scala png
    edu test file rust png
    edu test file js png
    edu test file cpp png
    edu test file go png
  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); }); }
    #include <gtest/gtest.h> int sum(int a, int b); TEST(SumTest, Simple) { ASSERT_EQ(sum(1, 2), 3); }
    package test import ( task "task1" "testing" ) func TestSum(t *testing.T) { type args struct { a int b int } tests := []struct { name string args args want int }{ {"1", args{1, 1}, 2}, {"2", args{1, 2}, 3}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { if got := task.Sum(tt.args.a, tt.args.b); got != tt.want { t.Errorf("Sum() = %v, want %v", got, tt.want) } }) } }
  3. To check that your code passes your own tests,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 png
    edu test code java png
    edu run test kotlin png
    edu test code kotlin png
    edu run test python png
    edu test code python png
    edu run test scala png
    edu test code scala png
    edu test code rust png
    edu run test js png
    edu run test cpp png
    edu run test go png

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 png
    edu course preview kotlin png
    edu course preview python png
    edu course preview scala png
    edu course preview rust png
    edu course preview js png
    edu course preview cpp png
    edu course preview go png
  2. So you can verify the course structure:

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

    edu course preview java 2 png
    edu course preview kotlin 2 png
    edu course preview python 2 png
    edu course preview scala 2 png
    edu course preview rust 2 png
    edu course preview js 2 png
    edu course preview cpp 2 png
    edu course preview go 2 png
  4. Check your hints and links available in the task description:

    edu course preview java 3 png
  5. Check your hints and links available in the task description:

    edu course preview kotlin 3 png
  6. Check your hints and links available in the task description:

    edu course preview python 3 png
  7. Check your hints and links available in the task description:

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

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

    edu course preview rust 3 png
  10. Check your hints and links available in the task description:

    edu course preview cpp 3 png
  11. Check your hints and links available in the task description:

    edu course preview go 3 png
  12. Check the right answer feedback:

    edu course preview java 4 png
    edu course preview java 5 png
    edu course preview kotlin 4 png
    edu course preview kotlin 5 png
    edu course preview python 4 png
    edu course preview python 5 png
    edu course preview scala 4 png
    edu course preview scala 5 png
    edu course preview rust 4 png
    edu course preview js 4 png
    edu course preview cpp 4 png
    edu course preview go 4 png

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 png
    edu course imported java png
    edu import course kotlin png
    edu course imported kotlin png
    edu import course python png
    edu course imported python png
    edu import course scala png
    edu course imported scala png
    edu import course rust png
    edu course imported rust png
    edu import course javascript png
    edu course imported javascript png
    edu import course cpp png
    edu course imported cpp png
    edu import course go png
    edu course imported go png
  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: 30 July 2020