Skip to content

Commit

Permalink
Merge branch 'filter_modal_extended' of github.com:khushiagl/Markus i…
Browse files Browse the repository at this point in the history
…nto filter_modal_extended
  • Loading branch information
khushiagl committed Jul 31, 2023
2 parents fff0444 + a57347a commit db49cf0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions app/models/grouping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,11 @@ def get_random_incomplete(current_role)
# float. 'max' is the maximum and 'min' is the minimum total mark a result should have.
# +filter_data['totalExtraMarkRange']+ is a hash with the keys 'min' and 'max' each mapping to a string representing
# a float. 'max' is the maximum and 'min' is the minimum total extra mark a result should have.
# +filter_data['criteria']+ is a list of hashes containing information about criteria to filter by. Each hash
# should contain the key 'name' mapping to a string corresponding to the criterion name and can contain the keys
# 'min' and/or 'max' each mapping to a string representing a float. 'max' is the maximum and 'min' is the minimum
# grade for the given criterion a result should have. If both 'max' and 'min' are blank (a whitespace string/nil),
# filtering for the corresponding criterion will not occur.
# To avoid filtering by any of the specified filters, don't set values for the corresponding key in +filter_data+
# or set it to nil. If the value for a key is blank (false, empty, or a whitespace string, as determined by
# `.blank?`), no filtering will occur for the corresponding option.
Expand Down Expand Up @@ -843,8 +848,8 @@ def filter_results(current_role, results, filter_data)

# Orders the results, specified as +results+ by using +filter_data+ and returns the next grouping using +reversed+.
# +reversed+ is a boolean value, true to return the next grouping and false to return the previous one.
# +filter_data['orderBy']+ specifies how the results should be ordered, with valid values being "group_name" and
# "submission_date". When this value is not specified (or nil), default ordering is applied.
# +filter_data['orderBy']+ specifies how the results should be ordered, with valid values being "group_name",
# "submission_date" and "total_mark". When this value is not specified (or nil), default ordering is applied.
# +filter_data['ascending']+ specifies whether results should be ordered in ascending or descending order. Valid
# options include "true" (corresponding to ascending order) or "false" (corresponding to descending order). When
# this value is not specified (or nil), the results are ordered in ascending order.
Expand Down

0 comments on commit db49cf0

Please sign in to comment.