542 Commits

Author SHA1 Message Date
90897a24e5 Correctly set hidden_feedback for inherited files
Without this fix, hidden_feedback was only effective when read_only was set, too.
2024-07-08 17:58:46 +02:00
4e1e8c0f4d Fix Rubocop offenses 2024-06-17 15:07:04 +02:00
f8330b39fb Replace manual activerecord translations with helpers 2024-05-21 19:42:26 +02:00
c4b7bac6c7 Fix NameError on block forward
This is a regression from 27f128ad.

Fixes CODEOCEAN-12R
2024-04-24 17:54:25 +02:00
7cc4fb00c6 RfCs: Allow filtering for any states
We want to differentiate between those RfCs explicitly marked as solved, those potentially solved since the author reached the maximum score, and those being unsolved where the author has not yet reached the full score yet.
2024-04-24 12:18:47 +02:00
27f128ad2d Fix Rubocop offenses 2024-04-18 08:28:46 +02:00
dab8f777b3 Extract Contributor concern as abstract class
During documentation of the pair programming feature, we noticed that the Contributor should be an abstract class, which is parent for the User and the ProgrammingGroup. With this commit, we perform these changes.
2024-04-02 16:56:49 +02:00
117d3366ad fix kramdown using curved quotes and replace them with straight quotation marks 2024-03-14 17:03:00 +01:00
04863f1f25 Update Ruby to 3.3 2024-01-19 12:49:00 +01:00
9a280615c5 Fix downloading runner files
Fixes a regression introduced with 8fc5123b
2024-01-19 11:06:40 +01:00
d9381657f7 Add user_exercise_interventions to ProgrammingGroups
This is a regression from 1bb61f73
2024-01-19 11:06:40 +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
a3dbd3dd27 Fix missing testrun log output
This is regression for a6f64c83
2024-01-09 01:27:58 +01:00
34c322f8c0 Fix Rubocop offenses 2023-12-25 14:02:41 +01:00
5b654debbe Fix Rubocop offenses 2023-12-12 10:40:45 +01:00
768eb53f7a Reduce SQL queries for tag_statistics
Fixes CODEOCEAN-YP
2023-12-09 00:37:43 +01:00
1bb61f73fe Enable interventions for ProgrammingGroups and add indices 2023-12-08 21:33:06 +01:00
bcb6409126 Bump rubocop from 1.57.2 to 1.58.0 and fix offenses
Bumps [rubocop](https://github.com/rubocop/rubocop) from 1.57.2 to 1.58.0.
- [Release notes](https://github.com/rubocop/rubocop/releases)
- [Changelog](https://github.com/rubocop/rubocop/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop/rubocop/compare/v1.57.2...v1.58.0)

---
updated-dependencies:
- dependency-name: rubocop
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-07 11:02:00 +01:00
a6f64c83a0 Reduce SQL queries for external user statistics
Fixes CODEOCEAN-100
Fixes CODEOCEAN-YN
Fixes CODEOCEAN-10H
2023-12-05 20:57:55 +01:00
e9f099d59f Properly nest UserExerciseFeedback
Fixes CODEOCEAN-108
2023-11-23 14:42:10 +01:00
3b05a44b9e Allow programming groups to score exercises remotely 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
9b705fd538 Remove erroneous validation from CommunitySolution 2023-11-23 14:42:10 +01:00
ed7a3c848f Hide reference implementations if another file with same name is already present 2023-11-20 23:16:48 +01:00
4537f2bf75 Allow viewing submissions without corresponding exercise
Fixes CODEOCEAN-S7
2023-11-06 00:24:51 +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
6ba567a903 Add role checks for ProgrammingGroup
So far, a programming group is always considered to be a learner. While we could, technically, consider it to be a teacher or an admin if all members have this role, this behaviour might have unintended side effects.
2023-10-31 00:39:06 +01:00
bbee854002 Allow RfC index action for exercises to be nested 2023-10-23 18:17:42 +02:00
5ecde8c8bd Generalize breadcrumbs for nested resources
* Make programming groups breadcrumb navigation clickable
2023-10-23 18:17:42 +02:00
bf8f7b471c Keep existing programming group memberships during update 2023-10-23 18:17:42 +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
f1ca5da44d Customize to_s method for feedback 2023-10-22 12:07:41 +02:00
f7e3979e79 Set bonus points for survey via LTI parameter 2023-10-22 12:07:41 +02:00
26552a0682 Remove PairProgrammingExerciseFeedback
* Remove view, controller, routes & policy for PairProgrammingExerciseFeedback
* Keep model & database table
2023-10-22 12:07:41 +02:00
67f19516c3 Add internal title for exercise
The internal title is designed to provide an alternative title for teachers. It is not exposed to learners.
2023-10-14 00:30:32 +02:00
684639696d Reduce SQL queries in the study groups controller
Fixes CODEOCEAN-Y7
2023-09-25 22:15:27 +02:00
0e387ffda2 Add association for Comments and RequestForComments
For the submission and comments, I mainly decided to use a `has_one` association. Based on the database schema, multiple request for comments could be allowed (i.e., for each file or submission), but this won't happen practically (since we always create new submissions and files). Hence, the `has_one` association is representing our relationship better.
2023-09-25 18:17:52 +02:00
bd1090be31 Store whether learners were manually invited to a programming group 2023-09-21 18:55:24 +02:00
9f837412c7 Add waiting room to create programming groups (#1919)
Co-authored-by: Sebastian Serth <Sebastian.Serth@hpi.de>
2023-09-21 15:07:10 +02:00
b77c98b03f Add missing has_many associations for Users 2023-09-21 11:27:12 +02:00
51fc44c2da Allow empty lines for current_content event
Fixes CODEOCEAN-VR
2023-09-19 22:32:14 +02:00
1102db9f02 Fix wrong validation of main file count
Previously, we were always issuing a database query, so that only those files already stored in the database were counted.
2023-09-16 16:19:31 +02:00
49e3fa6176 Add events for current_content and connection_status 2023-09-13 17:50:19 +02:00
13bd68d760 Fix consumer in page context of programming group 2023-09-12 18:48:59 +02:00
cc90861bd5 Generate Session ID on server for synchronized editor
This change allows us to use the session ID immediately for the connection_change and connection_status methods. Hence, we can identify different browser sessions of the same user.
2023-09-12 18:47:06 +02:00
735a74901f Update ACE Editor to version 1.2.0
Previously, we were at an ACE editor published between 1.1.8 and 1.1.9. This caused multiple issues and was especially a problem for the upcoming pair programming feature. Further, updating ace is a long-time priority, see https://github.com/openHPI/codeocean/issues/250.

Now, we are not yet updating to the latest version, but rather to the next minor version. This already contains breaking changes, and we are currently interested to keep the number of changes as low as possible. Further updating ACE might be still a future task.

The new ACE version 1.2.0 is taken from this tag: https://github.com/ajaxorg/ace-builds/releases/tag/v1.2.0.
We are using the src build (not minified, not in the noconflict version), since the same was used before as well.

Further, we need to change our migration for storing editor events. Since the table is not yet used (in production), we also update the enum.
2023-09-12 16:41:33 +02:00
883169121c Provide current-contributor application-wide
* This change allows us to reuse the current user in multiple places.
2023-09-11 14:43:00 +02:00
c29256aa81 Fix Rubocop offenses 2023-09-11 14:10:16 +02:00
5f99e7ee54 Store Session ID for Event::SynchronizedEditor 2023-09-08 11:48:53 +02:00
5dd6df9418 Synchronized Editor: Store all events and allow multiple tabs
* This commit refactors the table used to store events.
* We also use a UUID as session identifier in the synchronized editor to support multiple concurrent tabs opened by the same user.
* Further, we renamed some methods to make them easier to distinguish.
2023-09-08 11:48:53 +02:00