MCPcopy Create free account
hub / github.com/TimMcCool/scratchattach / get_class_sort_mode

Function get_class_sort_mode

scratchattach/utils/commons.py:236–253  ·  view source on GitHub ↗

Returns the sort mode for the given mode for classes only

(mode: str)

Source from the content-addressed store, hash-verified

234 return lock
235
236def get_class_sort_mode(mode: str) -> tuple[str, str]:
237 """
238 Returns the sort mode for the given mode for classes only
239 """
240 ascsort = ''
241 descsort = ''
242
243 mode = mode.lower()
244 if mode == "last created":
245 pass
246 elif mode == "students":
247 descsort = "student_count"
248 elif mode == "a-z":
249 ascsort = "title"
250 elif mode == "z-a":
251 descsort = "title"
252
253 return ascsort, descsort
254
255
256def b62_decode(s: str):

Callers 3

classroom_alertsMethod · 0.90
mystuff_classesMethod · 0.90
mystuff_ended_classesMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected