Skip to content

Commit

Permalink
Merge branch 'master' into joeywildman-ruby3.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
20wildmanj committed Jan 3, 2024
2 parents 9d2fa1a + a53d148 commit 8496aab
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Autolab
Submodule Autolab updated 41 files
+2 −2 .github/workflows/rubyonrails.yml
+6 −3 Gemfile
+228 −194 Gemfile.lock
+2 −0 app/controllers/api/v1/assessments_controller.rb
+535 −532 app/controllers/assessment/grading.rb
+4 −8 app/controllers/assessment/handin.rb
+2 −0 app/controllers/assessment/handout.rb
+2 −4 app/controllers/assessments_controller.rb
+1 −1 app/controllers/courses_controller.rb
+1 −1 app/controllers/groups_controller.rb
+1 −1 app/controllers/submissions_controller.rb
+3 −3 app/helpers/assessment_handin_core.rb
+6 −5 app/models/assessment.rb
+1 −1 app/models/assessment_user_datum.rb
+5 −5 app/models/course.rb
+1 −1 app/models/score.rb
+4 −4 app/models/submission.rb
+3 −3 app/views/assessments/show.html.erb
+6 −0 app/views/assessments/statistics.html.erb
+6 −1 app/views/assessments/viewGradesheet.html.erb
+6 −4 app/views/gradebooks/view.html.erb
+3 −5 app/views/layouts/application.html.erb
+3 −2 bin/rails
+3 −2 bin/rake
+3 −3 bin/setup
+14 −0 bin/spring
+4 −2 config.ru
+5 −5 config/application.rb
+1 −1 config/boot.rb
+1 −1 config/environment.rb
+17 −3 config/environments/development.rb
+13 −1 config/environments/test.rb
+4 −3 config/initializers/backtrace_silencers.rb
+1 −1 config/initializers/filter_parameter_logging.rb
+67 −0 config/initializers/new_framework_defaults_6_1.rb
+11 −0 config/initializers/permissions_policy.rb
+2 −2 config/routes.rb
+22 −0 db/migrate/20240101084756_add_service_name_to_active_storage_blobs.active_storage.rb
+27 −0 db/migrate/20240101084757_create_active_storage_variant_records.active_storage.rb
+17 −10 db/schema.rb
+1 −1 spec/controllers/courses_controller_spec.rb
23 changes: 21 additions & 2 deletions nginx/app.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,35 @@ server {

ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

# Set max client body size for assessments and autograders
# regex matches one or more alpha-numeric characters and the hyphen '-'
# Increase max client body size for upload routes
# [\w|-]+ regex matches one or more alpha-numeric characters and the hyphen '-'

# Import assessment from tarball
location ~* /courses/[\w|-]+/assessments/importAsmtFromTar {
client_max_body_size 1G;
}

# Autograder files (Makefile / Tar)
location ~* /courses/[\w|-]+/assessments/[\w|-]+/autograder.\d+ {
client_max_body_size 1G;
}

# Course attachments
location ~* /courses/[\w|-]+/attachments {
client_max_body_size 1G;
}

# Assessment attachments
location ~* /courses/[\w|-]+/assessments/[\w|-]+/attachments {
client_max_body_size 1G;
}

# Assessment handin
location ~* /courses/[\w|-]+/assessments/[\w|-]+/handin {
client_max_body_size 1G;
}

# Docker image upload
location ~* /courses/[\w|-]+/dockers/uploadDockerImage {
client_max_body_size 10G;
}
Expand Down
41 changes: 30 additions & 11 deletions nginx/no-ssl-app.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,36 @@ server {
passenger_user app;
passenger_ruby /usr/bin/ruby3.2;

# Set max client body size for assessments and autograders
# regex matches one or more alpha-numeric characters and the hyphen '-'
location ~* /courses/[\w|-]+/assessments/importAsmtFromTar {
client_max_body_size 1G;
}
# Increase max client body size for upload routes
# [\w|-]+ regex matches one or more alpha-numeric characters and the hyphen '-'

location ~* /courses/[\w|-]+/assessments/[\w|-]+/autograder.\d+ {
client_max_body_size 1G;
}
# Import assessment from tarball
location ~* /courses/[\w|-]+/assessments/importAsmtFromTar {
client_max_body_size 1G;
}

location ~* /courses/[\w|-]+/dockers/uploadDockerImage {
client_max_body_size 10G;
}
# Autograder files (Makefile / Tar)
location ~* /courses/[\w|-]+/assessments/[\w|-]+/autograder.\d+ {
client_max_body_size 1G;
}

# Course attachments
location ~* /courses/[\w|-]+/attachments {
client_max_body_size 1G;
}

# Assessment attachments
location ~* /courses/[\w|-]+/assessments/[\w|-]+/attachments {
client_max_body_size 1G;
}

# Assessment handin
location ~* /courses/[\w|-]+/assessments/[\w|-]+/handin {
client_max_body_size 1G;
}

# Docker image upload
location ~* /courses/[\w|-]+/dockers/uploadDockerImage {
client_max_body_size 10G;
}
}

0 comments on commit 8496aab

Please sign in to comment.