Commit Graph

58 Commits

Author SHA1 Message Date
092487344a Replace obsolete HTTP status code :unprocessable_entity
The new naming is :unprocessable_content and required by Rack 3.1+
2024-06-17 15:07:04 +02:00
fad9ee0202 Remove redundant url_helpers in spec 2024-06-17 14:45:39 +02: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
e9f099d59f Properly nest UserExerciseFeedback
Fixes CODEOCEAN-108
2023-11-23 14:42:10 +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
347af23f98 Remove duplicated render_views for SubmissionsController spec 2023-11-23 14:42:10 +01: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
319c3ab3b4 Add ProgrammingGroup & ProgrammingGroupMembership
* User can create programming group with other users for exercise
* Submission is shared in a group
* Also adjust specs
2023-08-24 19:32:06 +02:00
0234414bae Rename user to contributor in submission 2023-08-24 19:32:06 +02:00
fd2d94568a Handle OutOfMemory runner errors with gVisor 2023-07-21 16:38:49 +02:00
05a8e307ce Fix rubocop offenses 2023-02-27 11:09:34 +01:00
9c3ec3c7ff Refactor submission scoring and testing
* Properly cancel code execution if running is prohibited
* Correctly monitor duration with Sentry
* Align methods with running submissions
2023-02-17 18:13:48 +01:00
574e99eddd Fix rubocop offenses - Requires Ruby 3.1+ 2022-11-25 11:10:06 +01:00
a4e791e3de Always render templates in Controller specs 2022-11-02 12:25:33 +01:00
f7515362a1 Set Content-Type to fixed value for all download actions 2022-10-05 21:46:17 +02:00
3263d4f838 Respect subpath for (render_)protected_upload_path 2022-09-28 11:06:15 +02:00
16c00ec136 Add support for signed URLs used by the render_file function 2022-09-23 21:35:22 +02:00
0a16f589e9 Use X-Sendfile to transmit native files and handle file uploads 2022-09-06 01:21:40 +02:00
d762f976a8 Add new CodeOcean::File#read method
* With a new method, we can simplify our code to handle differences between file.content and file.native_file.read
2022-08-19 22:42:55 +02:00
fa27e3923d Reimplement pending specs with rough skeleton 2022-08-09 11:41:41 +02:00
5e9bf9141c Fix Rubocop offenses 2022-07-08 15:23:55 +02:00
ea85519163 Update bundle (with newest rubocop version) and fix offenses 2022-01-04 09:42:37 +01:00
01ec9343cf Remove usage of DockerClient 2021-11-01 17:13:10 +01:00
601e1fab5c Remove all occurrences of server-sent events 2021-11-01 17:12:57 +01:00
da0a682ffb Apply manual rubocop fixes 2021-05-14 22:03:06 +02:00
6cbecb5b39 Apply automatic rubocop fixes 2021-05-14 22:03:06 +02:00
8378070bc2 Upgrade to Rails 6.0 and apply new framework defaults 2021-05-12 16:47:05 +02:00
1e5a9b0825 Remove unused SubmissionsController#stop action 2021-04-07 17:45:38 +02:00
be3ec82bd4 Add new file role teacher_defined_linter 2020-10-15 00:43:57 +02: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
56c59a616e Completely remove old non-structured errors and migrate existing ones. 2018-11-30 11:27:25 +01:00
efacb5a6a9 Completely remove old hints connected to the execution environment 2018-11-28 01:21:13 +01:00
90defa8f89 Fix tests and rename request variable in specs to perform_request
Explanation: Using the variable name `request` might interfere with methods in Rails core system prevent successful test execution. See this issue: https://github.com/turbolinks/turbolinks-rails/issues/38
2018-11-06 16:49:42 +01:00
9106ab182b Include Webpack and use it for jQuery, Bootstrap and chosen.js 2018-11-06 16:49:42 +01:00
de52db89f0 Upgrade Rails to version 5.2.1 and adopt code & specs where necessary
Signed-off-by: Sebastian Serth <Sebastian.Serth@student.hpi.de>
2018-11-06 16:46:00 +01:00
fc873cb053 second run of replacement regex from https://github.com/thoughtbot/factory_bot/blob/4-9-0-stable/UPGRADE_FROM_FACTORY_GIRL.md ...
Nested calls seem to be fun..
2017-11-15 15:37:42 +01:00
0e26ab98c8 rename factory_girl_(rails) to factory_bot_(rails) 2017-11-15 15:18:07 +01:00
0fd993c1cd Move submission url attributes to controller test 2017-10-26 15:48:21 +02:00
34e96e40be Fix submissions controller test json response 2017-10-26 15:43:14 +02:00
a00adbce25 Move *_url spec to controller, because the subscription model does not handle urls anymore 2017-10-16 14:02:40 +02:00
d931d431d5 Update submissions_controller_spec.rb
removed some uncommented lines
2016-11-11 17:29:03 +01:00
c937a1a9ef clean pull request 2016-10-24 23:02:44 +02:00
44aca293e9 make travis green again 2016-10-08 20:37:20 +02:00
b8e1cb8dfd additional pending 2016-08-04 16:57:08 +02:00
7efcfa632b come back to green light! 2016-08-04 16:54:55 +02:00
d921f90a65 solved logger error 2016-06-15 15:13:31 +02:00
195fd9c3f9 submission controller spec - problem with Rails.logger.error 2016-06-14 16:07:44 +02:00
c3a56e6429 fixed tests 2015-04-27 17:58:44 +02:00
ba3476cfec some refactoring 2015-03-19 14:33:51 +01:00
c91d5bd0b9 added tests 2015-03-06 10:23:17 +01:00