-
Notifications
You must be signed in to change notification settings - Fork 7
Auto extended requests #306
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
cycomachead
merged 20 commits into
berkeley-cdss:main
from
cs169:auto-extended-requests
Mar 17, 2026
Merged
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
06fda77
Some local changes for development
gobears01 ae372e1
Added UI for new approve extended extensions switch
gobears01 d8ece10
Add two API endpoints for fixing assignment due dates
cycomachead 87681cf
Updated backend when using' Approved Extended Requests?' toggle
gobears01 e00f0ee
Merge pull request #313 from cs169/add-new-api-scopes
noahnizamian 81ba7f2
Finished the course settings and approval logic for dsp
gobears01 2400723
undo changes to Ruby version
gobears01 9ab1d1f
Reverted development changes to Gemfile
gobears01 657e5b9
Fixed sync enrollments error where users were getting recreated and m…
gobears01 36e9c4b
Add tests for enrollments-to-requests search filter
alxstx c47968d
Add step definitions and test data for enrollments-to-requests
alxstx 8255280
Add
alxstx f700f0e
Added rspec and cucumber testing for DSP auto requests
gobears01 2f2d7e6
Add missing tests and fix minor issues for auto extended requests
ba88im bed1e14
Merge pull request #319 from cs169/basim/review-auto-extended-requests
gobears01 e37eb6d
Merge pull request #316 from cs169/data-search-query-branch
gobears01 bddf989
Addressing comments on pull request
gobears01 1941690
Update tests for students missing enrollment
gobears01 94b9d71
Merge branch 'main' into auto-extended-requests
gobears01 fcf38f1
Added the changes per prof Ball requests
gobears01 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| class UserToCoursesController < ApplicationController | ||
| before_action :authenticate_user | ||
| before_action :set_course | ||
| before_action :ensure_course_admin | ||
|
|
||
| def toggle_allow_extended_requests | ||
| @enrollment = @course.user_to_courses.find(params[:id]) | ||
|
|
||
| if @enrollment.update(allow_extended_requests: params[:allow_extended_requests]) | ||
| render json: { success: true }, status: :ok | ||
| else | ||
| flash[:alert] = "Failed to update enrollment: #{@enrollment.errors.full_messages.to_sentence}" | ||
| render json: { redirect_to: course_path(@course) }, status: :unprocessable_entity | ||
| end | ||
| end | ||
|
|
||
| private | ||
|
|
||
| def ensure_course_admin | ||
| enrollment = @course.user_to_courses.find_by(user: @user) | ||
| return if enrollment&.course_admin? | ||
|
|
||
| render json: { error: 'You must be an instructor or Lead TA.', redirect_to: course_path(@course) }, status: :forbidden | ||
| end | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fine for now, though if we do more AJAX-y things, I think we should write some
fetchWithTokenmethod or something that shared this logic.