Commit Graph

797 Commits

Author SHA1 Message Date
d6c4df1bac Remove JavaScript debugger statement 2024-01-19 11:06:40 +01:00
43f93af575 Fix missing confirmation when deleting a user-generated file 2024-01-19 11:06:40 +01:00
bf0e6149da Remove obsolete context-type attribute for submissions
The value and function is no longer used.
2024-01-19 11:06:40 +01:00
6d62dfc3de Remove anchor replacement in active_file.filename
Previously, this replacement was required, but it is no longer (since we are not using some form of direct user-input).
2024-01-19 11:06:40 +01:00
21e0784af5 Rewrite createSubmissionCallback to use real forEach loop 2024-01-19 11:06:40 +01:00
e2c8156f0e Simplify forEach loops in JavaScript
See https://stackoverflow.com/a/9329476
2024-01-19 11:06:40 +01:00
17dd8b1267 Change syntax for routes with filename
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.
2024-01-19 11:06:40 +01:00
65212c4b4b Reduce file attributes in JSON for submission#show 2024-01-19 11:06:40 +01:00
293bb5d4ab Switch to proper, dynamic route for SortableJS elements 2023-12-14 00:31:41 +01:00
ef89b20986 Improve explanation for hidden feedback messages in tests 2023-12-08 20:25:02 +01:00
f393d8cb48 Sentry: Allow backend filtering for WebSocket connections without frontend 2023-12-02 23:30:03 +01:00
b4ee21a00d Reduce global JavaScript variables for Turtle
Fixes
2023-11-25 01:18:19 +01:00
0bd7c93d65 Allow clicking on checkboxes for batch update 2023-11-24 16:41:49 +01:00
175c8933f3 Automatically submit LTI grade on each score run
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.
2023-11-23 14:42:10 +01:00
c9ed9bd0cf Fix batch update for exercises
This fixes a regression from 8a055a0d
2023-11-20 22:33:58 +01:00
e03e67a1a5 Only return height and width for Turtle if canvas is present
Fixes CODEOCEAN-FRONTEND-4P
2023-11-17 14:59:49 +01:00
3d5f55f8ed Only apply Turtle update if canvas is present
Fixes CODEOCEAN-FRONTEND-4T
2023-11-17 14:59:49 +01:00
ce6470cd72 Carefully check for tooltip in Run-Stop button group
Fixes CODEOCEAN-FRONTEND-5C
2023-11-17 14:59:49 +01:00
c18aadaf61 Don't throw an exception without turtle canvas
Fixes CODEOCEAN-FRONTEND-59
2023-11-17 14:59:49 +01:00
35a65e4744 Check for element before attempting to show spinner
Fixes CODEOCEAN-FRONTEND-57
2023-11-17 14:59:49 +01:00
d2b2deaf98 Use var for window-wide variables
Otherwise, Turbolinks might cause an issue...

Fixes CODEOCEAN-FRONTEND-H
2023-11-05 23:43:32 +01:00
8fc5123bae Exclusively lock Runners during code executions
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
Fixes openHPI/poseidon#423
2023-10-31 12:35:24 +01:00
442337a22b Fix file listing and download for admin shell
`node.parents` is not returning the parent nodes in a fixed order. Hence, we cannot use it but must travers the tree ourselves.
2023-10-31 00:39:06 +01:00
7af648a966 Specify ANIMATION_DURATION as const 2023-10-13 00:14:19 +02:00
99bd46af1a Align project files with CodeHarbor
Since both projects are developed together and by the same team, we also want to have the same code structure and utility methods available in both projects. Therefore, this commit changes many files, but without a functional change.
2023-10-11 00:18:33 +02:00
a93ae6117a Ignore missing screen for TurtlebatchCommand
Fixes CODEOCEAN-FRONTEND-47
2023-09-26 00:25:19 +02:00
9f837412c7 Add waiting room to create programming groups (#1919)
Co-authored-by: Sebastian Serth <Sebastian.Serth@hpi.de>
2023-09-21 15:07:10 +02:00
06cde49901 Keep var for global ProgrammingGroups object
Otherwise, Turbolinks might cause some nasty redefinition errors.

Fixes CODEOCEAN-FRONTEND-3W
Fixes CODEOCEAN-FRONTEND-3X
2023-09-20 23:56:13 +02:00
937a0d7d4d Disallow learners from clicking any button while redirecting after submit
Fixes CODEOCEAN-FRONTEND-3M
2023-09-20 00:35:18 +02:00
9a6d590a80 Fix missing Sentry settings for JS initializer
Fixes CODEOCEAN-FRONTEND-2W
2023-09-20 00:35:18 +02:00
6f3b72d207 Fix missing Sentry span for WebSocket close
Fixes CODEOCEAN-FRONTEND-3C
2023-09-20 00:35:18 +02:00
2200fa427e Gracely handle missing editor_for_file
Fixes CODEOCEAN-FRONTEND-3H
2023-09-20 00:35:18 +02:00
d224a099e0 Return if editor is not defined
Fixes CODEOCEAN-FRONTEND-3A
2023-09-19 22:32:14 +02:00
8a5dc7abc0 Forward person when a programming group is created with them
Further, we remove the "check invitation" button and extract some methods to our new ProgrammingGroups object in JavaScript.

Co-authored-by: Sebastian Serth <Sebastian.Serth@hpi.de>
2023-09-19 20:14:33 +00:00
bea2e02fa5 Show Pair Programming modal for new Programming Groups 2023-09-13 04:33:31 +02:00
60656443e2 Update ACE Editor to version 1.2.9
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.
2023-09-12 18:54:04 +02:00
f37ba34389 Synchronize resetCode for pair programming 2023-09-12 18:47:06 +02:00
cc90861bd5 Generate Session ID on server for synchronized editor
This change allows us to use the session ID immediately for the connection_change and connection_status methods. Hence, we can identify different browser sessions of the same user.
2023-09-12 18:47:06 +02:00
914adeed42 Insert text written after last autosave in pp session 2023-09-12 18:47:06 +02:00
6e0dc9d7bc Replaces compareDeltaObjects with editor.curOp 2023-09-12 18:47:06 +02:00
735a74901f Update ACE Editor to version 1.2.0
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.
2023-09-12 16:41:33 +02:00
5da871a0e9 Add info modal for pair programming 2023-09-11 14:43:00 +02:00
883169121c Provide current-contributor application-wide
* This change allows us to reuse the current user in multiple places.
2023-09-11 14:43:00 +02:00
02e50e9921 Correct connection status if user used multiple windows 2023-09-08 11:48:53 +02:00
b43441f85e Set lastDeltaObject per file
* This change will potentially resolve a race condition that could occur when the same change was simultaneously performed in two different files.
2023-09-08 11:48:53 +02:00
f7c2fbebd6 Simplify comparison of delta objects 2023-09-08 11:48:53 +02:00
5dd6df9418 Synchronized Editor: Store all events and allow multiple tabs
* 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.
2023-09-08 11:48:53 +02:00
33aa0cecba Provide current-user application-wide
* This change allows us to reuse the current user in multiple places.
* Sentry still receives the same information as before.
2023-09-08 11:48:53 +02:00
6d6851a27a Check for Sentry span before appending header for WebSocket
Fix CODEOCEAN-FRONTEND-2X
2023-09-07 22:50:14 +02:00
9f37034d0b Prevent multiple unsubscribe calls for ActionCable 2023-09-06 00:00:27 +02:00