Commit Graph

162 Commits

Author SHA1 Message Date
Sebastian Serth
8fd5829110 Use render_host for download_submission_file 2024-01-19 11:06:40 +01:00
Sebastian Serth
e9f099d59f Properly nest UserExerciseFeedback
Fixes CODEOCEAN-108
2023-11-23 14:42:10 +01:00
kiragrammel
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
kiragrammel
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
kiragrammel
26552a0682 Remove PairProgrammingExerciseFeedback
* Remove view, controller, routes & policy for PairProgrammingExerciseFeedback
* Keep model & database table
2023-10-22 12:07:41 +02:00
Sebastian Serth
47dd4cf4f7 Further check for programming group and add custom logging
Fixes CODEOCEAN-V2
2023-09-22 16:54:54 +02:00
Sebastian Serth
1bd0cd9a56 Require programming group for streaming the editor
Potentially fixes CODEOCEAN-V2
2023-09-20 23:31:54 +02:00
kiragrammel
4b90a2a3c5 Add exercise feedback page for pair programming study 2023-09-05 22:56:51 +02:00
kiragrammel
89afb599e4 Apply changes from team members in own editor 2023-08-26 00:38:58 +02:00
kiragrammel
01accdae58 Use author_in_programming_group? policy for files & RfCs
* Allow all members of a programming group to list and solve RfCs
* Also adjust policy specs to respect programming groups
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
Sebastian Serth
28a4b672f9 Remove legacy save search endpoint 2023-07-28 13:18:39 +02:00
Sebastian Serth
e097036296 Fix RfC Visibility to work as intended
The RfC Visibility of a consumer is intended to restrict who can access which RfCs. So far, those restrictions were only applied one way, for learners of a restricted consumer to view other (external) RfCs. However, the other way around should also work: If a RfC was created as part of a restricted consumer, no other external user should be able to interfere with this RfC. This commit, therefore, adds this direction as well and covers both directions with tests.
2023-07-13 11:02:10 +02:00
Sebastian Serth
a7cd85507e Reduce SQL queries in the exercise controller
Fixes CODEOCEAN-JK
2023-03-14 20:58:21 +01:00
Sebastian Serth
d0b713ddcd Dramatically improve RfC query
While the code gets more complex, the new query will first filter all relevant RfCs and only use the `with_last_activity` scope for the current page.

Using `distinct` in the policy is not required (no duplicated RfCs), but causes issues for the ordering otherwise. Therefore, it is removed.

Fixes CODEOCEAN-J2
2023-02-21 01:27:32 +01:00
Sebastian Serth
34c387c6a1 Remove outdated methods from RequestForCommentPolicy 2023-02-20 23:47:06 +01:00
Sebastian Serth
76f592c88d Consider RfC visibility to view / change RfCs 2023-02-20 23:47:06 +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
234a4fe02b Deny /implement without execution environment
Also, fix a smaller typo in the locales
2023-01-20 23:53:08 +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
97ee38082c Handle deleted exercise in FilePolicy
Fixes CODEOCEAN-DZ
2022-10-06 00:10:25 +02:00
Sebastian Serth
16c00ec136 Add support for signed URLs used by the render_file function 2022-09-23 21:35:22 +02:00
Sebastian Serth
5881795d5f Memorize config options instead of reading them from file over and over again 2022-09-23 21:35:22 +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
02c65af034 Update scope query for new teacher definition 2022-09-22 19:24:26 +02:00
Sebastian Serth
964048927a Updated teacher_in_study_group? method to check for common teacher role 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
bf13cfc712 Delete outdated search_policy.rb 2022-09-22 19:24:26 +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
b67daedfc9 Remove dead code from ProxyExercise 2022-09-04 00:05:38 +02:00
Sebastian Serth
49f4f0e6c5 Refactor exercise_controller and move more checks to policy
* We introduce a custom handler for Pundit::NotAuthorizedError
2022-09-04 00:05:13 +02:00
Sebastian Serth
f4d350577a Fix exercise search for teachers 2022-08-24 23:39:42 +02:00
Janis4411
e0c2c7b806 Hide score button if exercise has no tests
We check for all teacher-defined assessments (linter and unit tests) to determine whether scoring should be possible
2022-08-22 17:51:57 +02:00
Sebastian Serth
2141fdb1ac Refactor external_user_statistics to own controller action 2022-07-22 13:19:22 +02:00
Sebastian Serth
9a0f26a84f Allow admins and teachers to remove explicit RfC text 2022-04-28 15:31:58 +02:00
Sebastian Serth
3cd2be01de Include hidden exercises for other teachers of the same study group 2022-04-13 21:17:55 +02:00
Sebastian Serth
8535cd9a9c Add option to sync single execution environment 2021-12-09 16:44:05 +01:00
Sebastian Serth
da4e10b990 Add CommunitySolution
* Also slightly refactor some JS files
2021-11-23 01:38:31 +01:00
Sebastian Serth
288c7693f7 Remove dump_docker method for admins 2021-11-01 17:13:08 +01:00
Sebastian Serth
30603cb7ab Generalize method and constant names for runner management 2021-11-01 17:12:53 +01:00
Konrad Hanff
598de3bcff Add button to synchronize all execution environments
This adds a button to the execution environment index page that, when
clicked, causes all execution environments to be synchronized to the
runner management (Poseidon) by creating or replacing them.

CodeOcean does not synchronize it's execution environments on startup or
when a new runner management configuration is used for the first time.
The administrator has to manually start this process by pressing this
button.

The equivalent for syncing just one execution environment is updating
it.
2021-11-01 17:12:49 +01:00
Sebastian Serth
74e285e9fd Fix rubocop offenses 2021-10-05 12:09:56 +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
Tobias Kantusch
40d83dbb1d Fix access to exercise-specific RfC listing 2021-04-07 14:06:32 +02:00
Sebastian Serth
8ebe59b692 Revert changes for Python20 fishbowl experiment
* Show all RfCs again, even those with #loesung
2021-03-08 23:15:58 +01:00
Sebastian Serth
293bcccc80 Introduce new enabled option for CodeHarbor
* Fix tests to ensure they work independent of config option
2021-02-16 14:29:54 +01:00
Sebastian Serth
3b58cadbeb Improve performance for study_group_policy.rb 2021-01-23 00:25:54 +01:00