diff --git a/Gemfile b/Gemfile index 6042ee2385..20fc1d6e1d 100644 --- a/Gemfile +++ b/Gemfile @@ -1,3 +1,4 @@ +# frozen_string_literal: true source 'https://rubygems.org' # For Windows devs diff --git a/Rakefile b/Rakefile index 43720cad95..526f8d6e87 100644 --- a/Rakefile +++ b/Rakefile @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Add your own tasks in files placed in lib/tasks ending in .rake, # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. diff --git a/app/controllers/components/course/duplication_component.rb b/app/controllers/components/course/duplication_component.rb index 12bf962c89..ea7e4933be 100644 --- a/app/controllers/components/course/duplication_component.rb +++ b/app/controllers/components/course/duplication_component.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Course::DuplicationComponent < SimpleDelegator include Course::ControllerComponentHost::Component diff --git a/app/controllers/course/assessment/skill_branches_controller.rb b/app/controllers/course/assessment/skill_branches_controller.rb index ec1beb1775..884772f6cf 100644 --- a/app/controllers/course/assessment/skill_branches_controller.rb +++ b/app/controllers/course/assessment/skill_branches_controller.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Course::Assessment::SkillBranchesController < Course::ComponentController load_and_authorize_resource :skill_branch, class: Course::Assessment::SkillBranch.name, through: :course, diff --git a/app/helpers/course/assessment/answer/programming_helper.rb b/app/helpers/course/assessment/answer/programming_helper.rb index 841451cccf..d7af43b540 100644 --- a/app/helpers/course/assessment/answer/programming_helper.rb +++ b/app/helpers/course/assessment/answer/programming_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Course::Assessment::Answer::ProgrammingHelper # Generates HTML with formatted code and annotations. # diff --git a/app/helpers/course/assessment/answer/programming_test_case_helper.rb b/app/helpers/course/assessment/answer/programming_test_case_helper.rb index 8c6087d523..d8ea0bf4df 100644 --- a/app/helpers/course/assessment/answer/programming_test_case_helper.rb +++ b/app/helpers/course/assessment/answer/programming_test_case_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Course::Assessment::Answer::ProgrammingTestCaseHelper # Get a hint message. Use the one from test_result if available, else fallback to the one from # the test case. diff --git a/app/jobs/course/assessment/closing_reminder_job.rb b/app/jobs/course/assessment/closing_reminder_job.rb index 318d02ed71..5dc689466a 100644 --- a/app/jobs/course/assessment/closing_reminder_job.rb +++ b/app/jobs/course/assessment/closing_reminder_job.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Course::Assessment::ClosingReminderJob < ApplicationJob rescue_from(ActiveJob::DeserializationError) do |_| # Prevent the job from retrying due to deleted records diff --git a/app/jobs/course/conditional/conditional_satisfiability_evaluation_job.rb b/app/jobs/course/conditional/conditional_satisfiability_evaluation_job.rb index 95b86dc70e..843b0d0040 100644 --- a/app/jobs/course/conditional/conditional_satisfiability_evaluation_job.rb +++ b/app/jobs/course/conditional/conditional_satisfiability_evaluation_job.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Course::Conditional::ConditionalSatisfiabilityEvaluationJob < ApplicationJob include TrackableJob diff --git a/app/jobs/course/video/closing_reminder_job.rb b/app/jobs/course/video/closing_reminder_job.rb index 7cf5bf8dfb..4f84a9410b 100644 --- a/app/jobs/course/video/closing_reminder_job.rb +++ b/app/jobs/course/video/closing_reminder_job.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Course::Video::ClosingReminderJob < ApplicationJob rescue_from(ActiveJob::DeserializationError) do |_| # Prevent the job from retrying due to deleted records diff --git a/app/models/concerns/course/discussion/post/ordering_concern.rb b/app/models/concerns/course/discussion/post/ordering_concern.rb index 1388682e2d..15d4b4b47f 100644 --- a/app/models/concerns/course/discussion/post/ordering_concern.rb +++ b/app/models/concerns/course/discussion/post/ordering_concern.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Course::Discussion::Post::OrderingConcern extend ActiveSupport::Concern diff --git a/app/models/concerns/course/discussion/topic/posts_concern.rb b/app/models/concerns/course/discussion/topic/posts_concern.rb index bcecde481c..f4018d5d92 100644 --- a/app/models/concerns/course/discussion/topic/posts_concern.rb +++ b/app/models/concerns/course/discussion/topic/posts_concern.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Course::Discussion::Topic::PostsConcern extend ActiveSupport::Concern include Course::Discussion::Post::OrderingConcern diff --git a/app/notifiers/course/achievement_notifier.rb b/app/notifiers/course/achievement_notifier.rb index 0a9e6379e1..ff98a5d16e 100644 --- a/app/notifiers/course/achievement_notifier.rb +++ b/app/notifiers/course/achievement_notifier.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Course::AchievementNotifier < Notifier::Base # To be called when user gained an achievement. def achievement_gained(user, achievement) diff --git a/app/notifiers/course/announcement_notifier.rb b/app/notifiers/course/announcement_notifier.rb index 58365e9fca..ace139b3c4 100644 --- a/app/notifiers/course/announcement_notifier.rb +++ b/app/notifiers/course/announcement_notifier.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Course::AnnouncementNotifier < Notifier::Base # To be called when an announcement is made. def new_announcement(user, announcement) diff --git a/app/notifiers/course/assessment/answer/comment_notifier.rb b/app/notifiers/course/assessment/answer/comment_notifier.rb index fae747696a..45dce96137 100644 --- a/app/notifiers/course/assessment/answer/comment_notifier.rb +++ b/app/notifiers/course/assessment/answer/comment_notifier.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Course::Assessment::Answer::CommentNotifier < Notifier::Base # To be called when user adds a post to a programming annotation. def annotation_replied(user, post) diff --git a/app/notifiers/course/assessment/submission_question/comment_notifier.rb b/app/notifiers/course/assessment/submission_question/comment_notifier.rb index dc93fee24f..5e086c6368 100644 --- a/app/notifiers/course/assessment/submission_question/comment_notifier.rb +++ b/app/notifiers/course/assessment/submission_question/comment_notifier.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Course::Assessment::SubmissionQuestion::CommentNotifier < Notifier::Base # To be called when user comments on an submission_question. def post_replied(user, post) diff --git a/app/notifiers/course/assessment_notifier.rb b/app/notifiers/course/assessment_notifier.rb index 258e7ad7f1..14cb7429e2 100644 --- a/app/notifiers/course/assessment_notifier.rb +++ b/app/notifiers/course/assessment_notifier.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Course::AssessmentNotifier < Notifier::Base # To be called when user attempted an assessment. def assessment_attempted(user, assessment) diff --git a/app/notifiers/course/forum/post_notifier.rb b/app/notifiers/course/forum/post_notifier.rb index a3572c674b..6be1220651 100644 --- a/app/notifiers/course/forum/post_notifier.rb +++ b/app/notifiers/course/forum/post_notifier.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Course::Forum::PostNotifier < Notifier::Base # To be called when user replied a forum post. def post_replied(user, post) diff --git a/app/notifiers/course/forum/topic_notifier.rb b/app/notifiers/course/forum/topic_notifier.rb index a55078f177..09fa56470c 100644 --- a/app/notifiers/course/forum/topic_notifier.rb +++ b/app/notifiers/course/forum/topic_notifier.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Course::Forum::TopicNotifier < Notifier::Base # To be called when user created a new forum topic. def topic_created(user, topic) diff --git a/app/notifiers/course/level_notifier.rb b/app/notifiers/course/level_notifier.rb index 2c34a1b91a..e733f25ff3 100644 --- a/app/notifiers/course/level_notifier.rb +++ b/app/notifiers/course/level_notifier.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Course::LevelNotifier < Notifier::Base # To be called when user reached a new level. def level_reached(user, level) diff --git a/app/notifiers/course/video_notifier.rb b/app/notifiers/course/video_notifier.rb index 40120b94fd..9a1614e2cd 100644 --- a/app/notifiers/course/video_notifier.rb +++ b/app/notifiers/course/video_notifier.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Course::VideoNotifier < Notifier::Base def video_attempted(user, video) create_activity(actor: user, object: video, event: :attempted). diff --git a/app/services/course/conditional/conditional_satisfiability_evaluation_service.rb b/app/services/course/conditional/conditional_satisfiability_evaluation_service.rb index c284c88575..f5802c0a0b 100644 --- a/app/services/course/conditional/conditional_satisfiability_evaluation_service.rb +++ b/app/services/course/conditional/conditional_satisfiability_evaluation_service.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Course::Conditional::ConditionalSatisfiabilityEvaluationService class << self # Evaluate the satifisability of the conditionals for the given course user diff --git a/app/services/course/conditional/satisfiability_graph_build_service.rb b/app/services/course/conditional/satisfiability_graph_build_service.rb index b236c308d3..bb3d19d806 100644 --- a/app/services/course/conditional/satisfiability_graph_build_service.rb +++ b/app/services/course/conditional/satisfiability_graph_build_service.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Course::Conditional::SatisfiabilityGraphBuildService class << self # Build and cache the satisfiability graph for the given course. diff --git a/app/services/course/video/reminder_service.rb b/app/services/course/video/reminder_service.rb index 857e22a03c..956d764448 100644 --- a/app/services/course/video/reminder_service.rb +++ b/app/services/course/video/reminder_service.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true class Course::Video::ReminderService class << self delegate :closing_reminder, to: :new diff --git a/app/views/attachments/_attachment_reference.json.jbuilder b/app/views/attachments/_attachment_reference.json.jbuilder index 0e82792942..24189d122d 100644 --- a/app/views/attachments/_attachment_reference.json.jbuilder +++ b/app/views/attachments/_attachment_reference.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.name attachment_reference.name json.path attachment_reference.path json.updater_name attachment_reference.updater.name diff --git a/app/views/attachments/create.json.jbuilder b/app/views/attachments/create.json.jbuilder index 02df25af9d..e4d115db39 100644 --- a/app/views/attachments/create.json.jbuilder +++ b/app/views/attachments/create.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.success !@attachment.nil? if @attachment diff --git a/app/views/course/achievement/achievements/_achievement.json.jbuilder b/app/views/course/achievement/achievements/_achievement.json.jbuilder index bf3292590f..c60d9a24bd 100644 --- a/app/views/course/achievement/achievements/_achievement.json.jbuilder +++ b/app/views/course/achievement/achievements/_achievement.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.attributes do json.(@achievement, :id, :title, :description, :published) json.badge do diff --git a/app/views/course/assessment/answer/multiple_responses/_multiple_response.json.jbuilder b/app/views/course/assessment/answer/multiple_responses/_multiple_response.json.jbuilder index bc197c507f..0d6fe9426d 100644 --- a/app/views/course/assessment/answer/multiple_responses/_multiple_response.json.jbuilder +++ b/app/views/course/assessment/answer/multiple_responses/_multiple_response.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.fields do json.questionId answer.question_id json.id answer.acting_as.id diff --git a/app/views/course/assessment/answer/programming/_programming.json.jbuilder b/app/views/course/assessment/answer/programming/_programming.json.jbuilder index f16a62764b..857d452764 100644 --- a/app/views/course/assessment/answer/programming/_programming.json.jbuilder +++ b/app/views/course/assessment/answer/programming/_programming.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true submission = answer.submission assessment = submission.assessment question = answer.question.specific diff --git a/app/views/course/assessment/answer/scribing/_scribing.json.jbuilder b/app/views/course/assessment/answer/scribing/_scribing.json.jbuilder index 928025ce15..d9b2dc7501 100644 --- a/app/views/course/assessment/answer/scribing/_scribing.json.jbuilder +++ b/app/views/course/assessment/answer/scribing/_scribing.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.scribing_answer do json.image_url attachment_reference_url(answer.question.actable.attachment_references[0]) json.user_id current_user.id diff --git a/app/views/course/assessment/answer/text_responses/_text_response.json.jbuilder b/app/views/course/assessment/answer/text_responses/_text_response.json.jbuilder index 024e8571c3..abf9a2b460 100644 --- a/app/views/course/assessment/answer/text_responses/_text_response.json.jbuilder +++ b/app/views/course/assessment/answer/text_responses/_text_response.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.fields do json.questionId answer.question_id json.id answer.acting_as.id diff --git a/app/views/course/assessment/answer/voice_responses/_voice_response.json.jbuilder b/app/views/course/assessment/answer/voice_responses/_voice_response.json.jbuilder index 50009bb060..119d6dc392 100644 --- a/app/views/course/assessment/answer/voice_responses/_voice_response.json.jbuilder +++ b/app/views/course/assessment/answer/voice_responses/_voice_response.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.fields do json.questionId answer.question_id json.id answer.acting_as.id diff --git a/app/views/course/assessment/answers/_answer.json.jbuilder b/app/views/course/assessment/answers/_answer.json.jbuilder index ae7225e5ed..7971ba2839 100644 --- a/app/views/course/assessment/answers/_answer.json.jbuilder +++ b/app/views/course/assessment/answers/_answer.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.id answer.id json.questionId answer.question_id json.createdAt answer.created_at diff --git a/app/views/course/assessment/assessments/_assessment_lesson_plan_item.json.jbuilder b/app/views/course/assessment/assessments/_assessment_lesson_plan_item.json.jbuilder index 23fee5ada2..52c2603e09 100644 --- a/app/views/course/assessment/assessments/_assessment_lesson_plan_item.json.jbuilder +++ b/app/views/course/assessment/assessments/_assessment_lesson_plan_item.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.partial! 'course/lesson_plan/items/item.json.jbuilder', item: item json.lesson_plan_item_type @assessment_tabs_titles_hash[item.tab_id] diff --git a/app/views/course/assessment/assessments/_edit.json.jbuilder b/app/views/course/assessment/assessments/_edit.json.jbuilder index 79d2188734..1e6ca6bb2e 100644 --- a/app/views/course/assessment/assessments/_edit.json.jbuilder +++ b/app/views/course/assessment/assessments/_edit.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.attributes do json.(@assessment, :id, :title, :description, :start_at, :end_at, :bonus_end_at, :base_exp, :time_bonus_exp, :published, :autograded, :show_private, :show_evaluation, :skippable, diff --git a/app/views/course/assessment/categories/_category.json.jbuilder b/app/views/course/assessment/categories/_category.json.jbuilder index aff81f6421..0c7e6c8201 100644 --- a/app/views/course/assessment/categories/_category.json.jbuilder +++ b/app/views/course/assessment/categories/_category.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.(category, :id, :title, :weight) json.tabs do diff --git a/app/views/course/assessment/categories/index.json.jbuilder b/app/views/course/assessment/categories/index.json.jbuilder index bf1d5d7665..1b446f1c02 100644 --- a/app/views/course/assessment/categories/index.json.jbuilder +++ b/app/views/course/assessment/categories/index.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.categories do json.partial! 'category.json', collection: @categories, as: :category end diff --git a/app/views/course/assessment/programming_evaluations/_programming_evaluation.json.jbuilder b/app/views/course/assessment/programming_evaluations/_programming_evaluation.json.jbuilder index 5d5a516c09..03aedb721c 100644 --- a/app/views/course/assessment/programming_evaluations/_programming_evaluation.json.jbuilder +++ b/app/views/course/assessment/programming_evaluations/_programming_evaluation.json.jbuilder @@ -1,2 +1,3 @@ +# frozen_string_literal: true json.(programming_evaluation, :id, :memory_limit, :time_limit) json.language programming_evaluation.language.class.name diff --git a/app/views/course/assessment/programming_evaluations/allocate.json.jbuilder b/app/views/course/assessment/programming_evaluations/allocate.json.jbuilder index c2e016f576..095d57dac5 100644 --- a/app/views/course/assessment/programming_evaluations/allocate.json.jbuilder +++ b/app/views/course/assessment/programming_evaluations/allocate.json.jbuilder @@ -1,2 +1,3 @@ +# frozen_string_literal: true json.partial! 'programming_evaluation', collection: @programming_evaluations, as: :programming_evaluation diff --git a/app/views/course/assessment/programming_evaluations/show.json.jbuilder b/app/views/course/assessment/programming_evaluations/show.json.jbuilder index 232c52f455..12838c7608 100644 --- a/app/views/course/assessment/programming_evaluations/show.json.jbuilder +++ b/app/views/course/assessment/programming_evaluations/show.json.jbuilder @@ -1 +1,2 @@ +# frozen_string_literal: true json.partial! 'programming_evaluation', programming_evaluation: @programming_evaluation diff --git a/app/views/course/assessment/programming_evaluations/update_result.json.jbuilder b/app/views/course/assessment/programming_evaluations/update_result.json.jbuilder index ebc7421a28..8b4044c36b 100644 --- a/app/views/course/assessment/programming_evaluations/update_result.json.jbuilder +++ b/app/views/course/assessment/programming_evaluations/update_result.json.jbuilder @@ -1 +1,2 @@ +# frozen_string_literal: true json.message @programming_evaluation.errors.full_messages.to_sentence diff --git a/app/views/course/assessment/question/multiple_responses/_multiple_response.json.jbuilder b/app/views/course/assessment/question/multiple_responses/_multiple_response.json.jbuilder index 739db34da4..e58cd95558 100644 --- a/app/views/course/assessment/question/multiple_responses/_multiple_response.json.jbuilder +++ b/app/views/course/assessment/question/multiple_responses/_multiple_response.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.autogradable question.auto_gradable? json.options question.options do |option| diff --git a/app/views/course/assessment/question/programming/_import_result.json.jbuilder b/app/views/course/assessment/question/programming/_import_result.json.jbuilder index 54cf69cb91..83492b5bb8 100644 --- a/app/views/course/assessment/question/programming/_import_result.json.jbuilder +++ b/app/views/course/assessment/question/programming/_import_result.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.import_result do json.alert import_result_alert(json: true) diff --git a/app/views/course/assessment/question/programming/_package_ui.json.jbuilder b/app/views/course/assessment/question/programming/_package_ui.json.jbuilder index b199575184..db8ac10f17 100644 --- a/app/views/course/assessment/question/programming/_package_ui.json.jbuilder +++ b/app/views/course/assessment/question/programming/_package_ui.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.package_ui do json.templates @programming_question.template_files do |file| json.(file, :id, :filename) diff --git a/app/views/course/assessment/question/programming/_programming.json.jbuilder b/app/views/course/assessment/question/programming/_programming.json.jbuilder index efe2a19155..2af4ce36e4 100644 --- a/app/views/course/assessment/question/programming/_programming.json.jbuilder +++ b/app/views/course/assessment/question/programming/_programming.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.language question.language.name json.fileSubmission question.multiple_file_submission json.attemptLimit question.attempt_limit if question.attempt_limit diff --git a/app/views/course/assessment/question/programming/_props.json.jbuilder b/app/views/course/assessment/question/programming/_props.json.jbuilder index 66eac1d35b..6c2f45272c 100644 --- a/app/views/course/assessment/question/programming/_props.json.jbuilder +++ b/app/views/course/assessment/question/programming/_props.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.partial! 'question' json.partial! 'package_ui' json.partial! 'test_ui' diff --git a/app/views/course/assessment/question/programming/_question.json.jbuilder b/app/views/course/assessment/question/programming/_question.json.jbuilder index 896e95a2a6..0688c0f9e5 100644 --- a/app/views/course/assessment/question/programming/_question.json.jbuilder +++ b/app/views/course/assessment/question/programming/_question.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.question do json.(@programming_question, :id, :title, :description, :staff_only_comments, :maximum_grade, :language_id, :memory_limit, :time_limit) diff --git a/app/views/course/assessment/question/programming/_response.json.jbuilder b/app/views/course/assessment/question/programming/_response.json.jbuilder index 89eec68c6d..1b91c9b1d3 100644 --- a/app/views/course/assessment/question/programming/_response.json.jbuilder +++ b/app/views/course/assessment/question/programming/_response.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true if check_import_job? json.import_job_url job_path(@programming_question.import_job) diff --git a/app/views/course/assessment/question/programming/_test_ui.json.jbuilder b/app/views/course/assessment/question/programming/_test_ui.json.jbuilder index d195ffd287..b35213b075 100644 --- a/app/views/course/assessment/question/programming/_test_ui.json.jbuilder +++ b/app/views/course/assessment/question/programming/_test_ui.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true if @meta json.test_ui do json.mode @meta[:editor_mode] diff --git a/app/views/course/assessment/question/programming/edit.json.jbuilder b/app/views/course/assessment/question/programming/edit.json.jbuilder index 9bdbd9e4d6..f94600107a 100644 --- a/app/views/course/assessment/question/programming/edit.json.jbuilder +++ b/app/views/course/assessment/question/programming/edit.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.form_data do json.method 'PATCH' json.auth_token form_authenticity_token diff --git a/app/views/course/assessment/question/programming/new.json.jbuilder b/app/views/course/assessment/question/programming/new.json.jbuilder index 1de1b81af4..b06724ec32 100644 --- a/app/views/course/assessment/question/programming/new.json.jbuilder +++ b/app/views/course/assessment/question/programming/new.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.form_data do json.method 'POST' json.auth_token form_authenticity_token diff --git a/app/views/course/assessment/question/scribing/_scribing.json.jbuilder b/app/views/course/assessment/question/scribing/_scribing.json.jbuilder index f300267450..04ae427c81 100644 --- a/app/views/course/assessment/question/scribing/_scribing.json.jbuilder +++ b/app/views/course/assessment/question/scribing/_scribing.json.jbuilder @@ -1 +1,2 @@ +# frozen_string_literal: true json.autogradable question.auto_gradable? diff --git a/app/views/course/assessment/question/scribing/_scribing_question.json.jbuilder b/app/views/course/assessment/question/scribing/_scribing_question.json.jbuilder index 7278c4ec3e..ad78e16616 100644 --- a/app/views/course/assessment/question/scribing/_scribing_question.json.jbuilder +++ b/app/views/course/assessment/question/scribing/_scribing_question.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.question do json.(@scribing_question, :id, :title, :description, :staff_only_comments, :maximum_grade) diff --git a/app/views/course/assessment/question/text_responses/_text_response.json.jbuilder b/app/views/course/assessment/question/text_responses/_text_response.json.jbuilder index bc16b7ac5d..5cc0164502 100644 --- a/app/views/course/assessment/question/text_responses/_text_response.json.jbuilder +++ b/app/views/course/assessment/question/text_responses/_text_response.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.allowAttachment question.allow_attachment? unless question.hide_text? json.comprehension question.comprehension_question? json.autogradable question.auto_gradable? diff --git a/app/views/course/assessment/question/voice_responses/_voice_response.json.jbuilder b/app/views/course/assessment/question/voice_responses/_voice_response.json.jbuilder index f300267450..04ae427c81 100644 --- a/app/views/course/assessment/question/voice_responses/_voice_response.json.jbuilder +++ b/app/views/course/assessment/question/voice_responses/_voice_response.json.jbuilder @@ -1 +1,2 @@ +# frozen_string_literal: true json.autogradable question.auto_gradable? diff --git a/app/views/course/assessment/skills/_index.json.jbuilder b/app/views/course/assessment/skills/_index.json.jbuilder index f665e7248c..95f69ed482 100644 --- a/app/views/course/assessment/skills/_index.json.jbuilder +++ b/app/views/course/assessment/skills/_index.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.skills current_course.assessment_skills.order_by_title do |skill| json.(skill, :id, :title) end diff --git a/app/views/course/assessment/submission/submissions/_answers.json.jbuilder b/app/views/course/assessment/submission/submissions/_answers.json.jbuilder index 56891c8e97..77baa8b3e4 100644 --- a/app/views/course/assessment/submission/submissions/_answers.json.jbuilder +++ b/app/views/course/assessment/submission/submissions/_answers.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.answers answers do |answer| json.partial! answer, answer: answer end diff --git a/app/views/course/assessment/submission/submissions/_history.json.jbuilder b/app/views/course/assessment/submission/submissions/_history.json.jbuilder index 05ef878551..927a5d5f2e 100644 --- a/app/views/course/assessment/submission/submissions/_history.json.jbuilder +++ b/app/views/course/assessment/submission/submissions/_history.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.history do answer_history = submission.answer_history diff --git a/app/views/course/assessment/submission/submissions/_question.json.jbuilder b/app/views/course/assessment/submission/submissions/_question.json.jbuilder index 58d8aea83c..ceb20d5e7f 100644 --- a/app/views/course/assessment/submission/submissions/_question.json.jbuilder +++ b/app/views/course/assessment/submission/submissions/_question.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true # This partial is required to DRY up the code because the abstract question model # directly renders the actable partial by delegating :to_partial_path to the actable. diff --git a/app/views/course/assessment/submission/submissions/_questions.json.jbuilder b/app/views/course/assessment/submission/submissions/_questions.json.jbuilder index 9c5e30294a..bf2a6537e2 100644 --- a/app/views/course/assessment/submission/submissions/_questions.json.jbuilder +++ b/app/views/course/assessment/submission/submissions/_questions.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true answer_ids_hash = answers.map do |a| [a.question_id, a.id] end.to_h diff --git a/app/views/course/assessment/submission/submissions/_submission.json.jbuilder b/app/views/course/assessment/submission/submissions/_submission.json.jbuilder index 7560d495f0..9a2bd4ab4d 100644 --- a/app/views/course/assessment/submission/submissions/_submission.json.jbuilder +++ b/app/views/course/assessment/submission/submissions/_submission.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.submission do json.id submission.id json.canGrade can_grade diff --git a/app/views/course/assessment/submission/submissions/_topics.json.jbuilder b/app/views/course/assessment/submission/submissions/_topics.json.jbuilder index d3964e9cab..831e3b450f 100644 --- a/app/views/course/assessment/submission/submissions/_topics.json.jbuilder +++ b/app/views/course/assessment/submission/submissions/_topics.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.topics submission.submission_questions do |submission_question| topic = submission_question.discussion_topic json.id topic.id diff --git a/app/views/course/assessment/submission/submissions/edit.json.jbuilder b/app/views/course/assessment/submission/submissions/edit.json.jbuilder index 818ed1e326..3f4697092c 100644 --- a/app/views/course/assessment/submission/submissions/edit.json.jbuilder +++ b/app/views/course/assessment/submission/submissions/edit.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true can_grade = can?(:grade, @submission) can_update = can?(:update, @submission) diff --git a/app/views/course/assessment/submission/submissions/index.json.jbuilder b/app/views/course/assessment/submission/submissions/index.json.jbuilder index 180e049d00..c209817a09 100644 --- a/app/views/course/assessment/submission/submissions/index.json.jbuilder +++ b/app/views/course/assessment/submission/submissions/index.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true submissions_hash ||= @submissions.map { |s| [s.course_user_id, s] }.to_h json.assessment do diff --git a/app/views/course/assessment/submission_question/submission_questions/past_answers.json.jbuilder b/app/views/course/assessment/submission_question/submission_questions/past_answers.json.jbuilder index 56891c8e97..77baa8b3e4 100644 --- a/app/views/course/assessment/submission_question/submission_questions/past_answers.json.jbuilder +++ b/app/views/course/assessment/submission_question/submission_questions/past_answers.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.answers answers do |answer| json.partial! answer, answer: answer end diff --git a/app/views/course/condition/_conditions.json.jbuilder b/app/views/course/condition/_conditions.json.jbuilder index 1b1039be45..c401094282 100644 --- a/app/views/course/condition/_conditions.json.jbuilder +++ b/app/views/course/condition/_conditions.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.condition_attributes do json.new_condition_urls Course::Condition::ALL_CONDITIONS do |condition| next unless component_enabled?(condition) diff --git a/app/views/course/condition/achievements/_achievement.json.jbuilder b/app/views/course/condition/achievements/_achievement.json.jbuilder index dfad0c8763..e29147618c 100644 --- a/app/views/course/condition/achievements/_achievement.json.jbuilder +++ b/app/views/course/condition/achievements/_achievement.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true achievement_condition = condition json.type t('course.condition.achievement.title') json.description format_inline_text(achievement_condition.title) diff --git a/app/views/course/condition/assessments/_assessment.json.jbuilder b/app/views/course/condition/assessments/_assessment.json.jbuilder index cda32acca9..22e1b27adf 100644 --- a/app/views/course/condition/assessments/_assessment.json.jbuilder +++ b/app/views/course/condition/assessments/_assessment.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true assessment_condition = condition json.type t('course.condition.assessment.title') json.description format_inline_text(assessment_condition.title) diff --git a/app/views/course/condition/levels/_level.json.jbuilder b/app/views/course/condition/levels/_level.json.jbuilder index 07be9e5735..19d3697d02 100644 --- a/app/views/course/condition/levels/_level.json.jbuilder +++ b/app/views/course/condition/levels/_level.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true level_condition = condition json.type t('course.condition.level.title') json.description format_inline_text(level_condition.title) diff --git a/app/views/course/discussion/posts/_post.json.jbuilder b/app/views/course/discussion/posts/_post.json.jbuilder index 6082277641..6d210286f9 100644 --- a/app/views/course/discussion/posts/_post.json.jbuilder +++ b/app/views/course/discussion/posts/_post.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.(post, :id, :title, :text) json.formattedText format_html(simple_format(post.text)) creator = post.creator diff --git a/app/views/course/lesson_plan/events/_event_lesson_plan_item.json.jbuilder b/app/views/course/lesson_plan/events/_event_lesson_plan_item.json.jbuilder index 4af3df6150..7ad791a3f3 100644 --- a/app/views/course/lesson_plan/events/_event_lesson_plan_item.json.jbuilder +++ b/app/views/course/lesson_plan/events/_event_lesson_plan_item.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.partial! 'course/lesson_plan/items/item.json.jbuilder', item: item json.eventId item.id diff --git a/app/views/course/lesson_plan/items/_item.json.jbuilder b/app/views/course/lesson_plan/items/_item.json.jbuilder index 2cf8c3f9cb..0a935d01d3 100644 --- a/app/views/course/lesson_plan/items/_item.json.jbuilder +++ b/app/views/course/lesson_plan/items/_item.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true # These are the common fields to be displayed for all lesson plan items json.id item.acting_as.id json.(item, :title, :published, :start_at, :bonus_end_at, :end_at) diff --git a/app/views/course/lesson_plan/items/index.json.jbuilder b/app/views/course/lesson_plan/items/index.json.jbuilder index 6311e940a8..f8cd775c35 100644 --- a/app/views/course/lesson_plan/items/index.json.jbuilder +++ b/app/views/course/lesson_plan/items/index.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.milestones @milestones, partial: 'course/lesson_plan/milestones/milestone.json.jbuilder', as: :milestone json.items @items.map(&:specific) do |actable| diff --git a/app/views/course/lesson_plan/milestones/_milestone.json.jbuilder b/app/views/course/lesson_plan/milestones/_milestone.json.jbuilder index 51e83f0694..cafad076cb 100644 --- a/app/views/course/lesson_plan/milestones/_milestone.json.jbuilder +++ b/app/views/course/lesson_plan/milestones/_milestone.json.jbuilder @@ -1 +1,2 @@ +# frozen_string_literal: true json.(milestone, :id, :title, :description, :start_at) diff --git a/app/views/course/levels/index.json.jbuilder b/app/views/course/levels/index.json.jbuilder index 11e002ff11..9e2f619865 100644 --- a/app/views/course/levels/index.json.jbuilder +++ b/app/views/course/levels/index.json.jbuilder @@ -1 +1,2 @@ +# frozen_string_literal: true json.levels @levels.pluck(:experience_points_threshold) diff --git a/app/views/course/material/_material.json.jbuilder b/app/views/course/material/_material.json.jbuilder index 3705e8e53b..1594a91aec 100644 --- a/app/views/course/material/_material.json.jbuilder +++ b/app/views/course/material/_material.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.(material, :id, :updated_at) json.name format_inline_text(material.name) json.url url_for([current_course, folder, material]) diff --git a/app/views/course/material/folders/upload_materials.json.jbuilder b/app/views/course/material/folders/upload_materials.json.jbuilder index 893b30723b..0f39cc2002 100644 --- a/app/views/course/material/folders/upload_materials.json.jbuilder +++ b/app/views/course/material/folders/upload_materials.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Response with the uploaded materials json.materials @materials do |material| json.partial! 'course/material/material', material: material, folder: @folder diff --git a/app/views/course/object_duplications/new.json.jbuilder b/app/views/course/object_duplications/new.json.jbuilder index 0557543aba..1b97e12b65 100644 --- a/app/views/course/object_duplications/new.json.jbuilder +++ b/app/views/course/object_duplications/new.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.currentHost current_tenant.host json.currentCourse do diff --git a/app/views/course/survey/questions/_option.json.jbuilder b/app/views/course/survey/questions/_option.json.jbuilder index a392242e16..90aa79e23e 100644 --- a/app/views/course/survey/questions/_option.json.jbuilder +++ b/app/views/course/survey/questions/_option.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.(option, :id, :weight) json.option format_html(option.option) unless option.attachment.nil? diff --git a/app/views/course/survey/questions/_question.json.jbuilder b/app/views/course/survey/questions/_question.json.jbuilder index 5773b34f94..70dc79963e 100644 --- a/app/views/course/survey/questions/_question.json.jbuilder +++ b/app/views/course/survey/questions/_question.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.(question, :id, :required, :question_type, :max_options, :min_options, :weight, :grid_view, :section_id) json.description format_html(question.description) diff --git a/app/views/course/survey/responses/_response.json.jbuilder b/app/views/course/survey/responses/_response.json.jbuilder index adc8412c1c..62ba95622c 100644 --- a/app/views/course/survey/responses/_response.json.jbuilder +++ b/app/views/course/survey/responses/_response.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.survey do json.partial! 'course/survey/surveys/survey_with_questions', survey: survey end diff --git a/app/views/course/survey/responses/_see_other.json.jbuilder b/app/views/course/survey/responses/_see_other.json.jbuilder index 52b0d3ceef..67e10f1273 100644 --- a/app/views/course/survey/responses/_see_other.json.jbuilder +++ b/app/views/course/survey/responses/_see_other.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.responseId @response.id json.canModify can?(:modify, @response) json.canSubmit can?(:submit, @response) diff --git a/app/views/course/survey/responses/index.json.jbuilder b/app/views/course/survey/responses/index.json.jbuilder index b959a8160e..2c11ecb6e5 100644 --- a/app/views/course/survey/responses/index.json.jbuilder +++ b/app/views/course/survey/responses/index.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true responses = @responses.map { |r| [r.course_user_id, r] }.to_h json.responses @course_students do |student| response = responses[student.id] diff --git a/app/views/course/survey/sections/_section.json.jbuilder b/app/views/course/survey/sections/_section.json.jbuilder index b41640c61d..c01b4c9416 100644 --- a/app/views/course/survey/sections/_section.json.jbuilder +++ b/app/views/course/survey/sections/_section.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.(section, :id, :title, :weight) json.description format_html(section.description) questions = @questions || section.questions diff --git a/app/views/course/survey/surveys/_survey.json.jbuilder b/app/views/course/survey/surveys/_survey.json.jbuilder index 03f0776165..249c57760e 100644 --- a/app/views/course/survey/surveys/_survey.json.jbuilder +++ b/app/views/course/survey/surveys/_survey.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.(survey, :id, :title, :base_exp, :time_bonus_exp, :published, :start_at, :end_at, :closing_reminded_at, :anonymous, :allow_response_after_end, :allow_modify_after_submit) diff --git a/app/views/course/survey/surveys/_survey_with_questions.json.jbuilder b/app/views/course/survey/surveys/_survey_with_questions.json.jbuilder index cda07270ea..adeb9b7b5f 100644 --- a/app/views/course/survey/surveys/_survey_with_questions.json.jbuilder +++ b/app/views/course/survey/surveys/_survey_with_questions.json.jbuilder @@ -1,2 +1,3 @@ +# frozen_string_literal: true json.partial! 'course/survey/surveys/survey', survey: survey json.sections @sections, partial: 'course/survey/sections/section', as: :section diff --git a/app/views/course/survey/surveys/index.json.jbuilder b/app/views/course/survey/surveys/index.json.jbuilder index a7d1ddc9e3..0e9f2c820e 100644 --- a/app/views/course/survey/surveys/index.json.jbuilder +++ b/app/views/course/survey/surveys/index.json.jbuilder @@ -1,2 +1,3 @@ +# frozen_string_literal: true json.surveys @surveys, partial: 'survey.json', as: :survey json.canCreate can?(:create, Course::Survey.new(course: current_course)) diff --git a/app/views/course/survey/surveys/results.json.jbuilder b/app/views/course/survey/surveys/results.json.jbuilder index ffda6811d7..2184affc7e 100644 --- a/app/views/course/survey/surveys/results.json.jbuilder +++ b/app/views/course/survey/surveys/results.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.sections @sections do |section| json.(section, :id, :title, :weight) json.description format_html(section.description) diff --git a/app/views/course/surveys/_survey_lesson_plan_item.json.jbuilder b/app/views/course/surveys/_survey_lesson_plan_item.json.jbuilder index 5fda949c72..24425d7c9a 100644 --- a/app/views/course/surveys/_survey_lesson_plan_item.json.jbuilder +++ b/app/views/course/surveys/_survey_lesson_plan_item.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.partial! 'course/lesson_plan/items/item.json.jbuilder', item: item json.lesson_plan_item_type [t('components.surveys.name')] json.item_path course_survey_path(current_course, item) diff --git a/app/views/course/users/_user.json.jbuilder b/app/views/course/users/_user.json.jbuilder index d6a1eb1fb8..a88d2c2329 100644 --- a/app/views/course/users/_user.json.jbuilder +++ b/app/views/course/users/_user.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.userName user.name json.userLink link_to_user(user) json.userPicElement display_user_image(user) diff --git a/app/views/course/video/submission/sessions/create.json.jbuilder b/app/views/course/video/submission/sessions/create.json.jbuilder index 4b63e18bbf..5b32568ad4 100644 --- a/app/views/course/video/submission/sessions/create.json.jbuilder +++ b/app/views/course/video/submission/sessions/create.json.jbuilder @@ -1 +1,2 @@ +# frozen_string_literal: true json.id @session.id.to_s diff --git a/app/views/course/video/submission/submissions/edit.json.jbuilder b/app/views/course/video/submission/submissions/edit.json.jbuilder index 9fbcfff547..694344a28d 100644 --- a/app/views/course/video/submission/submissions/edit.json.jbuilder +++ b/app/views/course/video/submission/submissions/edit.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.video do json.videoUrl @video.url json.partial! 'watch_next_video_url', locals: { next_video: @video.next_video } diff --git a/app/views/course/video/topics/_post.json.jbuilder b/app/views/course/video/topics/_post.json.jbuilder index 18e65ccd28..685501a799 100644 --- a/app/views/course/video/topics/_post.json.jbuilder +++ b/app/views/course/video/topics/_post.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.partial! 'course/users/user', locals: { user: post.creator } json.createdAt format_datetime(post.created_at) diff --git a/app/views/course/video/topics/_posts.json.jbuilder b/app/views/course/video/topics/_posts.json.jbuilder index 8628f6bbb8..597771658c 100644 --- a/app/views/course/video/topics/_posts.json.jbuilder +++ b/app/views/course/video/topics/_posts.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.posts do posts.each do |post| json.set! post.id do diff --git a/app/views/course/video/topics/_topic.json.jbuilder b/app/views/course/video/topics/_topic.json.jbuilder index 2f7d269b30..89f69f3ea4 100644 --- a/app/views/course/video/topics/_topic.json.jbuilder +++ b/app/views/course/video/topics/_topic.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.timestamp topic.timestamp json.createdTimestamp topic.created_at.to_i json.discussionTopicId topic.discussion_topic.id.to_s diff --git a/app/views/course/video/topics/_topics.json.jbuilder b/app/views/course/video/topics/_topics.json.jbuilder index 1c0ba8f01c..796fa2fc4d 100644 --- a/app/views/course/video/topics/_topics.json.jbuilder +++ b/app/views/course/video/topics/_topics.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.topics do topics.each do |topic| json.set! topic.id do diff --git a/app/views/course/video/topics/create.json.jbuilder b/app/views/course/video/topics/create.json.jbuilder index 77794a8794..7b9ae447d8 100644 --- a/app/views/course/video/topics/create.json.jbuilder +++ b/app/views/course/video/topics/create.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.topicId @topic.id.to_s json.topic @topic, partial: 'course/video/topics/topic', as: :topic diff --git a/app/views/course/video/topics/index.json.jbuilder b/app/views/course/video/topics/index.json.jbuilder index f464ac4608..426e20d02a 100644 --- a/app/views/course/video/topics/index.json.jbuilder +++ b/app/views/course/video/topics/index.json.jbuilder @@ -1,2 +1,3 @@ +# frozen_string_literal: true json.partial! 'course/video/topics/topics', locals: { topics: @topics } json.partial! 'course/video/topics/posts', locals: { posts: @posts } diff --git a/app/views/course/video/topics/show.json.jbuilder b/app/views/course/video/topics/show.json.jbuilder index e4ca42d698..b51658a92d 100644 --- a/app/views/course/video/topics/show.json.jbuilder +++ b/app/views/course/video/topics/show.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.topicId @topic.id.to_s json.topic @topic, partial: 'course/video/topics/topic', as: :topic diff --git a/app/views/course/video/videos/_video_lesson_plan_item.json.jbuilder b/app/views/course/video/videos/_video_lesson_plan_item.json.jbuilder index 9cf36de681..7d7abca164 100644 --- a/app/views/course/video/videos/_video_lesson_plan_item.json.jbuilder +++ b/app/views/course/video/videos/_video_lesson_plan_item.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.partial! 'course/lesson_plan/items/item.json.jbuilder', item: item json.item_path course_video_path(current_course, item) diff --git a/app/views/jobs/_completed.json.jbuilder b/app/views/jobs/_completed.json.jbuilder index 6334543266..280fb0249e 100644 --- a/app/views/jobs/_completed.json.jbuilder +++ b/app/views/jobs/_completed.json.jbuilder @@ -1,3 +1,4 @@ +# frozen_string_literal: true json.status 'completed' json.redirect_url @job.redirect_to json.message t('.completed') diff --git a/app/views/jobs/_errored.json.jbuilder b/app/views/jobs/_errored.json.jbuilder index 7a467ceaa2..c3647326ee 100644 --- a/app/views/jobs/_errored.json.jbuilder +++ b/app/views/jobs/_errored.json.jbuilder @@ -1,2 +1,3 @@ +# frozen_string_literal: true json.status 'errored' json.message t('.errored') diff --git a/app/views/jobs/_submitted.json.jbuilder b/app/views/jobs/_submitted.json.jbuilder index 71d12ad27e..2b46e82e04 100644 --- a/app/views/jobs/_submitted.json.jbuilder +++ b/app/views/jobs/_submitted.json.jbuilder @@ -1 +1,2 @@ +# frozen_string_literal: true json.status 'submitted' \ No newline at end of file diff --git a/app/views/jobs/show.json.jbuilder b/app/views/jobs/show.json.jbuilder index 0dcd3ea26b..4ab50c7b71 100644 --- a/app/views/jobs/show.json.jbuilder +++ b/app/views/jobs/show.json.jbuilder @@ -1 +1,2 @@ +# frozen_string_literal: true json.partial! @job.status diff --git a/config.ru b/config.ru index 5bc2a619e8..d7f111a8d0 100644 --- a/config.ru +++ b/config.ru @@ -1,3 +1,4 @@ +# frozen_string_literal: true # This file is used by Rack-based servers to start the application. require ::File.expand_path('../config/environment', __FILE__) diff --git a/config/initializers/application_controller_renderer.rb b/config/initializers/application_controller_renderer.rb index 51639b67a0..315ac48a9a 100644 --- a/config/initializers/application_controller_renderer.rb +++ b/config/initializers/application_controller_renderer.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Be sure to restart your server when you modify this file. # ApplicationController.renderer.defaults.merge!( diff --git a/config/initializers/new_framework_defaults_5_1.rb b/config/initializers/new_framework_defaults_5_1.rb index 9010abd5c2..da5f4a15c9 100644 --- a/config/initializers/new_framework_defaults_5_1.rb +++ b/config/initializers/new_framework_defaults_5_1.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Be sure to restart your server when you modify this file. # # This file contains migration options to ease your Rails 5.1 upgrade. diff --git a/db/seeds/development.rb b/db/seeds/development.rb index 2a289643cf..b3adeed30c 100644 --- a/db/seeds/development.rb +++ b/db/seeds/development.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true ActsAsTenant.with_tenant(Instance.default) do # Create the default user account (administrator). user = User::Email.find_by_email('test@example.org') diff --git a/db/seeds/test.rb b/db/seeds/test.rb index da53234122..9c7129afba 100644 --- a/db/seeds/test.rb +++ b/db/seeds/test.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true ActsAsTenant.with_tenant(Instance.default) do # Create the default user account (administrator). user = User::Email.find_by_email('test@example.org') diff --git a/lib/autoload/course/conditional/user_satisfiability_graph.rb b/lib/autoload/course/conditional/user_satisfiability_graph.rb index bb9f5e6fea..a5ee862916 100644 --- a/lib/autoload/course/conditional/user_satisfiability_graph.rb +++ b/lib/autoload/course/conditional/user_satisfiability_graph.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # Satisfiability graph to evaluate the satisfiability of the conditionals for a course user. class Course::Conditional::UserSatisfiabilityGraph class EdgeSet < Hash diff --git a/lib/extensions/action_mailer_suppression/action_mailer/message_delivery.rb b/lib/extensions/action_mailer_suppression/action_mailer/message_delivery.rb index 976ba1b9f2..7593e44bfa 100644 --- a/lib/extensions/action_mailer_suppression/action_mailer/message_delivery.rb +++ b/lib/extensions/action_mailer_suppression/action_mailer/message_delivery.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # This extension disables the check introduced in rails/rails#24457, which disables the # accessing or mutation of the +MessageDelivery+ object through raising an exception. # diff --git a/lib/tasks/db/insert_discussion_topics.rake b/lib/tasks/db/insert_discussion_topics.rake index 5edfcb431d..998e9dd9b1 100644 --- a/lib/tasks/db/insert_discussion_topics.rake +++ b/lib/tasks/db/insert_discussion_topics.rake @@ -1,3 +1,4 @@ +# frozen_string_literal: true namespace :db do task insert_discussion_topics: :environment do # Insert into course_discussion_topics with diff --git a/lib/tasks/db/insert_submission_questions.rake b/lib/tasks/db/insert_submission_questions.rake index 633da0933c..812f4e2449 100644 --- a/lib/tasks/db/insert_submission_questions.rake +++ b/lib/tasks/db/insert_submission_questions.rake @@ -1,3 +1,4 @@ +# frozen_string_literal: true namespace :db do task insert_submission_questions: :environment do ActsAsTenant.without_tenant do diff --git a/lib/tasks/db/migrate_comments.rake b/lib/tasks/db/migrate_comments.rake index c83e4d3d12..6f19ae2e31 100644 --- a/lib/tasks/db/migrate_comments.rake +++ b/lib/tasks/db/migrate_comments.rake @@ -1,3 +1,4 @@ +# frozen_string_literal: true namespace :db do task migrate_comments: :environment do ActsAsTenant.without_tenant do diff --git a/lib/tasks/db/migrate_pending_staff_reply.rake b/lib/tasks/db/migrate_pending_staff_reply.rake index 2ce2074380..3ebea73d5e 100644 --- a/lib/tasks/db/migrate_pending_staff_reply.rake +++ b/lib/tasks/db/migrate_pending_staff_reply.rake @@ -1,3 +1,4 @@ +# frozen_string_literal: true namespace :db do # Run this after migrating posts to the new SubmissionQuestion topics. task migrate_pending_staff_reply: :environment do diff --git a/lib/tasks/factory_bot.rake b/lib/tasks/factory_bot.rake index 155bfa7623..c61c8c1bbb 100644 --- a/lib/tasks/factory_bot.rake +++ b/lib/tasks/factory_bot.rake @@ -1,3 +1,4 @@ +# frozen_string_literal: true namespace :factory_bot do desc 'Run Factory Bot Lint to make sure all factories in tests are valid' task lint: :environment do diff --git a/spec/factories/course_assessment_skill_branches.rb b/spec/factories/course_assessment_skill_branches.rb index dfe266f067..fbe60cc1c9 100644 --- a/spec/factories/course_assessment_skill_branches.rb +++ b/spec/factories/course_assessment_skill_branches.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true FactoryBot.define do factory :course_assessment_skill_branch, class: Course::Assessment::SkillBranch do course diff --git a/spec/factories/course_assessment_skills.rb b/spec/factories/course_assessment_skills.rb index 7a06c982ad..148fc849cd 100644 --- a/spec/factories/course_assessment_skills.rb +++ b/spec/factories/course_assessment_skills.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true FactoryBot.define do factory :course_assessment_skill, class: Course::Assessment::Skill do course diff --git a/spec/features/course/assessment/skill_management_spec.rb b/spec/features/course/assessment/skill_management_spec.rb index b3b938c2e2..8766c4ae41 100644 --- a/spec/features/course/assessment/skill_management_spec.rb +++ b/spec/features/course/assessment/skill_management_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'rails_helper' RSpec.describe 'Course: Skills' do diff --git a/spec/features/course/assessment/submissions_viewing_spec.rb b/spec/features/course/assessment/submissions_viewing_spec.rb index ee516621c5..9fa400bb23 100644 --- a/spec/features/course/assessment/submissions_viewing_spec.rb +++ b/spec/features/course/assessment/submissions_viewing_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'rails_helper' RSpec.describe 'Course: Submissions Viewing' do diff --git a/spec/features/course/leaderboard_viewing_spec.rb b/spec/features/course/leaderboard_viewing_spec.rb index b6a1563cc4..bcb51c8d6a 100644 --- a/spec/features/course/leaderboard_viewing_spec.rb +++ b/spec/features/course/leaderboard_viewing_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'rails_helper' RSpec.describe 'Course: Leaderboard: View' do diff --git a/spec/features/course/video/submissions_viewing_spec.rb b/spec/features/course/video/submissions_viewing_spec.rb index d356494000..971fe9008b 100644 --- a/spec/features/course/video/submissions_viewing_spec.rb +++ b/spec/features/course/video/submissions_viewing_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'rails_helper' RSpec.describe 'Course: Video: Submissions Viewing' do diff --git a/spec/helpers/course/assessment/answer/programming_helper_spec.rb b/spec/helpers/course/assessment/answer/programming_helper_spec.rb index 5f1a825e6f..dabd1e49cd 100644 --- a/spec/helpers/course/assessment/answer/programming_helper_spec.rb +++ b/spec/helpers/course/assessment/answer/programming_helper_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'rails_helper' RSpec.describe Course::Assessment::Answer::ProgrammingHelper do diff --git a/spec/helpers/course/assessment/answer/programming_test_case_helper.rb b/spec/helpers/course/assessment/answer/programming_test_case_helper.rb index aa8a70a4b1..5531c96b2a 100644 --- a/spec/helpers/course/assessment/answer/programming_test_case_helper.rb +++ b/spec/helpers/course/assessment/answer/programming_test_case_helper.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'rails_helper' RSpec.describe Course::Assessment::Answer::ProgrammingTestCaseHelper do diff --git a/spec/helpers/course/assessment/submission/submissions_helper_spec.rb b/spec/helpers/course/assessment/submission/submissions_helper_spec.rb index c240c9e5f0..c5cbae4036 100644 --- a/spec/helpers/course/assessment/submission/submissions_helper_spec.rb +++ b/spec/helpers/course/assessment/submission/submissions_helper_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'rails_helper' RSpec.describe Course::Assessment::Submission::SubmissionsHelper do diff --git a/spec/helpers/course/assessment/submissions_helper_spec.rb b/spec/helpers/course/assessment/submissions_helper_spec.rb index 4123639c64..627a41aa65 100644 --- a/spec/helpers/course/assessment/submissions_helper_spec.rb +++ b/spec/helpers/course/assessment/submissions_helper_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'rails_helper' RSpec.describe Course::Assessment::SubmissionsHelper do diff --git a/spec/libraries/course/conditional/user_satisfiability_graph_spec.rb b/spec/libraries/course/conditional/user_satisfiability_graph_spec.rb index 8afc8c3bb1..672ffe9cc5 100644 --- a/spec/libraries/course/conditional/user_satisfiability_graph_spec.rb +++ b/spec/libraries/course/conditional/user_satisfiability_graph_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'rails_helper' RSpec.describe Course::Conditional::UserSatisfiabilityGraph do diff --git a/spec/models/attachment_reference_spec.rb b/spec/models/attachment_reference_spec.rb index 6cccc36bc2..0b4260b991 100644 --- a/spec/models/attachment_reference_spec.rb +++ b/spec/models/attachment_reference_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'rails_helper' RSpec.describe AttachmentReference do