Previously, an error could occur when creating an RfC. The erroneous behavior was triggered with the following steps:
1. A learner is on the implement page
2. They click on another link to leave the current page
3. Before the new page opens (through Turbolinks), the "request comments" button was hit
4. Still before the new page was visible, a question was entered and the RfC was submitted.
5. The new page opens
6. Creating the RfC was successful, and a code run should be triggered (as well as hiding the question modal etc.)
With this commit, we still allow creating an RfC without error even if the page was left before everything finished.
Fixes CODEOCEAN-FRONTEND-9C
Using the JSON representation of the error only works for some errors, whereas others are simply marked with a {}. Still, we attach the JSON representation to the Sentry event captured.
As part of the upgrade process, we need to rework the tracing instrumentation. Now, we are just wrapping all async functions in a new sentry transaction, which will automatically end once the function returns.
Further, the structure of the Sentry packages got reworked, so that we only need a single package by now. This removes the need to group dependabot updates.
Co-authored-by: Jan Graichen <jgraichen@altimos.de>
This refactoring is required for Sentry tracing. It ensures that the respective functions only return as soon as a code execution finished. With this approach, we can then instrument the duration of the functions, so that Sentry spans are created as desired.
Co-authored-by: Jan Graichen <jgraichen@altimos.de>
The new architecture memorizes settings (which we mostly did after reading the config so far) and also exposes the resulting file path as well as further settings.
This change is a prerequisite to define a dependency with Sprockets.
- Rather than using a Rails helper, we rely on JsRoutes to provide the route.
- There is no need to remove the events_path if sending events is disabled, so we drop that.
With this commit, we change the delivery method for the ACE editor from manually copied files to using yarn and webpack. As a side-change, we also modify how the mode is selected through JavaScript instead of Ruby.
Through webpack, the `modePath`, `themePath`, and `workerPath` are automatically determined and working as expected.
Closes#250
Previously, the filename was URL-encoded, thus each / was replaced with %2F. This caused issues with some Apache2 configuration, smartly mingling with the URL to either encode it a second time (resulting in %252F) or decoding it (generating a real /). However, for authenticated file downloads with the JWT, we hardly require a byte-by-byte matching. With these changes, the URL parameter is no longer URL-encoded, so that Apache2 won't break our implementation any longer.
Further, we use this opportunity to get rid of the unnecessary .json extension for those filename routes, simplifying the routes generated and doing some further cleanup.
With this commit, we refactor the overall score handling of CodeOcean. Previously, "Score" and "Submit" were two distinct actions, requiring users to confirm the LTI transmission of their score (after assessing their submission). This yielded many questions and was unnecessary, since LTI parameters are no longer expiring after each use. Therefore, we can now transmit the current grade on each score run with the very same LTI parameters. As a consequence, the LTI consumer gets a more detailed history of the scores, enabling further analytical insights.
For users, the previous "Submit" button got replaced with a notification that is shown as soon as the full score got reached. Then, learners can decide to "finalize" their work on the given exercise, which will initiate a redirect to a follow-up action (as defined in the RedirectBehavior). This RedirectBehavior has also been unified and simplified for better readability.
As part of this refactoring, we rephrased the notifications and UX workflow of a) the LTI transmission, b) the finalization of an exercise (measured by reaching the full score) and c) the deadline handling (on time, within grace period, too late). Those information are now separately shown, potentially resulting in multiple notifications. As a side effect, they are much better maintainable, and the LTI transmission is more decoupled from this notification handling.
Previously, the same runner could be used multiple times with different submissions simultaneously. This, however, yielded errors, for example when one submission time oud (causing the running to be deleted) while another submission was still executed.
Admin actions, such as the shell, can be still executed regardless of any other code execution.
Fixes CODEOCEAN-HG
FixesopenHPI/poseidon#423
The new ACE editor introduces full support for emojis (and, thereby, UTF-16 characters with high- and low-surrogates). Hence, we can remove our custom fix.
Further, this update will allow emojis to be used in pair programming sessions.
Previously, we were at an ACE editor published between 1.1.8 and 1.1.9. This caused multiple issues and was especially a problem for the upcoming pair programming feature. Further, updating ace is a long-time priority, see https://github.com/openHPI/codeocean/issues/250.
Now, we are not yet updating to the latest version, but rather to the next minor version. This already contains breaking changes, and we are currently interested to keep the number of changes as low as possible. Further updating ACE might be still a future task.
The new ACE version 1.2.0 is taken from this tag: https://github.com/ajaxorg/ace-builds/releases/tag/v1.2.0.
We are using the src build (not minified, not in the noconflict version), since the same was used before as well.
Further, we need to change our migration for storing editor events. Since the table is not yet used (in production), we also update the enum.
* This commit refactors the table used to store events.
* We also use a UUID as session identifier in the synchronized editor to support multiple concurrent tabs opened by the same user.
* Further, we renamed some methods to make them easier to distinguish.