Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
c02c628
E2551: Integrate SubmittedContentController
aasthagaudani Oct 21, 2025
68db467
Updated submitted_content_controller, assignment_participant, and tes…
aasthagaudani Oct 21, 2025
36e09f6
standardize HTTP status codes across SubmittedContentController
aasthagaudani Oct 24, 2025
3406b63
improve error messages across SubmittedContentController
aasthagaudani Oct 24, 2025
79cbec9
refactor: reduce instance vars + add inline docs
aasthagaudani Oct 26, 2025
d166ffe
refactor: add inline docs to helper and update tests
aasthagaudani Oct 26, 2025
adf7acf
Creating TeamsParticipant entry for checking download action
Oct 27, 2025
dc55c54
Merge pull request #1 from aasthagaudani/fix-download-action-test-cases
aasthagaudani Oct 28, 2025
7c7bcdd
refactor: fix Law of Demeter violations and FileHelper consistency
aasthagaudani Oct 28, 2025
753821f
add list_files endpoint and directory_num migration
aasthagaudani Oct 28, 2025
4356b22
Fix download test failures by removing duplicate before(:all) blocks
aasthagaudani Oct 29, 2025
bd0410a
Moving apis and routes out of api/v1
Nov 14, 2025
ec19b93
Renaming function name from check_content_size to is_file_small_enough
Nov 14, 2025
08a788d
Remove use of chk_files name
Nov 14, 2025
ac5bc5c
Refactoring api/v1 route usages
Nov 14, 2025
d0aaa6f
Using parent_id instead of assignment_id; Fixing test cases
Nov 27, 2025
77e2b1c
Fixing submit_file test cases
Nov 28, 2025
9c95e88
Updating swagger to add all submitted_content endpoints
Nov 28, 2025
f03060f
Fix SubmittedContent endpoints: file upload, download, and folder cre…
aasthagaudani Dec 3, 2025
11c07a8
E2561 Added methods for UI callback
raghavtk Dec 3, 2025
9efeb59
Fix SubmittedContent bugs: paths, FileHelper, Swagger params
aasthagaudani Dec 6, 2025
5bc9d60
Code quality improvements: add constants, improve comments, rename st…
aasthagaudani Dec 6, 2025
7b47e7a
Remove pg_data from git tracking, add to gitignore
aasthagaudani Dec 6, 2025
41f68ed
Rename submission parameter to submit_link in submit_hyperlink
aasthagaudani Dec 6, 2025
c17a57b
Rename check_extension_integrity to valid_file_extension?
aasthagaudani Dec 6, 2025
6d1413b
Replace sanitize with clean for folder and filename methods
aasthagaudani Dec 6, 2025
c07ec9b
Improve disk space error to show available space
aasthagaudani Dec 6, 2025
20f2da0
Use FileUtils library directly for folder operations
aasthagaudani Dec 6, 2025
db88db6
Use rubyzip library directly instead of custom wrapper
aasthagaudani Dec 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@
/config/master.key
coverage/
rsa_keys.yml
pg_data/
5 changes: 4 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ruby '3.4.5'

gem 'mysql2', '~> 0.5.7'
gem 'sqlite3', '~> 1.4' # Alternative for development
gem 'puma', '~> 5.0'
gem 'puma', '~> 6.0'
gem 'rails', '~> 8.0', '>= 8.0.1'
gem 'mini_portile2', '~> 2.8' # Helps with native gem compilation
gem 'observer' # Required for Ruby 3.4.5 compatibility with Rails 8.0
Expand Down Expand Up @@ -55,6 +55,9 @@ gem 'lingua'
# This is a really small gem that can be used to retrieve objects from the database in the order of the list given
gem 'find_with_order'

# For handling zip file uploads and extraction
gem 'rubyzip'


