Skip to content

Course Configuration

Taikelenn edited this page Feb 6, 2024 · 3 revisions

Overview

A course configuration .json file is needed to add a course to the plugin. Currently a link to the course configuration is hardcoded to the plugin, but this will change in the future.

Fields

id

ID for the course from the A+ API.

"id": "197"

name

Name of the course that gets shown in the UI.

"name": "O1"

aPlusUrl

URL for A+.

"aPlusUrl": "https://plus.cs.aalto.fi/"

languages

An array of the languages for the assignments. Different languages may use different modules.

"languages": [
    "fi",
    "en"
],

resources

URLs for some resources the plugin uses:

  • ideSettings

    A .zip file, containing settings for IntelliJ that the user may optionally install while turning their project into an A+ project.
  • ideSettingsMac

    Same as before, but for macOS.
  • projectSettings

    A .zip file, containing settings for the project the course is installed in, such as inspection profiles and code styles.
  • customProperties

    A .properties file, that overwrites the UI texts for the plugin. The default file may be found here.
    "resources": {
        "ideSettings": "https://grader.cs.aalto.fi/static/O1_2021/projects/o1_2021_ij_settings.zip",
        "ideSettingsMac": "https://grader.cs.aalto.fi/static/O1_2021/projects/o1_2021_ij_mac_settings.zip",
        "projectSettings": "https://grader.cs.aalto.fi/static/O1_2021/projects/o1_2021_project_settings.zip"
    }

vmOptions

A map of options for the JVM.

    "vmOptions": {
        "file.encoding": "UTF-8"
    },

autoInstall

An array of the modules that get installed automatically when the project gets turned into an A+ project.

"autoInstall": [
    "O1Library"
]

repl

Settings for the Scala REPL.

  • initialCommands

    A map from a module name to an array of commands that get run when opening the REPL for the given module.
"repl": {
    "initialCommands": {
        "Adventure": [
            "import o1.adventure._"
        ]
    }
}

modules

An array of objects containing information about modules.

  • name

    Name for the module shown in the UI.
  • url

    URL to a .zip file containing skeleton code, that the plugin downloads.
  • version

    Major.minor version number. Increment the major number when making breaking changes, else the minor number.
  • changelog

    Optional changelog, that gets shown as a tooltip in the modules list. Use empty string or leave out if you don't want a changelog.
"modules": [
    {
    "name": "Adventure",
    "url": "https://grader.cs.aalto.fi/static/O1_2021/projects/given/Adventure/Adventure.zip",
    "version": "1.0",
    "changelog": ""
    }
]

exerciseModules

Information, about which module each assignment uses. The assignment ID is used as a key to a map, where language codes are used as keys for the module names.

"exerciseModules": {
    "31353": {
        "en": "Subprograms",
        "fi": "Aliohjelmia"
    }
}

Example course config

{
    "id": "197",
    "name": "O1",
    "aPlusUrl": "https://plus.cs.aalto.fi/",
    "languages": [
        "fi",
        "en"
    ],
    "resources": {
        "ideSettings": "https://grader.cs.aalto.fi/static/O1_2021/projects/o1_2021_ij_settings.zip",
        "ideSettingsMac": "https://grader.cs.aalto.fi/static/O1_2021/projects/o1_2021_ij_mac_settings.zip",
        "projectSettings": "https://grader.cs.aalto.fi/static/O1_2021/projects/o1_2021_project_settings.zip"
    },
    "vmOptions": {
        "file.encoding": "UTF-8"
    },
    "autoInstall": [
        "O1Library"
    ],
    "repl": {
        "initialCommands": {
            "Adventure": [
                "import o1.adventure._"
            ],
            "AdventureDraft": [
                "import o1.adventure.draft._"
            ],
            "Aliohjelmia": [
                "import o1._",
                "import o1.aliohjelmia._"
            ]
        }
    },
    "modules": [
        {
            "name": "Adventure",
            "url": "https://grader.cs.aalto.fi/static/O1_2021/projects/given/Adventure/Adventure.zip",
            "version": "1.0",
            "changelog": ""
        },
        {
            "name": "AdventureDraft",
            "url": "https://grader.cs.aalto.fi/static/O1_2021/projects/given/AdventureDraft/AdventureDraft.zip",
            "version": "1.0",
            "changelog": ""
        },
        {
            "name": "Aliohjelmia",
            "url": "https://grader.cs.aalto.fi/static/O1_2021/projects/given/Aliohjelmia/Aliohjelmia.zip",
            "version": "1.0",
            "changelog": ""
        }
    ],
    "exerciseModules": {
        "31353": {
            "en": "Subprograms",
            "fi": "Aliohjelmia"
        },
        "31383": {
            "en": "IntroOOP",
            "fi": "Oliointro"
        },
        "31427": {
            "en": "Ave",
            "fi": "Ave"
        }
    }
}