Skip to content

[ALT-11077] Support every Hyperskill step type and Next navigation between topics - #68

Open
Tsyklop wants to merge 4 commits into
mainfrom
feature/ALT-11077-quiz-topics
Open

Tsyklop wants to merge 4 commits into
mainfrom
feature/ALT-11077-quiz-topics

Conversation

@Tsyklop

@Tsyklop Tsyklop commented Nov 4, 2026 •

Copy link
Copy Markdown
Collaborator

ALT-11077: every step type Hyperskill uses can be answered in the IDE, and Next takes the learner from topic to topic.

Step types

The list and the reply formats come from the BlockName enum, components/step/problems/*.vue in alt and the quiz plugins of submissions-checker.

Block Steps on the website Status Reply
choice In the IDE {choices: [bool]}
matching, sorting In the IDE, with arrow buttons instead of drag and drop {ordering: [int]}
table In the IDE {choices: [{name_row, columns}]}
number In the IDE {number}
string In the IDE {text, files}
math In the IDE, without a formula preview {formula, files}
parsons In the IDE {lines: [{line_number, level}]}
fill-blanks In the IDE, with dropdowns instead of drag and drop {blanks: [...]}
html 309 index.html and style.css files, a live preview and the checklist in the form {html, css, score}
sql 264 A query.sql file, checked without the form too {solve_sql}
dataset 103 The form downloads dataset.txt and takes the answer {file}
prompt 52 A text field in the form {prompt}
video 0 Stays unsupported: no step uses it

The counts are the steps the steps API lists for each block type.

How the steps work

This doesn't restore the code removed in 7d18763 (about 6,000 lines of per-type tasks, YAML mixins, change appliers and Swing panels). There is one QuizTask instead:

  • Server-driven. Options belong to a server-side attempt and differ between attempts, so they are requested each time the task opens. The course files only store the type and the status.
  • One form. hyperskill_quiz.js renders every block type inside the description page, so a question and its options scroll together. QuizFormBridge connects the page to the task.
  • After a check. A failed step offers Retry, which starts a new attempt and reshuffles the options. A solved one shows the given answer read-only.

html and sql are answered in the editor, so their tasks get files instead of the scratch file:

  • html is graded on the client: the server takes the score the client sends (HtmlQuiz._check in submissions-checker). So the form runs the same checklist as the website: hyperskill_html_tests.js is a port of utils/html-tests.js, and the libraries its tests need are bundled in quiz/lib, in the website's versions (htmlhint 1.9.2, csstree-validator 2.0.1, css-shorthand-properties 1.1.2, all MIT, about 220 KB). The preview and the checklist follow the files as the learner types; Check asks the form for the score through HtmlChecklistService.
  • sql is run by the server against MySQL, so Check sends the query file, with or without the form.
  • dataset has a time limit that starts with the attempt. Like on the website, the attempt is created when the learner downloads the dataset, not when the task opens. Retry downloads a new dataset right away.

Next between topics

  • Within a topic: Next follows the lesson order, then asks the server for its next step at the end of the lesson.
  • Topic completed: Next calls GET /api/learning-activities/next, the same call the website makes:
    • a topic opens in the <Language> Problems IDE project;
    • a stage opens in the IDE project of the Hyperskill project;
    • anything else (selecting a project, a feedback form) opens the page of the completed topic, as before.

The server still plans only code, pycharm, sql and html steps of a topic for IDE clients, so Next skips quizzes until hyperskill/alt#5690 is deployed: it gives plugins 2026.22 and newer the website's steps.

Fixes that also affect existing tasks

  • Theory steps never completed. The plugin didn't call POST /api/steps/{id}/complete, so the server kept theory as the next step and a topic couldn't be finished from the IDE. Next now completes it.
  • Rejected submissions reported as solved. toCheckResult treated everything except wrong as solved, including rejected (for example over the submission limit). This affected code tasks too. A rejected submission now stays unchecked and shows the server's message.
  • hs-core didn't compile on 2026.3 at times. VcsBundle and RestService came only through the descriptor of intellij.platform.vcs.impl, which the Gradle plugin sometimes generates without dependencies. intellij.platform.vcs.core and intellij.platform.builtInServer.impl are declared directly now.
  • Dead Maven repository. maven.pkg.jetbrains.space doesn't resolve any more and failed every IDE download in CI. The commit is the one from ide-update/2026-11-18.

Known limitations

  • Without JCEF (for example split mode), a step shows a link to the website and a "Sync with Hyperskill" button instead of the form. sql is the exception: it is checked from its file.
  • Existing projects: a step saved earlier as unsupported leaves its old folder on disk, next to a new one named Title1. Harmless, but untidy.
  • Solved steps can't be re-solved in the IDE. The website still allows it.
  • Answers given on the website aren't copied into the html and sql files.
  • Next from a project stage still goes to the next stage, not to a topic of the study plan.

Testing

  • :intellij-plugin:test on 263: 760 tests pass, using a mocked API. Classes: HyperskillCheckQuizTaskTest, HyperskillQuizTaskTest, HyperskillTopicNavigationTest.
  • The form was checked in a browser with sample states of every block type. The html checklist ran with the bundled libraries on a passing page (score 1) and a failing one (score 0), covering every test type the steps use. That page isn't committed.
  • The quizzes were tried in IDEA 2026.3 against the live server: choice and a code step, Next across topics.

Not tested yet in a real IDE: html, sql, dataset and prompt.

  • An html step shows the page and its checklist, which follow the files as you type, and Check sends the score
  • A sql step sends query.sql
  • A dataset step starts the timer only on download, saves dataset.txt, and Retry downloads a new one
  • A prompt step sends the prompt

Quiz steps can be answered in the task tool window again: choice, matching,
sorting, table, number, string, math, parsons and fill-blanks. They are one
server-driven QuizTask: the options belong to a server-side attempt and are
requested on every opening, so only the block type and the status are stored
in the course files. dataset, html, sql, prompt and video steps stay on the
website. Without JCEF a quiz links to the website and syncs its status.

Next continues after a completed topic with the next activity of the study
plan: a topic opens in the "<Language> Problems" IDE project and a stage in
the IDE project of the Hyperskill project. The page of the completed topic
remains the fallback.

Also fixes two problems that affect existing tasks:
- theory steps were never completed on the server, so a topic could not be
  finished from the IDE
- rejected submissions, e.g. over the submission limit, were reported as solved
maven.pkg.jetbrains.space no longer resolves: JetBrains Space package
hosting is shut down. Gradle asks repositories in declaration order, and
this one came before the IntelliJ Platform and Marketplace repositories,
so every artifact that was not cached yet failed on it instead of falling
through to the next repository. The new Rust plugin build for 263
(263.7307.313) broke `:intellij-plugin:hs-Rust:compileKotlin` this way,
and any build against a new IDE version would too.

The only artifact taken from it, kotlin-css-jvm 2026.8.4, is on Maven
Central.
All step types Hyperskill uses are QuizTasks now, except video, which no
step uses:

- prompt: a text field in the form, the reply is {prompt}.
- sql: the task gets a query.sql file. The server runs the query, so the
  check sends the file, with or without the form.
- dataset: the attempt starts the time limit, so like on the website it is
  created when the learner downloads the dataset into dataset.txt, not
  when the task opens. The answer is typed in the form, the reply is
  {file}. Retry downloads a new dataset right away.
- html: the task gets index.html and style.css from the step templates.
  The server takes the score the client sends, so the form runs the same
  checklist as the website: hyperskill_html_tests.js ports html-tests.js,
  and the libraries its tests need are bundled in quiz/lib (htmlhint,
  csstree-validator, css-shorthand-properties, MIT, the website's
  versions). The page and the checklist follow the files as they change,
  and the check asks the form for the score through HtmlChecklistService.

hs-core declares intellij.platform.vcs.core and builtInServer.impl for
2026.3: they came only through the descriptor of vcs.impl, which the
Gradle plugin sometimes generates without dependencies, and then
VcsBundle and RestService don't compile.
@Tsyklop Tsyklop changed the title Support quiz topics and Next navigation between topics (ALT-11077) [ALT-11077] Support every Hyperskill step type and Next navigation between topics Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant