Commit Graph

165 Commits

Author SHA1 Message Date
Sebastian Serth
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
kiragrammel
e2baa2ee55 Send score for all members of a programming group 2023-08-24 19:32:06 +02:00
kiragrammel
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
kiragrammel
0234414bae Rename user to contributor in submission 2023-08-24 19:32:06 +02:00
kiragrammel
97138288f4 Delete unused LTI params from session 2023-08-24 19:32:06 +02:00
Sebastian Serth
2f0cf615d0 Retry file conversion in case of DB connection issues
Fix CODEOCEAN-RZ
2023-08-21 13:34:11 +02:00
Sebastian Serth
5f21f99f55 Refactor conversion of files JSON for download
Tries fixing CODEOCEAN-RQ
2023-08-15 23:04:03 +02:00
Sebastian Serth
db56a690c7 Add option to suppress feedback messages
This is used to dynamically exclude some test results from being shown to users, but still allows them to run in the background (e.g., for research).
2023-07-27 10:38:49 +02:00
Sebastian Serth
c6977b6319 Catch SocketError for LTI 2023-07-13 10:51:47 +02:00
Sebastian Serth
0aa73d30e9 Reduce SQL queries for querying files when creating submissions
This is especially useful for the RemoteEvaluationsController.

Closes CODEOCEAN-KX
2023-04-02 17:05:22 +02:00
Sebastian Serth
6d3587e813 Rescue network-related issues in transmitting LTI scores
Fixes CODEOCEAN-JS
2023-03-15 13:05:46 +01:00
Sebastian Serth
5ddad9e83d Rescue network-related issues in transmitting LTI scores
Fixes CODEOCEAN-JT
2023-03-14 15:34:28 +01:00
Sebastian Serth
939b31967f Reduce SQL queries for score runs
Fixes CODEOCEAN-JR
2023-03-14 13:56:23 +01:00
Sebastian Serth
ddf041ac05 Check RfC visibility before redirecting users 2023-02-21 10:01:01 +01:00
Sebastian Serth
40c7a50834 Directly use ActiveRecord object instead of ID
This change will improve the performance by reducing unnecessary SELECT queries.
2023-02-18 19:28:26 +01:00
Sebastian Serth
596a04b9da Handle ReadTimeouts for LTI consumer properly 2023-02-16 10:12:05 +01:00
Sebastian Serth
8a6e0a8366 Catch empty files_json during conversion 2022-12-19 16:11:35 +01:00
Sebastian Serth
bec235c8d6 Fix XML parsing with invalid LTI response
An invalid XML response may be returned if the LTI provider is unavailable and cannot handle our request. We decided against logging in Sentry as this affects a third party functionality we cannot fix ourselves.
Fixes CODEOCEAN-G2
2022-12-07 23:00:21 +01:00
Sebastian Serth
bc5baed05e Use exec_query for custom SQL execution
Also align how we use query Postgres from controllers.

