diff --git a/frontend/src/utils/sort-table/sort-table.js b/frontend/src/utils/sort-table/sort-table.js new file mode 100644 index 000000000..3c43a9ee2 --- /dev/null +++ b/frontend/src/utils/sort-table/sort-table.js @@ -0,0 +1,27 @@ +import { Utility } from '../../core/utility'; +import { StorageManager, LOCATION } from '../../lib/storage-manager/storage-manager'; + +const SORT_TABLE_IDENT = 'uw-sort-table'; + +@Utility({ + selector: `table[${SORT_TABLE_IDENT}]`, +}) +export class SortTable { + + _storageManager = new StorageManager('SORT_TABLE', '0.0.0', { location: LOCATION.LOCAL }); + + _element; + + constructor(element) { + if (!element) { + throw new Error('Sort Table utility cannot be setup without an element!'); + } + + this._element = element; + } + + destroy() { + console.log('TBD destroy SortTable'); + } + +} diff --git a/frontend/src/utils/utils.js b/frontend/src/utils/utils.js index d365f812b..215134503 100644 --- a/frontend/src/utils/utils.js +++ b/frontend/src/utils/utils.js @@ -13,6 +13,7 @@ import { CourseTeaser } from './course-teaser/course-teaser'; import { NavbarUtils } from './navbar/navbar'; import { HideColumns } from './hide-columns/hide-columns'; import { ExamCorrect } from './exam-correct/exam-correct'; +import { SortTable } from './sort-table/sort-table'; export const Utils = [ Alerts, @@ -31,4 +32,5 @@ export const Utils = [ ...NavbarUtils, HideColumns, ExamCorrect, + SortTable, ]; diff --git a/src/Handler/Exam/Correct.hs b/src/Handler/Exam/Correct.hs index 53c7012fb..241ee642b 100644 --- a/src/Handler/Exam/Correct.hs +++ b/src/Handler/Exam/Correct.hs @@ -58,6 +58,8 @@ getECorrectR tid ssh csh examn = do participantHeadTooltip = [whamlet| _{MsgExamCorrectHeadParticipantTooltip} |] + examCorrectIdent = intercalate "-" [toPathPiece tid, toPathPiece ssh, toPathPiece csh, toPathPiece examn] + siteLayoutMsg heading $ do setTitleI heading $(widgetFile "exam-correct") diff --git a/templates/exam-correct.hamlet b/templates/exam-correct.hamlet index 42e3f4879..9d0038cf2 100644 --- a/templates/exam-correct.hamlet +++ b/templates/exam-correct.hamlet @@ -2,7 +2,7 @@ $newline never
- +