Methods
-
<static> usersList( courseID )
-
Description
Renders the people tab for a classParameters
Name Type Description courseIDstring The course ID to render the people tab for Details
-
<static> globalSearch( term )
-
Description
Searches Power+ globally and shows results on the "Search Results" screenParameters
Name Type Description termstring The search term typed in the input box Details
-
<static> renderAssignment( assignment [, childDisplay ] ) → {string}
-
Description
Renders HTML for an assignment item in a listParameters
Name Type Attributes Description assignmentAssignment The assignment object to render childDisplaystring <optional> Text to display for specifying the child or children this assignment is for Returns
Details
-
<static> loadThreadsList( courseID [, defaultThread [, fromModules [, defaultPost ] ] ] )
-
Description
Renders the discussions list for a classParameters
Name Type Attributes Description courseIDstring The course ID to render discussion threads for defaultThreadstring <optional> The thread to load by default fromModulesboolean <optional> True if this page is being loaded from the moduleStream defaultPoststring <optional> The post to load by default Details
-
<static> renderAssignmentScore( assignment ) → {string}
-
Description
Renders HTML for an assignment score if the assignment is gradedParameters
Name Type Description assignmentAssignment The assignment object to render a score for Returns
Details
-
<static> class() → {object|undefined}
-
Description
Debugging shortcut for getting the selected class. This should only be used in the web inspector and not in actual code.Returns
Details
-
<static> mergeAndRenderChildAssignments( assignments ) → {string}
-
Description
Merges and renders assignments for children in the same classParameters
Name Type Description assignmentsArray.<Assignment> An array of assignment objects to merge Returns
Details
-
<static> mainStream()
-
Description
Renders the DTPS dashboard and calls dtps.renderCalendar, dtps.renderUpdates, and dtps.renderUpcomingDetails
-
<static> changelog( fromVersion, draft )
-
Description
Fetches and displays the DTPS changelog modalParameters
Name Type Description fromVersionnumber The previous version of DTPS installed. Will show popup changelogs since that version, if there aren't any, it will silently skip. draftboolean True to show draft changelogs Details
-
<static> loadThreadPosts( classNum, threadID [, fromModules [, defaultPost ] ] )
-
Description
Fetches and displays posts in a discussionParameters
Name Type Attributes Description classNumnumber The class number to render threadIDstring The discussion thread to render fromModulesboolean <optional> True if this page is being loaded from the moduleStream defaultPoststring <optional> The post ID to jump to Details
-
<static> isDueOnDate( date [, onDate ] )
-
<static> log( ...msg )
-
Description
Logs debugging messagesParameters
Name Type Attributes Description msg* <repeatable> The debugging messages to log Details
-
<static> renderDueToday( doneLoading [, fromDate ] )
-
Description
Compiles and displays due today / to-do streamParameters
Name Type Attributes Description doneLoadingboolean True if all classes have finished loading their assignment lists fromDateDate <optional> The date to display assignments from. Defaults to the current date. Details
-
<static> error( msg [, devNotes [, err ] ] )
-
Description
Shows an error message alert and logs to consoleParameters
Name Type Attributes Description msgstring The error to display devNotesstring <optional> Technical error details displayed in a smaller font errError <optional> An error object to log to the console. If this is null, DTPS will assume the error has been handled elsewhere. Details
-
<static> firstrun()
-
Description
Renders "Welcome to Project DTPS" screen on the first runDetails
-
<static> renderUpcoming( [ fromDate ] )
-
Description
Compiles and displays upcoming assignments streamParameters
Name Type Attributes Description fromDateDate <optional> The date to display assignments from. Defaults to the current date. Details
-
<static> loadPagesList( courseID [, defaultPage ], fromModules )
-
Description
Renders the pages list for a classParameters
Name Type Attributes Description courseIDstring The course ID to render pages for defaultPagestring <optional> If provided, load the pageID by default fromModulesboolean True if this page is being loaded from the moduleStream Details
-
<static> renderLoadingScreen()
-
Description
Renders the DTPS loading screenDetails
-
<static> JS( cb )
-
Description
Load all external JavaScript librariesParameters
Name Type Description cbfunction Callback function Details
-
<static> CSS()
-
Description
Load all DTPS CSS filesDetails
-
<static> renderUpdates( [ dateSelected ] )
-
Description
Renders updates stream (recently graded & announcements)Parameters
Name Type Attributes Description dateSelectedboolean <optional> True if a date is selected in the dashboard Details
-
<static> dayTimeMinutes( d )
-
Description
Gets the amount of minutes elapsed in the dayParameters
Name Type Description ddate The day Returns
Details
-
<static> filterSearch( [ toggleItem ] )
-
Description
Filters search resultsParameters
Name Type Attributes Description toggleItemElement | string <optional> The selector for the element to toggle Details
-
<static> init()
-
Description
Starts DTPS (entrypoint function)Details
-
<static> calendar( doneLoading )
-
Description
Compiles and displays the assignment calendarParameters
Name Type Description doneLoadingboolean True if all classes have finished loading their assignment lists Details
-
<static> loadPage( classNum, pageID, fromModules )
-
Description
Fetches and renders a page and its contentsParameters
Name Type Description classNumstring The class number of the page to render pageIDstring The page ID to render fromModulesboolean True if this page is being loaded from the moduleStream Details
-
<static> renderSearchResult( result, matchData [, mixedClasses ] ) → {string}
-
Description
Renders a Search data object into HTML for display in the search results listParameters
Name Type Attributes Description resultSearchData The search result to render matchDataArray.<Object> The list of matches from Lunr mixedClassesboolean <optional> True if there are results from multiple classes Returns
Details
-
<static> classStream( classID [, searchResults ] )
-
Description
Shows the assignments stream for a classParameters
Name Type Attributes Description classIDstring The class ID to show assignments for searchResultsArray.<Assignment> <optional> An array of assignemnts to render instead of course.assignments. Used for assignment search. Details
-
<static> assignment( id, classNum [, generic ] )
-
Description
Shows details for an assignment given the assignment ID and class numberParameters
Name Type Attributes Description idstring Assignment ID classNumnumber Assignment class number genericboolean <optional> True if user-specific details, such as grades, should not be displayed Details
-
<static> moduleStream( classID )
-
Description
Shows the module stream for a classParameters
Name Type Description classIDstring Class number to fetch modules for Details
-
<static> formatDate( date ) → {string}
-
Description
Formats a date to a readable date stringParameters
Name Type Description dateDate The date to format Returns
Details
-
<static> iframeLoad( iframeID )
-
Description
Adjusts the height of an iFrame to match its contentParameters
Name Type Description iframeIDstring The ID of the iFrame element to adjust Details
-
<static> clearData()
-
Description
Clears all DTPS dataDetails
-
<static> showClasses( [ override ] )
-
Description
Renders the class list in the sidebarParameters
Name Type Attributes Description overrideboolean <optional> True if the sidebar should be forcefully re-rendered Details
-
<static> moduleCollapse( ele, classID, modID )
-
Description
Collapses a moduleParameters
Name Type Description eleElement Element of the module collapse arrow classIDstring Class ID modIDstring Module ID of the module to collapse Details
-
<static> moduleCollapseAll( collapse )
-
Description
Collapses all moduleParameters
Name Type Description collapseboolean If true, modules will be collapsed, otherwise, they will all be expanded Details
-
<static> presentClass( classNum )
-
Description
Renders the class header (color, name, tabs, etc.) and sets the class as the selected classParameters
Name Type Description classNumnumber | string The class number to load or "dash" if loading the dashboard Details
-
<static> renderStreamTools( num, type ) → {string}
-
Description
Gets stream tools HTML (search box, class info, and modules/assignment switcher)Parameters
Name Type Description numnumber Class number typestring Class content these tools are for (e.g. "stream") Returns
Details
-
<static> gradebook( classID )
-
Description
Shows the generic gradebookParameters
Name Type Description classIDstring Class ID Details
-
<static> classHome( num )
-
Description
Displays the class homepageParameters
Name Type Description numnumber Class number to show the homepage for Details
-
<static> showLMSGradebook( classID )
-
Description
Shows the gradebook using HTML from dtpsLMS.gradebookParameters
Name Type Description classIDstring Class ID Details
-
<static> showIFrameCard( url )
-
Description
Shows a URL in the iFrame cardParameters
Name Type Description urlstring The URL to load Details
-
<static> brightenTextForDarkMode( html [, bg ] ) → {string}
-
Description
Brightens text in an HTML string for dark modeParameters
Name Type Attributes Description htmlstring The HTML to brighten text for bgstring <optional> The background color that the HTML will be displayed on Returns
Details
-
<static> logGrades( classNum )
-
Description
Stores grade data locally for the previous grade featureParameters
Name Type Description classNumClass number to log grade Details
-
<static> settings( [ forceRerenderDashboard ] )
-
Description
Opens the settings pageParameters
Name Type Attributes Description forceRerenderDashboardboolean <optional> If this is true, the dashboard settings will be re-rendered Details
-
<static> settingsReloadWarning()
-
Description
Enables the reload warning when the user exists settingsDetails
-
<static> dangerousCBLPrompt( [ accepted ] )
-
Description
Prompts for dangerous CBL enablementParameters
Name Type Attributes Description acceptedboolean <optional> True if the disclaimer has been accepted Details
-
<static> renderGradesInSettings()
-
Description
Renders the grades tab in settingsDetails
-
<static> saveDashboardPrefs()
-
Description
Saves dashboard prefrencesDetails
-
<static> resetDashboardPrefs()
-
Description
Resets dashboard prefrencesDetails
-
<static> classicEntry()
-
Description
Redirects to DTPS classic editionDetails
-
<static> loadDashboardPrefs()
-
Description
Loads dashboard prefrencesDetails
-
<static> render()
-
Description
Renders initial static DTPS HTMLDetails
-
<static> setSearchBox()
-
Description
Sets the search box text based on the current page or keywordsDetails
-
<static> renderLite()
-
Description
Renders basic content after the user has been loadedDetails
-
<static> closeScreen()
-
Description
A callback for blocking Fluid UI card closesDetails