The change is mainly due to regular (but not reproducible) issues with the `intervalstyle` defaulting to `postgres` (instead of `iso8601`) and thereby causing issues. We're just experimenting to see whether this change resolves the issue.
2022-12-06 22:41:00 +01:00
Sebastian Serth
9977e1614b Allow external redirect for render host and LTI
We only use the `launch_presentation_return_url` provided to the @provider, in order to prevent using an open redirect.
2022-12-05 22:38:13 +01:00
Sebastian Serth
574e99eddd Fix rubocop offenses - Requires Ruby 3.1+ 2022-11-25 11:10:06 +01:00
Sebastian Serth
4f0b8c3c42 Reduce usage of @current_user (use helper instead) 2022-11-02 12:27:38 +01:00
Sebastian Serth
60078701f5 Editor: Allow file retrieval after code run 2022-10-29 18:49:18 +02:00
Sebastian Serth
9c9f45ff77 Redefine user roles with their role in a study group 2022-09-22 19:24:26 +02:00
Sebastian Serth
22cd202e9d Refactor reject_illegal_file_attributes check
* Improve readability of method
* Add a new check for the author of a submission
2022-09-04 11:42:36 +02:00
Sebastian Serth
145c4aa8d5 Refactor various ruby files
* Insights based on brakeman report
2022-08-18 15:25:04 +02:00
Sebastian Serth
2ce9c4258a Remove New Relic 2022-04-29 22:53:36 +02:00
Sebastian Serth
61d3bffe1a Keep LTI parameters after submitting through the web interface 2022-03-16 13:46:47 +01:00
Sebastian Serth
ea85519163 Update bundle (with newest rubocop version) and fix offenses 2022-01-04 09:42:37 +01:00
Sebastian Serth
da4e10b990 Add CommunitySolution
* Also slightly refactor some JS files
2021-11-23 01:38:31 +01:00
Sebastian Serth
d559cfb323 Extract Redirect Behavior to own module 2021-11-23 01:38:31 +01:00
Felix Auringer
5cc180d0e9 Fix rubocop, I18n, cleanup rebase 2021-11-01 17:12:52 +01:00
Felix Auringer
b6bc578aea Move submission scoring from controller concern to submission model
Localization and markdown formatting is now done in a controller
spec in order to bring this logic away from the data and towards
the view.
2021-11-01 17:12:50 +01:00
Felix Auringer
cf58be97ee Fix 17 previously failing specs 2021-11-01 17:12:49 +01:00
Konrad Hanff
90fac7b94c Copy execution environment to Poseidon on create and update
When creating or updating an execution environment, an API call to
Poseidon is made with the necessary information to create the
corresponding Nomad job.

If runner management is configured, his will display a warning
(currently in the same color as if it were a success) in the UI, if the
API call fails. The environment is saved even if it fails.
If runner management is not configured, this warning will not be created.
2021-11-01 17:12:48 +01:00
Felix Auringer
63d997a7e3 Fix Rubocop offenses after Rubocop was reconfigured 2021-11-01 17:12:47 +01:00
Konrad Hanff
92b249e7b3 Reimplement scoring and create connection abstraction
Co-authored-by: Felix Auringer <felix.auringer@student.hpi.uni-potsdam.de>
2021-11-01 17:12:43 +01:00
Sebastian Serth
74e285e9fd Fix rubocop offenses 2021-10-05 12:09:56 +02:00
Ralf Teusner
a170f7bfc2 Throw exception on any error within Concurrent::Future
Co-authored-by: Sebastian Serth <Sebastian.Serth@hpi.de>
2021-08-05 23:17:06 +02:00
Ralf Teusner
3840b45f8a Revert "Revert "Use switch_locale instead of I18n.with_locale directly""
This reverts commit 2c08e270e7.

Co-authored-by: Sebastian Serth <Sebastian.Serth@hpi.de>
2021-08-05 23:17:06 +02:00
Ralf Teusner
2c08e270e7 Revert "Use switch_locale instead of I18n.with_locale directly"
This reverts commit 125c342f35.
2021-08-05 11:55:54 +02:00
Sebastian Serth
125c342f35 Use switch_locale instead of I18n.with_locale directly 2021-07-26 12:01:25 +02:00
Sebastian Serth
448b5e4a7a Use current_locale for "not_graded" hint 2021-07-22 10:23:57 +02:00
Sebastian Serth
7010614a75 Re-enable translation of linter messages 2021-06-28 22:11:00 +02:00
Sebastian Serth
d08707f62e Fix switch_locale to return the block result 2021-06-28 16:08:24 +02:00
Sebastian Serth
7b4a487530 Localize exercises.implement.not_graded 2021-06-11 22:23:09 +02:00
Sebastian Serth
5243808d54 Apply automatic rubocop fixes 2021-05-17 19:40:38 +02:00
Sebastian Serth
da0a682ffb Apply manual rubocop fixes 2021-05-14 22:03:06 +02:00
Sebastian Serth
6cbecb5b39 Apply automatic rubocop fixes 2021-05-14 22:03:06 +02:00
Sebastian Serth
48904a19fd Fix test for new custom file 2021-05-14 17:35:37 +02:00