Commit Graph

469 Commits

Author SHA1 Message Date
Sebastian Serth
5a36e57b9f Reuse ActiveRecord object after creating StructuredErrorAttributes
With these changes, the newly created StructuredError will have all StructuredErrorAttributes preloaded, thus speeding up further access to this association.
2023-03-20 23:43:53 +01:00
Sebastian Serth
a7cd85507e Reduce SQL queries in the exercise controller
Fixes CODEOCEAN-JK
2023-03-14 20:58:21 +01:00
Sebastian Serth
417ead3d3f Reduce SQL queries to find a unsolved recommended RfC
Fixes CODEOCEAN-JQ
2023-03-14 13:56:23 +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
d03f2c7bf4 Slightly improve Statistics Controller performance 2023-02-21 01:27:32 +01:00
Sebastian Serth
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
Sebastian Serth
e632f95060 Prevent storing empty results
Fixes CODEOCEAN-HS
2023-02-17 18:13:48 +01:00
Sebastian Serth
e96eda69d7 Bulk insert LinterCheckRuns
Similar to TestrunMessages, we insert all linter check runs through a bulk operation, potentially reducing time.
2023-02-16 10:50:01 +01:00
Sebastian Serth
b375aed543 Bulk insert TestrunMessages
With Sentry, we identified that all TestrunMessages are created one-by-one (besides passing them all in an array to #create!). Therefore, we now do the validations on our own first and then store all once, dramatically reducing the required time.

Fixes CODEOCEAN-HP
2023-02-16 10:50:01 +01:00
Karol
90d713a1d4 fix (potential) problems with empty file_extensions 2023-02-09 18:42:24 +01:00
Karol
637f872f34 add file_extension validation for file_type 2023-02-09 18:42:24 +01:00
Sebastian Serth
04504973ba Adjust Sentry's user context 2023-02-03 00:16:52 +01:00
Sebastian Serth
2679f5fa56 Allow random selection for ProxyExercise 2023-01-20 21:02:20 +01:00
Sebastian Serth
5d02251cbb Replace BooleanPresenceValidator with InclusionValidator
The `BooleanPresenceValidator` is causing issues with Ruby 3.2+ YJIT irregularly.

Fixes CODEOCEAN-GQ, fixes CODEOCEAN-GR
2023-01-08 14:10:14 +01:00
Sebastian Serth
922ba5df4e Fix rubocop offenses 2023-01-02 10:06:00 +01:00
Sebastian Serth
7a2e442d91 Reject reference implementations only for Runs 2022-12-12 20:53:46 +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
b7a3fd4586 Refactor exercise statistics to use convert times in Ruby 2022-12-05 21:59:34 +01:00
Sebastian Serth
574e99eddd Fix rubocop offenses - Requires Ruby 3.1+ 2022-11-25 11:10:06 +01:00
Sebastian Serth
f17718f69f CSP: Extract JavaScript from layout to assets
Fixes CODEOCEAN-CP
2022-11-16 19:47:58 +01:00
Sebastian Serth
d50e6d30e9 List Files: Catch more Runner::Errors 2022-11-14 13:51:04 +01:00
Sebastian Serth
2753e4ef5b Always catch StandardError in Threads and release connection 2022-11-11 22:50:27 +01:00
Sebastian Serth
cf957eb715 Prevent reference_implementation to be copied to Runner 2022-11-04 17:30:30 +01:00
Sebastian Serth
58548555a5 Shell: Add file system browser to retrieve arbitrary files 2022-10-29 18:49:18 +02:00
Sebastian Serth
60078701f5 Editor: Allow file retrieval after code run 2022-10-29 18:49:18 +02:00
Sebastian Serth
ad8743a7d0 FileTree: Show more distinct icons where possible 2022-10-29 18:49:18 +02:00
Sebastian Serth
ef5dd80ea7 Increase wait timeout for new execution environments to 60 sec 2022-10-11 21:14:07 +02:00
Sebastian Serth
66ab00a6bd Fix association to testrun_execution_environment 2022-10-11 21:08:34 +02:00
Sebastian Serth
d80a8dd64f Fix Submissions index page
Closes CODEOCEAN-BJ
2022-10-11 20:21:13 +02:00
Sebastian Serth
065f93f79c Return empty programming language if no ACE mode is set 2022-10-06 00:25:22 +02:00
Sebastian Serth
4f5f71840a Change order of tests to execute linter checks first 2022-10-05 19:38:38 +02:00
Sebastian Serth
42a7bf9983 Remove outdated enums for testrun_message
These enums are not present in the database.
2022-10-04 16:07:00 +02:00
Sebastian Serth
ca13ea03c8 SubmissionsController: Send Content-Length if possible 2022-10-04 16:06:59 +02:00
Sebastian Serth
f53c6cb3ee Shell: Add toggle to execute command as root 2022-10-04 16:06:58 +02:00
Sebastian Serth
4b00eb1e8c Allow internal users to switch their current study group 2022-09-26 16:30:54 +02:00
Sebastian Serth
eb188dcd71 Add privilegedExecution flag to database and Poseidon Strategy 2022-09-24 22:32:41 +02:00
Sebastian Serth
0e7c38657f Allow teachers to access internal users and manage them in their study groups 2022-09-22 19:24:26 +02:00
Sebastian Serth
ac3dc8d30f Allow platform admins and internal users to switch their current study group 2022-09-22 19:24:26 +02:00
Sebastian Serth
4d2fe22daf Allow assignment of study groups for internal users 2022-09-22 19:24:26 +02:00
Janis Vaneylen
998a12e6bc Adjust filter for platform_admin user search and update views 2022-09-22 19:24:26 +02:00
Sebastian Serth
936c11e31f Refactor authentication token for new study-group-based authorization 2022-09-22 19:24:26 +02:00
Sebastian Serth
cb1b163b30 Always create a default study group for new consumers 2022-09-22 19:24:26 +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
04ed45ea73 Migrate database and models for study-group-based authorization 2022-09-22 19:24:26 +02:00
Sebastian Serth
bbb791471b Remove AWS study 2022-09-21 18:57:12 +02:00
Sebastian Serth
d02a1eae81 Validate password strength for internal users 2022-09-14 12:19:25 +02:00
Sebastian Serth
0a16f589e9 Use X-Sendfile to transmit native files and handle file uploads 2022-09-06 01:21:40 +02:00
Sebastian Serth
1581d658ea Simplify user search for external teachers 2022-09-04 19:03:15 +02:00
Sebastian Serth
9050f02b7a Add additional test case for new CodeOcean::File#read method 2022-09-02 17:52:24 +02:00