group :development, :test do
gem 'debug', platforms: %i[mri mingw x64_mingw]
Expand Down
38 changes: 35 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ GEM
term-ansicolor
thor
crass (1.0.6)
csv (3.3.5)
danger (9.5.3)
base64 (~> 0.2)
claide (~> 1.0)
Expand All @@ -128,6 +129,7 @@ GEM
debug (1.11.0)
irb (~> 1.10)
reline (>= 0.3.8)
delegate (0.4.0)
diff-lcs (1.6.2)
docile (1.4.1)
domain_name (0.6.20240107)
Expand All @@ -149,8 +151,11 @@ GEM
faraday (>= 0.8)
faraday-net_http (3.4.1)
net-http (>= 0.5.0)
faraday-retry (2.3.2)
faraday (~> 2.0)
find_with_order (1.3.1)
activerecord (>= 3)
forwardable (1.3.3)
git (2.3.3)
activesupport (>= 5.0)
addressable (~> 2.8)
Expand Down Expand Up @@ -197,10 +202,13 @@ GEM
mime-types-data (~> 3.2025, >= 3.2025.0507)
mime-types-data (3.2025.0924)
mini_mime (1.1.5)
mini_portile2 (2.8.9)
minitest (5.25.5)
mize (0.6.1)
monitor (0.2.0)
msgpack (1.8.0)
multi_json (1.17.0)
mutex_m (0.3.0)
mysql2 (0.5.7)
bigdecimal
nap (1.1.0)
Expand All @@ -217,7 +225,7 @@ GEM
net-protocol
netrc (0.11.0)
nio4r (2.5.9)
nokogiri (1.15.2-aarch64-linux)
nokogiri (1.18.10-aarch64-linux-gnu)
racc (~> 1.4)
nokogiri (1.18.10-arm64-darwin)
racc (~> 1.4)
Expand All @@ -230,6 +238,7 @@ GEM
faraday (>= 1, < 3)
sawyer (~> 0.9)
open4 (1.3.4)
ostruct (0.6.3)
parallel (1.27.0)
parser (3.3.9.0)
ast (~> 2.4.1)
Expand Down Expand Up @@ -346,10 +355,12 @@ GEM
parser (>= 3.3.7.2)
prism (~> 1.4)
ruby-progressbar (1.13.0)
rubyzip (3.2.0)
sawyer (0.9.2)
addressable (>= 2.3.5)
faraday (>= 0.17.3, < 3)
securerandom (0.4.1)
set (1.1.2)
shoulda-matchers (6.5.0)
activesupport (>= 5.2.0)
simplecov (0.22.0)
Expand All @@ -358,7 +369,10 @@ GEM
simplecov_json_formatter (~> 0.1)
simplecov-html (0.13.2)
simplecov_json_formatter (0.1.4)
singleton (0.3.0)
spring (4.4.0)
sqlite3 (1.7.3)
mini_portile2 (~> 2.8.0)
stringio (3.1.7)
sync (0.5.0)
term-ansicolor (1.11.3)
Expand Down Expand Up @@ -398,18 +412,30 @@ PLATFORMS
DEPENDENCIES
active_model_serializers (~> 0.10.0)
bcrypt (~> 3.1.7)
bigdecimal
bootsnap (>= 1.18.4)
coveralls
csv
danger
database_cleaner-active_record
date
debug
delegate
factory_bot_rails
faker
faraday-retry
find_with_order
forwardable
jwt (~> 2.7, >= 2.7.1)
lingua
mysql2 (~> 0.5.5)
logger
mini_portile2 (~> 2.8)
monitor
mutex_m
mysql2 (~> 0.5.7)
observer
ostruct
psych (~> 5.2)
puma (~> 6.0)
rack-cors
rails (~> 8.0, >= 8.0.1)
Expand All @@ -418,14 +444,20 @@ DEPENDENCIES
rswag-specs
rswag-ui
rubocop
rubyzip
set
shoulda-matchers
simplecov
simplecov_json_formatter
singleton
spring
sqlite3 (~> 1.4)
timeout
tzinfo-data
uri

RUBY VERSION
ruby 3.2.7p253
ruby 3.4.5p51

BUNDLED WITH
2.4.14
6 changes: 6 additions & 0 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# frozen_string_literal: true

# Ensure concerns are loaded before including
require_relative 'concerns/authorization'
require_relative 'concerns/jwt_token'
require_relative '../helpers/submitted_content_helper'
require_relative '../helpers/file_helper'

class ApplicationController < ActionController::API
include Authorization
include JwtToken
Expand Down
49 changes: 48 additions & 1 deletion app/controllers/assignments_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,54 @@ def varying_rubrics_by_round?
private
# Only allow a list of trusted parameters through.
def assignment_params
params.require(:assignment).permit(:title, :description)
params.require(:assignment).permit(
:name,
:title,
:description,
:directory_path,
:spec_location,
:private,
:show_template_review,
:require_quiz,
:has_badge,
:staggered_deadline,
:is_calibrated,
:has_teams,
:max_team_size,
:show_teammate_review,
:is_pair_programming,
:has_mentors,
:has_topics,
:review_topic_threshold,
:maximum_number_of_reviews_per_submission,
:review_strategy,
:review_rubric_varies_by_round,
:review_rubric_varies_by_topic,
:review_rubric_varies_by_role,
:has_max_review_limit,
:set_allowed_number_of_reviews_per_reviewer,
:set_required_number_of_reviews_per_reviewer,
:is_review_anonymous,
:is_review_done_by_teams,
:allow_self_reviews,
:reviews_visible_to_other_reviewers,
:number_of_review_rounds,
:days_between_submissions,
:late_policy_id,
:is_penalty_calculated,
:calculate_penalty,
:use_signup_deadline,
:use_drop_topic_deadline,
:use_team_formation_deadline,
:use_date_updater,
:submission_allowed,
:review_allowed,
:teammate_allowed,
:metareview_allowed,
weights: [],
notification_limits: [],
reminder: []
)
end

# Helper method to determine staggered_and_no_topic for the assignment
Expand Down
Loading