Commit Graph

43 Commits

Author SHA1 Message Date
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
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
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
aab3b95a1d Resolve Bootstrap 5.3 deprecations 2023-07-31 11:27:49 +02:00
01f4f0c2cd Remove legacy CodePilot integration 2023-07-28 08:50:00 +02:00
15583ec552 Drop outdated JavaScript code no longer used 2023-05-09 22:10:40 +02:00
240fbc5a3b Add Sentry instrumentation for JavaScript 2023-05-09 22:10:40 +02:00
2f622174fa Handle undefined this.websocket when stopping code
Fixes CODEOCEAN-CJ
2022-09-22 19:24:26 +02:00
dccc60b7ca Remove renderWebsocketOutput and use printWebsocketOutput instead
* The `render` command is not used much
* Originally added with commit 898074be3f
* The `#render` anchor (see findOrCreateRenderElement) was the "Render" button above the editor, nothing was rendered at all if executing code and otherwise it would be included _within_ the button.
2022-09-04 23:12:46 +02:00
60dc8c3b7e Apply line-based coloring for output 2022-09-02 16:56:18 +02:00
ffd7a0351a Improve display of images for code output 2022-08-25 20:13:22 +02:00
ac170e8fd7 Allow images in augmentStacktraceInOutput 2022-06-17 00:04:05 +02:00
19bd742bc9 Show a localized message if the program was killed.
* This will most likely happen by the OOM killer, thus we inform the user about the memory restriction.
2022-04-15 21:29:55 +02:00
df9fb50c7d Re-allow Carriage Return in Output 2022-04-11 19:45:04 +02:00
692cb1107e Remove non-printable characters from console 2022-04-07 18:17:27 +02:00
18daa1c998 Enable image preview in STDOUT 2022-03-02 11:44:48 +01:00
6ff14d6fc7 Connection Buffer: Replace \r in run and score output with \n 2021-11-01 17:13:14 +01:00
3c8017f23e JS: Ensure to print status messages for score
* If only one response is available, no array will be passed (but rather an Object). The impact of this has been tackled with the changes included
2021-11-01 17:13:11 +01:00
ad09230c50 Show UTC info for deadline 2021-03-03 14:25:16 +01:00
41ae6c2880 Update deadline string shown to users 2021-02-09 00:20:05 +01:00
6c5052ed84 Prevent printing empty lines in output 2020-11-24 00:22:56 +01:00
be9cc8790c Check for result before trying to populate score card 2020-11-14 00:26:36 +01:00
3cedcf5736 Check for null and undefined before accessing stderr and stdout 2020-11-14 00:19:39 +01:00
307bc9bd7b Check for output before accessing stderr or stdout 2020-11-13 22:53:56 +01:00
ffcf4dbbce Prevent access to file_role if no valid response was received 2020-11-09 21:20:01 +01:00
7758d39970 Replace JS comparison with safe variant 2020-10-29 13:47:36 +01:00
695b6ff373 Stop code execution before starting score 2020-10-29 12:29:24 +01:00
799e37f9ae Add new style for linter and allow 0 points 2020-10-15 16:22:37 +02:00
8aaf93af6b Remove JS debugger statement 2020-05-12 17:51:06 +02:00
26b9edabb4 Add deadline information to submission page and some minor bugfixes 2020-05-08 15:07:02 +02:00
0b9cf0bd45 Hide Turtle Canvas during cleanup 2020-03-07 23:24:06 +01:00
bf6a343e2b Set onError binding to underscore's no-op 2020-03-05 14:53:46 +01:00
99e4aec1cb Render submit button once results are available 2020-03-04 17:58:16 +01:00
fa229a581e Ensure output is shown even if no test command is given 2019-12-16 14:53:17 +01:00
d45a68a123 Minor: Fix spelling in comment 2018-12-13 12:57:49 +01:00
a0d8b30ef2 Implement support for some basic embed options for work sheets via LTI
This commit also fixes an issue with the flash messages being positioned too high and displayed for too long
2018-12-11 14:29:36 +01:00
8dfcef3e45 Merge pull request #235 from openHPI/remove_old_hints
Completely remove old hints connected to the execution environment
2018-11-30 15:41:01 +01:00
b9dce854c4 Merge remote-tracking branch 'origin/master' into flowr
# Conflicts:
#	app/assets/javascripts/editor/evaluation.js
#	app/assets/javascripts/editor/participantsupport.js
#	app/views/exercises/_editor_output.html.slim
#	config/code_ocean.yml.example
#	config/routes.rb
2018-11-28 13:14:21 +01:00
efacb5a6a9 Completely remove old hints connected to the execution environment 2018-11-28 01:21:13 +01:00
0fbbe97ae4 revert 8acd77d9c4 2018-11-16 10:38:36 +01:00
8acd77d9c4 temporary changes to render pictures again. 2018-11-13 13:07:49 +01:00
7bdb962616 Update Bootstrap to v4.1, fix chosen.js and pagedown on multiple sites 2018-11-06 16:49:41 +01:00
15b1670511 Update Turbolinks, load additional assets only on request, fix JS
Signed-off-by: Sebastian Serth <Sebastian.Serth@student.hpi.de>
2018-11-06 16:46:01 +01:00