186 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
96f5f1f8d7 Enforce valid lis_outcome_service_url
Recently, a new institution joined CodeOcean and used a relative URL. This won't work, so that we are rejecting non-absolute URLs by now.
2024-04-26 10:21:53 +02:00
4f8d313da4 Use webpack to deliver newest ACE editor
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
2024-03-25 10:00:04 +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
dccfe5cbc8 Reduce SQL queries for exercise batch update
Fixes CODEOCEAN-10D
2023-12-05 22:12:42 +01:00
5ddc5a8ca5 Redirect users after sign in to their desired page 2023-12-01 00:06:31 +01:00
e9f099d59f Properly nest UserExerciseFeedback
Fixes CODEOCEAN-108
2023-11-23 14:42:10 +01:00
fe26378387 Extract ScoringChecks and rework RemoteEvaluations 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
8b37242a58 RSpec redirect: Fix erroneous test cases for DELETE 2023-11-23 14:42:10 +01:00
28d9e38fe5 Upgrade to Rails 7.1 and apply new framework defaults
* Remove deprecated options from environments
* Remove deprecation warnings for upcoming Rails 7.2
* Dump schema with new defaults
* Remove outdated (and erroneous) data attribute in view
* Resolve a `NoMethodError` for seeds_spec.rb
2023-10-27 16:50:27 +02:00
79ce069f68 Add CRUD operations for Programming Groups
* Correct sorting in table
* Modify page when nested in exercises
* Fix links between pages
* Link from statistics page to programming_groups/index
* Link from submission page to programming_groups/<id>
* Allow filtering for exercise ID on ProgrammingGroup#index
* Add search fields for internal and external user id on pg/index
2023-10-23 18:17:42 +02:00
b91a2b7ce0 Remove PairProgramming23Study and instead use LTI parameter 2023-10-22 12:07:41 +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
e767cff309 Fix flaky tests dependent on exercise.reload for files 2023-09-16 16:57:59 +02:00
c2995c96f0 Remove clear_lti_session_data as it is no longer needed
* no lti session data anymore included in the function
* decided not to delete the pg_id here as it is handled in create_through_lti and implement
* the function is only called once without an exercise id so the values are now directly deleted there
2023-08-24 19:32:06 +02:00
e3603758ef Refactor LTI parameters and add study group
* This change also requires that submissions in our test need to have a valid study group.
2023-08-24 19:32:06 +02:00
e2baa2ee55 Send score for all members of a programming group 2023-08-24 19:32:06 +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
245c3dba8c Update from proforma to proformaxml 2023-08-24 00:14:41 +02:00
f15d4fe437 Improve comments controller spec
For this test, we had a bug so that the test could passed if executed, so that the file just had ID 50 randomly.
2023-08-01 16:22:47 +02:00
8f446c04a9 Fix Rubocop offenses 2023-07-31 08:59:00 +02:00
fd2d94568a Handle OutOfMemory runner errors with gVisor 2023-07-21 16:38:49 +02:00
06d69d8eb8 Explicitly disable feedback in submit test scenarios 2023-06-23 22:20:04 +02:00
1b21e2cd26 Explicitly disable the runner management for the dashboard test 2023-06-23 22:20:04 +02:00
ccbf41005b Always clear runner strategy after each test case
Otherwise, we get different test results depending on the test order.
2023-06-23 22:20:04 +02:00
3f5ef1caf2 Mock health check for Runner management 2023-03-13 23:52:59 +01:00
7f0f2a64d1 Fix rubocop offenses 2023-03-13 13:34:02 +01:00
05a8e307ce Fix rubocop offenses 2023-02-27 11:09:34 +01:00
9c3392b324 Add consumer-based RfC Visibility settings
This setting will be useful to increase data protection, where users might not be allowed to see RfCs from other contexts.
2023-02-20 23:47:06 +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
bf077ef478 Fix rubocop offenses 2022-12-09 13:11:46 +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
dd1f4b0ac8 Merge pull request #939 from openHPI/refactor_proforma_import_export
Refactor Proforma Import/Export
2022-10-26 17:58:48 +02:00
c75f52f2c8 Fix Rubocop offenses 2022-10-24 12:28:50 +02: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
b866221353 rename route 2022-09-24 21:08:18 +02:00
16c00ec136 Add support for signed URLs used by the render_file function 2022-09-23 21:35:22 +02:00
5881795d5f Memorize config options instead of reading them from file over and over again 2022-09-23 21:35:22 +02:00
e3018c1847 Refactor consumer factory 2022-09-22 19:24:26 +02:00
ec4c6207f0 Refactor internal_users_controller_spec to prevent invalid objects 2022-09-22 19:24:26 +02:00
7e9967e2bf Fix rubocop offenses 2022-09-16 01:03:55 +02:00
d02a1eae81 Validate password strength for internal users 2022-09-14 12:19:25 +02:00
f1aa004284 Use controller method for 404 responses 2022-09-14 01:01:14 +02:00
dba3aac800 Merge branch 'master' into refactor_proforma_import_export 2022-09-13 22:47:50 +02:00