changed literal array syntax, as suggested by RuboCop
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
module FileParameters
|
||||
def file_attributes
|
||||
%w[content context_id feedback_message file_id file_type_id hidden id name native_file path read_only role weight]
|
||||
%w(content context_id feedback_message file_id file_type_id hidden id name native_file path read_only role weight)
|
||||
end
|
||||
private :file_attributes
|
||||
end
|
||||
|
@ -5,7 +5,7 @@ module Lti
|
||||
|
||||
MAXIMUM_SCORE = 1
|
||||
MAXIMUM_SESSION_AGE = 60.minutes
|
||||
SESSION_PARAMETERS = %w[launch_presentation_return_url lis_outcome_service_url lis_result_sourcedid]
|
||||
SESSION_PARAMETERS = %w(launch_presentation_return_url lis_outcome_service_url lis_result_sourcedid)
|
||||
|
||||
def build_tool_provider(options = {})
|
||||
if options[:consumer] && options[:parameters]
|
||||
|
@ -3,8 +3,8 @@ require File.expand_path('../../../uploaders/file_uploader', __FILE__)
|
||||
module CodeOcean
|
||||
class File < ActiveRecord::Base
|
||||
DEFAULT_WEIGHT = 1.0
|
||||
ROLES = %w[main_file reference_implementation regular_file teacher_defined_test user_defined_file user_defined_test]
|
||||
TEACHER_DEFINED_ROLES = ROLES - %w[user_defined_file]
|
||||
ROLES = %w(main_file reference_implementation regular_file teacher_defined_test user_defined_file user_defined_test)
|
||||
TEACHER_DEFINED_ROLES = ROLES - %w(user_defined_file)
|
||||
|
||||
after_initialize :set_default_values
|
||||
before_validation :set_ancestor_values, if: :incomplete_descendent?
|
||||
|
@ -1,7 +1,7 @@
|
||||
module User
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
ROLES = %w[admin teacher]
|
||||
ROLES = %w(admin teacher)
|
||||
|
||||
included do
|
||||
belongs_to :consumer
|
||||
|
@ -1,9 +1,9 @@
|
||||
class FileType < ActiveRecord::Base
|
||||
include Creation
|
||||
|
||||
AUDIO_FILE_EXTENSIONS = %w[.aac .flac .m4a .mp3 .ogg .wav .wma]
|
||||
IMAGE_FILE_EXTENSIONS = %w[.bmp .gif .jpeg .jpg .png]
|
||||
VIDEO_FILE_EXTENSIONS = %w[.avi .flv .mkv .mp4 .m4v .ogv .webm]
|
||||
AUDIO_FILE_EXTENSIONS = %w(.aac .flac .m4a .mp3 .ogg .wav .wma)
|
||||
IMAGE_FILE_EXTENSIONS = %w(.bmp .gif .jpeg .jpg .png)
|
||||
VIDEO_FILE_EXTENSIONS = %w(.avi .flv .mkv .mp4 .m4v .ogv .webm)
|
||||
|
||||
after_initialize :set_default_values
|
||||
|
||||
|
@ -2,7 +2,7 @@ class Submission < ActiveRecord::Base
|
||||
include Context
|
||||
include Creation
|
||||
|
||||
CAUSES = %w[assess download file render run save submit test]
|
||||
CAUSES = %w(assess download file render run save submit test)
|
||||
FILENAME_URL_PLACEHOLDER = '{filename}'
|
||||
|
||||
belongs_to :exercise
|
||||
|
Reference in New Issue
Block a user