An open API service indexing awesome lists of open source software.

https://github.com/alexanderprendota/kotlin-playground-coursera-plugin

Coursera plugin which allows to embed interactive Kotlin playground for coursera lessons
https://github.com/alexanderprendota/kotlin-playground-coursera-plugin

coursera coursera-plugin kotlin kotlin-playground playground

Last synced: 29 days ago
JSON representation

Coursera plugin which allows to embed interactive Kotlin playground for coursera lessons

Awesome Lists containing this project

README

        

# Kotlin Playground Coursera Plugin
Allows embedding interactive [Kotlin playground](https://github.com/JetBrains/kotlin-playground) for [coursera](https://www.coursera.org/) lessons.

Plugin current version: 0.1.0 :tada:

screen shot 2018-08-09 at 1 07 00 pm

## Installation

1. Download [latest release](https://github.com/AlexanderPrendota/kotlin-playground-coursera-plugin/releases).
2. Go to [coursera.org](https://www.coursera.org/)
3. From the left sidebar, select `Admin`
4. Find your course and click `Edit` next to the course title
5. From the left sidebar, click Content and select `Edit Content`
6. Find the lesson you want to add a plugin to, or create a new lesson
7. From the `ADD ITEM` dropdown menu, select `Ungraded Plugin`
8. Click Choose Plugin to select the plugin you want to add
9. Click Continue and `Edit Configuration`, if needed
10. When you’re done, click `Review & Publish`

## Usage

Find configuration panel on `Edit Configuration` and set code snippet:

```json
{
"code": "fun main(args: Array) {\n println(\"Hello world\")\n}",
"platform": "java",
"link": "https://kotlinlang.org/",
"task": "We declare a package-level function main which returns Unit and takes\nan Array of strings as a parameter. Note that semicolons are optional.",
"head": "Hello World!"
}
```
- Default theme: `idea`.
- Default kotlin version : [latest stable](https://try.kotlinlang.org/kotlinServer?type=getKotlinVersions) version.

Attributes:

- `code`: kotlin code. **required**
- `platrorm="java|js|canvas|junit"`: kotlin target compiler platform. **required**
- `head`: text header of the code snippet. **optional**
- `link`: link with text `[Solution]` after playground. **optional**
- `task`: text task description of the code snippet. **optional**

More information about different attributes and markers see in [Kotlin Playground documentation](https://github.com/JetBrains/kotlin-playground/blob/master/README.md)