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gBAAgB,UAAU,OAAO,cAAc;IAChF,IAAI,cAAc,aAAa;IAC/B,IAAI,yBAAyB;;IAE7B,IAAI,0BAA0B,YAAY;QACtC,OAAO,MAAM,IAAI,cAAc,4CAA4C,KAAK,UAAU,SAAS;YAC/F,OAAO;;;;IAIf,uBAAuB,yBAAyB;;IAEhD,OAAO;;;;;;AAMX;AACA,IAAI,WAAW,qBAAqB,CAAC,UAAU,UAAU,eAAe,gBAAgB,gBAAgB,UAAU,QAAQ,QAAQ,aAAa,cAAc,cAAc;;IAEvK,OAAO,KAAK,YAAY;QACpB,OAAO,GAAG;;;IAGd,OAAO,UAAU;;IAEjB,YAAY,gBAAgB,KAAK,UAAU,UAAU;QACjD,OAAO,UAAU;QACjB,QAAQ,IAAI,eAAe,SAAS,KAAK,KAAK;OAC/C,WAAW;QACV,aAAa,WAAW,aAAa,eAAe,oBAAoB,MAAM,0BAA0B;;;;AAIhH","sourcesContent":["/*\r\n * This file contains the base URL for all backend API endpoint access.\r\n *\r\n * Please note that the URL **MUST** end with a '/'. If you fail to include\r\n * the '/' at the end of your URL, the application will fail to retrieve any\r\n * content from the API.\r\n */\r\n\r\n// B507 Internal Development API\r\nvar siteSettings = {\r\n siteName: \"winona\",\r\n serviceBase: 'https://b12papi.campus.mnsu.edu/winonaorientation/',\r\n appName: \"ONLINE ORIENTATION\",\r\n uiElements: {\r\n \"userId\": \"StarID\" // What user IDs are referred to\r\n },\r\n customMessages: {\r\n \"GeneralAPIError\": \"There was a problem retrieving content from the server. Please try again shortly. If the problem persists please contact Winona State University for assistance.\",\r\n \"GeneralError\": \"An unexpected error occurred. If the problem persists please contact Winona State University.\",\r\n \"ServerOfflineError\": \"The server is currently unavailable. This may mean the application is currently under construction or is having a problem. Please try again later. If this problem persists please contact Winona State University for assistance.\"\r\n }\r\n}\nvar app = angular.module('orientationApp', ['ui.router', 'LocalStorageModule', 'ngSanitize', 'ui.bootstrap', 'ngAria', 'dndLists', 'ng.ckeditor']);\r\n\r\nconsole.log(\"Online Orientation Release 2.8.0 (C) 2015-2018 B507 [build time Tue May 16 2023 16:36:23 GMT-0500 (Central Daylight Time)] [site winona.release]\");\r\n\r\ntry {\r\n if(typeof(siteSettings)=='undefined') {\r\n console.log(\"FATAL ERROR: No site defined!\");\r\n alert(\"This program has not been deployed properly or has a configuration problem and cannot be used. Please contact your support department and reference this error message: ServiceBase file not defined.\");\r\n var siteSettings={};\r\n }\r\n} catch(ex) {\r\n console.log(\"FATAL ERROR: No site defined!\");\r\n alert(\"This program has not been deployed properly or has a configuration problem and cannot be used. Please contact your support department and reference this error message: ServiceBase file not defined.\");\r\n var siteSettings={};\r\n}\r\n\r\napp.config(function ($stateProvider, $urlRouterProvider, $sceDelegateProvider) {\r\n \r\n $urlRouterProvider.otherwise(\"/welcome\");\r\n\r\n $stateProvider\r\n .state(\"welcome\", {\r\n url: \"/welcome\",\r\n controller: \"WelcomeController\",\r\n templateUrl: \"welcome.html\"\r\n })\r\n\r\n .state(\"login\", {\r\n url: \"/login\",\r\n controller: \"LoginController\",\r\n templateUrl: \"login.html\"\r\n })\r\n\r\n .state(\"select\", {\r\n url: \"/select\",\r\n controller: \"SelectController\",\r\n templateUrl: \"select.html\"\r\n })\r\n \r\n .state('home', {\r\n url: '/home',\r\n views: {\r\n '@': {\r\n controller: 'studentController',\r\n templateUrl: 'student.html'\r\n },\r\n 'content@home': {\r\n controller: 'ContentController',\r\n templateUrl: 'content.html'\r\n },\r\n 'quiz@home': {\r\n controller: 'QuizController',\r\n templateUrl: 'quiz.html'\r\n }\r\n }\r\n })\r\n\r\n .state(\"admin\", {\r\n url: \"/admin\",\r\n controller: \"adminController\",\r\n templateUrl: \"admin.html\"\r\n })\r\n\r\n .state(\"admin.report\", {\r\n url: \"/report\",\r\n controller: \"ReportController\",\r\n templateUrl: \"report.html\"\r\n })\r\n\r\n .state(\"admin.settings\", {\r\n url: \"/settings\",\r\n controller: \"SettingsController\",\r\n templateUrl: \"settings.html\"\r\n })\r\n\r\n .state(\"admin.slides\", {\r\n url: \"/slide\",\r\n controller: \"SlideController\",\r\n templateUrl: \"slide.html\"\r\n })\r\n\r\n .state(\"admin.editSlide\", {\r\n url: \"/slide/editor\",\r\n controller: \"slideEditorController\",\r\n templateUrl: \"slideEditor.html\",\r\n params: {content: null}\r\n })\r\n \r\n .state(\"admin.quizzes\", {\r\n url: \"/quiz\",\r\n controller: \"QuizListController\",\r\n templateUrl: \"quizList.html\"\r\n })\r\n\r\n .state(\"admin.createQuiz\", {\r\n url: \"/quiz/create\",\r\n controller: \"QuizCreateController\",\r\n templateUrl: \"quizCreate.html\"\r\n })\r\n\r\n .state(\"admin.editQuiz\", {\r\n url: \"/quiz/edit\",\r\n controller: \"QuizEditController\",\r\n templateUrl: \"quizEdit.html\",\r\n params: { quiz: null }\r\n })\r\n\r\n .state(\"admin.playlist\", {\r\n url: \"/playlist\",\r\n controller: \"PlaylistController\",\r\n templateUrl: \"playlist.html\"\r\n })\r\n\r\n .state(\"admin.admins\", {\r\n url: \"/admins\",\r\n controller: \"adminsController\",\r\n templateUrl: \"admins.html\"\r\n })\r\n\r\n .state(\"admin.user\", {\r\n url: \"/user\",\r\n controller: \"userController\",\r\n templateUrl: \"user.html\"\r\n })\r\n\r\n .state(\"admin.log\", {\r\n url: \"/log\",\r\n controller: \"logController\",\r\n templateUrl: \"log.html\"\r\n })\r\n\r\n .state(\"admin.assignment\", {\r\n url: \"/assignment\",\r\n controller: \"assignmentController\",\r\n templateUrl: \"assignment.html\"\r\n })\r\n\r\n .state(\"admin.cohort\", {\r\n url: \"/cohort\",\r\n controller: \"cohortController\",\r\n templateUrl: \"cohort.html\"\r\n });\r\n\r\n $sceDelegateProvider.resourceUrlWhitelist([\r\n 'self',\r\n '*://www.youtube.com/**'\r\n ]);\r\n});\r\n\r\napp.constant('siteSettings', siteSettings);\r\n\r\napp.config(function ($httpProvider) {\r\n $httpProvider.interceptors.push('authInterceptorService');\r\n});\r\n\r\napp.run(['$rootScope', 'siteSettings', function($rootScope, siteSettings) {\r\n $rootScope.title = siteSettings.appName;\r\n}]);\nangular.module('orientationApp').run(['$templateCache', function($templateCache) {$templateCache.put('admin.html','\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n
\\r\\n \\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
');\n$templateCache.put('admins.html','
\\r\\n
\\r\\n
\\r\\n
\\r\\n\\r\\n

ADMINISTRATORS

\\r\\n\\r\\n
\\r\\n

This page allows you to assign or revoke administrator rights to users. Administrators can view the report and can edit content. Administrators will also see the Administration panel when they log in instead of the online orientation itself.

\\r\\n
\\r\\n\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n
User IDName
{{admin.starId}}{{admin.firstName}} {{admin.lastName}}
\\r\\n \\r\\n  
\\r\\n
\\r\\n\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n');\n$templateCache.put('assignment.html','
\\r\\n
\\r\\n
\\r\\n
\\r\\n

ASSIGNMENTS

\\r\\n\\r\\n
\\r\\n
\\r\\n

This page allows you to manually manage assignments to your orientation instance.

\\r\\n

To begin, enter all of the users you would like to either assign or remove. Enter StarIDs or TechIDs, one per line. (You may mix and match TechIDs and StarIDs, but make sure there are no extraneous characters such as spaces, periods, tab characters, etc. on the lines. Each line should consist of exactly one StarID or TechID and nothing more.)

\\r\\n

To add all of the listed users to your orientation, click Assign Users. If any of the users you have chosen are already assigned to another orientation, they will receive a selection screen upon login asking them to choose which orientation they wish to view—your orientation will be among those listed.

\\r\\n

To remove all of the listed users from your orientation, click Remove Users. Be aware that removing users will remove any progress those users may have already made through the orientation. Removed users, even if they had completed orientation, will also no longer show up in your Student Status list nor will their data be included in any reports. Be cautious with removing users!

\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n Assign or Remove Students
\\r\\n Enter student TechIDs, student StarIDs, or local usernames, one per line.\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n  Please wait...\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n Results\\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n
TechID or StarIDStudent NameOperation Result
{{result.id}}{{ (result.firstName || \\'-\\') }} {{ result.lastName }}{{result.resultText}}
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n');\n$templateCache.put('cohort.html','
\\r\\n
\\r\\n
\\r\\n
\\r\\n\\r\\n

COHORTS

\\r\\n\\r\\n
\\r\\n\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n {{card.title}}\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n\\r\\n
\\r\\n\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n
Cohort IDCohort Name 
{{cohort.flagId}}{{cohort.flagName}}
\\r\\n \\r\\n \\r\\n \\r\\n
\\r\\n

To add a new cohort, provide a Cohort ID and a cohort name. A Cohort ID must be all lowercase and can include letters, numbers and the underscore (_) character. This ID is used internally by the system for cohort assignment and maintenance. The Cohort Name is the descriptive name which will appear on the slide editor and on the cohort assignment pages; you can enter any characters you wish for the Name.

\\r\\n
\\r\\n\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
Please lookup a student by Tech ID, StarID or local user ID above.
\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n
Tech ID{{selectedStudent.techId}}
StarID{{selectedStudent.userId}}
Name{{selectedStudent.fullName}}
\\r\\n
Cohort Memberships
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n {{cohort.flagName}}\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n Clear All Cohorts\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n\\r\\n
\\r\\n
\\r\\n Enroll or Remove Students
\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n  Please wait...\\r\\n
\\r\\n
\\r\\n\\r\\n
\\r\\n\\r\\n
\\r\\n
\\r\\n Results\\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n
TechID or StarIDStudent NameOperation Result
{{result.id}}{{ (result.firstName || \\'-\\') }} {{ result.lastName }}{{result.resultText}}
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n');\n$templateCache.put('log.html','
\\r\\n
\\r\\n
\\r\\n
\\r\\n\\r\\n

SYSTEM LOG

\\r\\n\\r\\n
\\r\\n
\\r\\n

This page displays detailed system error information. This data is useful for development and debugging of errors in the application.

\\r\\n

The 50 most recent error events are displayed.

\\r\\n
\\r\\n
\\r\\n\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n
Date/TimeError Information
{{error.entry_time}}{{error.entry_text}}
\\r\\n
\\r\\n\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n');\n$templateCache.put('playlist.html','
\\r\\n
\\r\\n
\\r\\n
\\r\\n

PLAYLIST EDITOR

\\r\\n
\\r\\n\\r\\n
\\r\\n

To edit the playlist:

\\r\\n
    \\r\\n
  • \\r\\n Sections\\r\\n
      \\r\\n
    • To expand a section, click the icon.
    • \\r\\n
    • To make a new section, use the New Section button.
    • \\r\\n
    • To edit the name of a section, click the button next to the section.
    • \\r\\n
    • To delete a section, click the button next to the section. All of the section\\'s pages will be moved to the Unused Pages section, and any quiz for the section will be deleted.
    • \\r\\n
    \\r\\n
  • \\r\\n
  • \\r\\n Pages\\r\\n
      \\r\\n
    • To move pages within a section, drag and drop the pages as desired until they appear in the correct order.
    • \\r\\n
    • To move pages to a different section, open both sections and then drag the page from one section to the other into the desired position.
    • \\r\\n
    • To move entire sections, drag the section itself into the desired position.
    • \\r\\n
    • To add a page that is not currently in the playlist, drag the page from the Unused Pages section on the right into the desired position in the playlist.
    • \\r\\n
    • To remove a page from the playlist, drag it to the Unused Pages section.
    • \\r\\n
    \\r\\n
  • \\r\\n
  • \\r\\n When Finished\\r\\n
      \\r\\n
    • When finished editing, click the Save Playlist button at the bottom of the playlist to update the playlist on the server. \\r\\n
    • Your updates will be applied immediately and will impact anyone currently viewing the orientation.
    • \\r\\n
    • To undo all changes and reset to the currently live playlist, click the Reset Playlist button.
    • \\r\\n
    • Note: If you remove all of the items from a section, or if you add a new section and fail to add any items to it, that section will not appear in the playlist after you save.
    • \\r\\n
    \\r\\n
  • \\r\\n
\\r\\n
\\r\\n
\\r\\n\\r\\n
\"Loading...\"
Loading, please wait...
\\r\\n \\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n

Active Playlist

\\r\\n
    \\r\\n
  • \\r\\n
    \\r\\n
    \\r\\n \\r\\n  \\r\\n \\r\\n \\r\\n  \\r\\n \\r\\n Section\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n
    \\r\\n
    \\r\\n\\r\\n
    \\r\\n \\r\\n  \\r\\n \\r\\n \\r\\n  \\r\\n \\r\\n Section\\r\\n \\r\\n {{section.title}}\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n
    \\r\\n\\r\\n
      \\r\\n
    • \\r\\n Page\\r\\n Quiz\\r\\n Prompt\\r\\n {{item.title}}\\r\\n
    • \\r\\n
    • \\r\\n Drop a page here\\r\\n
    • \\r\\n
    \\r\\n
  • \\r\\n
  • \\r\\n Drop a section here\\r\\n
  • \\r\\n
  • \\r\\n
    \\r\\n  \\r\\n Section\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n
    \\r\\n
  • \\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n

Available Pages Not In Playlist

\\r\\n
    \\r\\n
  • \\r\\n Page\\r\\n {{item.title}}\\r\\n
  • \\r\\n
  • \\r\\n Drop a page here\\r\\n
  • \\r\\n
\\r\\n
\\r\\n
\\r\\n\\r\\n
\\r\\n\\r\\n \\r\\n \\r\\n\\r\\n
\\r\\n
\\r\\n
\\r\\n
');\n$templateCache.put('quizCreate.html','\\r\\n\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n

CREATE QUIZ

\\r\\n
\\r\\n
\\r\\n

Create your new section quiz here.

\\r\\n
    \\r\\n
  • Before beginning, select the section you wish this quiz to apply to in the drop-down.
  • \\r\\n
  • The first question is already ready for you to fill in. When creating a question, always place the correct answer in the first answer box (yellow highlighted). Question answers are randomized when the question is displayed to the student.
  • \\r\\n
  • To add more answers to a question, click the Add Answer button at the bottom of the question. There is no limit as to how many responses a question can have, however only one answer may be the correct answer.
  • \\r\\n
  • To remove an answer, simply leave it blank. The system will ignore blank answers (except in the Correct Answer field).
  • \\r\\n
  • You can add a new question using the New Question button at the bottom of the quiz. You can also remove an entire question using the Delete button next to that question.
  • \\r\\n
\\r\\n

Tips:

\\r\\n
    \\r\\n
  • For a True/False question, simply enter two responses: True and False (or Yes/No, etc.) with the correct answer being in the first box.
  • \\r\\n
  • Since the answer order will be randomized to the student, avoid responses like \"All of the above\". Instead, use \"All of these\", \"None of these\", and so on.
  • \\r\\n
  • Remember that a student must answer all questions correctly. Questions should focus on the most important information that all students must learn.
  • \\r\\n
\\r\\n

After making all of your changes, choose Save Quiz to update the quiz. The quiz will be updated immediately in the system.

\\r\\n
\\r\\n\\r\\n
\\r\\n
\\r\\n
Select Quiz Section
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n \\r\\n
\\r\\n \\r\\n
\\r\\n');\n$templateCache.put('quizEdit.html','\\r\\n\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n

EDIT QUIZ

\\r\\n
\\r\\n
\\r\\n

You can edit the questions and answers in your quiz here.

\\r\\n
    \\r\\n
  • To add a new answer to a question, click the Add Answer button at the bottom of the question.
  • \\r\\n
  • To remove an answer, simply leave it blank. The system will ignore blank answers (except in the Correct Answer field).
  • \\r\\n
  • You can add a new question using the New Question button at the bottom of the quiz. You can also remove an entire question using the Delete button next to that question.
  • \\r\\n
\\r\\n

After making all of your changes, choose Save Quiz to update the quiz. The quiz will be updated immediately in the system.

\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n \\r\\n
\\r\\n \\r\\n
\\r\\n');\n$templateCache.put('quizList.html','\\r\\n\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n

QUIZ EDITOR

\\r\\n
\\r\\n\\r\\n
    \\r\\n
  • To edit a section\\'s quiz, click the Edit button next to the section.
  • \\r\\n
  • To add a new quiz to a section that does not currently contain one use the \"New Quiz\" button below.
  • \\r\\n
  • To delete a quiz, use the Delete button next to a quiz. Note that removing a quiz has many consequences - be careful before doing so.
  • \\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n
SECTION TITLEACTIONS
\\r\\n {{quiz.sectionTitle}}\\r\\n \\r\\n \\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n \\r\\n
\\r\\n \\r\\n
\\r\\n \\r\\n
\\r\\n');\n$templateCache.put('report.html','\\r\\n\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n

REPORTS

\\r\\n
\\r\\n
\\r\\n

Please select a report:

\\r\\n\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n {{card.title}}\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n\\r\\n
\\r\\n\\r\\n
\\r\\n\\r\\n
\\r\\n

Student Status

\\r\\n

This page displays a list of all users who are currently enrolled in your orientation.

\\r\\n
    \\r\\n
  • Use the filtering options to filter the list.
      \\r\\n
    • The search field will search both user IDs (StarIDs) and full names.
    • \\r\\n
  • \\r\\n
  • The page controls at the bottom of the report will allow you to navigate among multiple pages of entries. You can also choose how many entries appear per page.
  • \\r\\n
  • To download a copy of the report, click the Download button. You will receive a CSV file containing all users who match your filter criteria. (Note that all matching entries will be downloaded; there is no need to download a separate file for each page of the report in this view.)
  • \\r\\n
\\r\\n
\\r\\n\\r\\n
0\">\"Loading...\"
Loading, please wait...
\\r\\n\\r\\n
\\r\\n\\r\\n
\\r\\n
\\r\\n

Page {{pager.current}}

\\r\\n
\\r\\n\\r\\n
\\r\\n \\r\\n
\\r\\n\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n
\\r\\n
\\r\\n\\r\\n \\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n
User IDNameEmail{{header[1]}}Completion TimeQuiz Stats
\\r\\n No results to display.\\r\\n
{{row[\\'userId\\']}}{{row[\\'name\\']}}{{row[\\'email\\']}}\\r\\n {{siteReport[row[\\'userId\\']][header[0]]}}\\r\\n \\r\\n \\r\\n {{row[\\'endTime\\']}}\\r\\n \\r\\n \\r\\n Not Yet Completed\\r\\n \\r\\n \\r\\n \\r\\n {{row[\\'quizAttempts\\']}} attempts total against {{row[\\'quizCount\\']}} quizzes ({{ (row[\\'quizCount\\'] / row[\\'quizAttempts\\'] * 100).toFixed(1) }}% success)\\r\\n \\r\\n \\r\\n Not Yet Completed\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
    \\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n \\r\\n
\\r\\n \\r\\n
\\r\\n\\r\\n');\n$templateCache.put('settings.html','\\r\\n\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n

SETTINGS

\\r\\n\\r\\n
\\r\\n

This page allows you to configure the Online Orientation system.

\\r\\n
\\r\\n\\r\\n \\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n
SETTINGVALUE
{{opt.optionDescription}} \\r\\n \\r\\n \\r\\n
[{{opt.optionShortName}}]
\\r\\n {{opt.optionKind == \\'bool\\' ? (opt.optionValue == \\'1\\' ? \\'Yes\\' : \\'No\\') : opt.optionValue}}\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n - Applies to entire online orientation system - use caution if changing.
\\r\\n - Setting has changed and will be committed if you click Save Changes.\\r\\n
\\r\\n
\\r\\n Submitting settings...\\r\\n Settings updated!\\r\\n An error occurred.\\r\\n   \\r\\n \\r\\n   \\r\\n \\r\\n
\\r\\n \\r\\n
\\r\\n \\r\\n
\\r\\n \\r\\n
\\r\\n \\r\\n
\\r\\n');\n$templateCache.put('slide.html','\\r\\n\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n

CONTENT EDITOR - SLIDE LIST

\\r\\n
\\r\\n

To edit a slide, select the section that contains the slide you wish to edit, then click on the Edit button to edit. To create a new slide use the button at the bottom of the list.

\\r\\n

WARNING: Slides highlighted in red belong to multiple playlists within the system. Editing content on these slides will impact all playlists which reference the slide! Before editing any content on red slides, you may wish to check with other departments to ensure that your changes will be acceptable to them.

\\r\\n
\\r\\n
\\r\\n
\\r\\n\\r\\n
\"Loading...\"
Loading, please wait...
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n {{item.title}}\\r\\n {{item.title}}\\r\\n \\r\\n \\r\\n \\r\\n  \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
');\n$templateCache.put('slideEditor.html','\\r\\n\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n

CONTENT EDITOR - EDIT

\\r\\n
\\r\\n

\\r\\n Use this page to edit your content page. Any changes you make will be immediately viewable after submitting.\\r\\n

\\r\\n

\\r\\n If this is a new page, it will appear as the last page in the last section of your playlist. You can use the Playlist Editor to move the page to the desired location in your playlist.\\r\\n

\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n

Content  Page title, section and content.

\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n Section: {{sectionValues[contentData.sectionId]}}\\r\\n \\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n

Enter raw Markdown content here. Some HTML is supported as well.

\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n
\\r\\n YouTube Video ID
\\r\\n Enter your YouTube Video ID. The video ID is the string after v= up to but not including, if present, a ?.
\\r\\n For example: https://www.youtube.com/watch?v=iL5_kD0Yhlg?ref=0 - this video\\'s ID is iL5_kD0Yhlg.\\r\\n
\\r\\n
\\r\\n   \\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
YouTube Preview Area
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n\\r\\n
\\r\\n\\r\\n

Cohorts  Select cohorts to limit content display to only selected cohorts.

\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n {{cohort.flagName}}\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n Clear All Cohorts (Show to Everyone)\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
');\n$templateCache.put('user.html','
\\r\\n
\\r\\n
\\r\\n
\\r\\n\\r\\n

USERS

\\r\\n\\r\\n
\\r\\n
\\r\\n

This page lets you manage local users in your orientation system.

\\r\\n

To enable local users, slide the Enable Local Users slider to the On position. If local users are not enabled, the system will only allow directory-based users to log in.

\\r\\n
\\r\\n
\\r\\n\\r\\n
\"Loading...\"
Loading, please wait...
\\r\\n\\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n
User IDNameAdmin? 
{{user.userId}}{{user.fullName}}{{user.isAdmin ? \"Yes\" : \"No\"}}\\r\\n \\r\\n \\r\\n
\\r\\n There are no local users defined. Click the Add New Local User button to add one!\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n');\n$templateCache.put('user_add.html','
\\r\\n

Add New Local User

\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n
User Name
First Name
Last Name
New Password
Repeat Password
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n

 {{err}}

\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n
\\r\\n');\n$templateCache.put('user_pwd.html','
\\r\\n

Change Local User Password

\\r\\n
\\r\\n
\\r\\n
\\r\\n

You are about to change the password for the user {{newUser.userId}}.

\\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n \\r\\n
User Name{{newUser.userId}}
New Password
Repeat Password
\\r\\n
\\r\\n
\\r\\n

 {{err}}

\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n
\\r\\n');\n$templateCache.put('content.html','\\r\\n
\\r\\n
\\r\\n
\\r\\n
\"Image
\\r\\n

\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n
 
\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
\"Loading...\"
Loading, please wait...
\\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n
 
\\r\\n
\\r\\n
\\r\\n');\n$templateCache.put('quiz.html','\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n

{{ $index + 1 }}.   {{ question.question_text }}

\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n \"Loading...\"
Loading, please wait...\\r\\n
\\r\\n
\\r\\n
\\r\\n
');\n$templateCache.put('student.html','\\r\\n
\\r\\n \\r\\n \\r\\n\\r\\n \\r\\n\\r\\n \\r\\n
\\r\\n \\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
');\n$templateCache.put('login.html','\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \"Minnesota\\r\\n
\\r\\n
\\r\\n \\r\\n

{{ siteSettings.appName }}

\\r\\n
\\r\\n \\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n ×\\r\\n {{loginError}}\\r\\n
\\r\\n
\\r\\n \\r\\n
\"Loading...\"
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
');\n$templateCache.put('modal.html','
\\r\\n

{{titleBar}}

\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \\r\\n \\r\\n \\r\\n
\\r\\n');\n$templateCache.put('select.html','\\r\\n
\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \"Minnesota\\r\\n
\\r\\n
\\r\\n \\r\\n

{{ siteSettings.appName }}

\\r\\n

Please select the content you wish to view during this session.

\\r\\n
\\r\\n \\r\\n

\\r\\n \\r\\n
\"Loading...\"
\\r\\n
\\r\\n ×\\r\\n {{login_error}}\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
');\n$templateCache.put('welcome.html','\\r\\n
\\r\\n \\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n \"Minnesota\\r\\n
\\r\\n
\\r\\n \"Welcome\\r\\n \\r\\n
\\r\\n
\\r\\n
\\r\\n
\\r\\n
');}]);\n'use strict';\r\napp.controller('adminController', ['$scope', '$log', '$state', '$rootScope', 'authService', 'adminService', 'studentService', 'modalService', function ($scope, $log, $state, $rootScope, authService, adminService, studentService, modalService) {\r\n\r\n $scope.darkMode = function() { \r\n $rootScope.global_darkmode = !($rootScope.global_darkmode);\r\n };\r\n\r\n adminService.getPlaylistTitle().then(function (response) {\r\n if (response.data.error > 0) {\r\n $log.error(\"An error has occurred.\\nError: \" + response.data.error + \" (\" + response.data.error.message + \")\");\r\n modalService.alertModal(response.data.error.message);\r\n } else {\r\n var plName = response.data.data.playlistTitle;\r\n $(\"#maintitle-text\").text(plName);\r\n }\r\n });\r\n\r\n/**\r\n * not sure why this was removed but adding it back in for testing.\r\n */\r\n $scope.getSections = function () {\r\n adminService.getSectionList().then(function (response) {\r\n if (response.data.error > 0) {\r\n $log.error(\"An error has occurred.\\nError: \" + response.data.error + \" (\" + response.data.error.message + \")\");\r\n modalService.alertModal(response.data.error.message);\r\n } else {\r\n $scope.sections = response.data.data;\r\n $scope.sectionValues = {};\r\n angular.forEach($scope.sections, function (value, key) {\r\n $scope.sectionValues[value.sectionTitle] = value.sectionId;\r\n });\r\n }\r\n }, function (response) {\r\n if (response.status == 401) {\r\n //(\"Authentication doesn't exist or has expired. Directing user to login.\");\r\n $state.go('login');\r\n return;\r\n }\r\n $log.error(\"An error has occurred while retrieving all the sections.\\nHTTP error: \" + response.status);\r\n modalService.alertModal(customMessages['GeneralAPIError']);\r\n });\r\n };\r\n\r\n $scope.getSections();\r\n\r\n // end re-added section\r\n\r\n /**\r\n * Retrieve all the contents \r\n */\r\n $scope.getContents = function () {\r\n studentService.getContents().then(function (response) {\r\n if (response.data.error > 0) {\r\n $log.error(\"An error has occurred.\\nError: \" + response.data.error + \" (\" + response.data.error.message + \")\");\r\n modalService.alertModal(response.data.error.message);\r\n } else {\r\n $scope.contents = response.data.data;\r\n }\r\n }, function (response) {\r\n if (response.status == 401) {\r\n $state.go('login');\r\n return;\r\n }\r\n $log.error(\"An error has occurred while retrieving all the contents.\\nHTTP error: \" + response.status);\r\n modalService.alertModal(customMessages['GeneralAPIError']); \r\n });\r\n };\r\n\r\n $scope.getContents();\r\n\r\n $scope.getQuizs = function () {\r\n studentService.getQuizs().then(function (response) {\r\n if (response.data.error > 0) {\r\n $log.error(\"An error has occurred.\\nError: \" + response.data.error + \" (\" + response.data.error.message + \")\");\r\n modalService.alertModal(response.data.error.message);\r\n } else {\r\n $scope.quizs = response.data.data.details;\r\n }\r\n }, function (response) {\r\n $log.error(\"An error has occurred while retrieving the quiz.\\nHTTP error: \" + response.status);\r\n if (response.status == 400) {\r\n modalService.alertModal(response.data.message);\r\n } else {\r\n modalService.alertModal(customMessages['GeneralAPIError']);\r\n }\r\n });\r\n };\r\n\r\n /**\r\n * Finding whether location flag is checked or not\r\n */\r\n $scope.testForFlag = function (flagValue, flagId) {\r\n return (flagValue & Math.pow(2, flagId)) != 0;\r\n };\r\n\r\n /**\r\n * Logout functionality\r\n */\r\n $scope.logout = function () {\r\n authService.logOut();\r\n //direct to login page\r\n $state.go('welcome');\r\n };\r\n\r\n /**\r\n * Redirect Admin user to the report page on \r\n */\r\n $state.go('admin.report');\r\n}]);\n'use strict';\r\napp.controller('adminsController', ['$scope', '$log', '$state', 'adminService', 'modalService', function ($scope, $log, $state, adminService, modalService) {\r\n\r\n //Initialize variables\r\n $scope.adminFlag = false;\r\n\r\n $scope.admin = {\r\n starId: null\r\n };\r\n\r\n $scope.newAdmin = function () {\r\n $scope.adminFlag = true;\r\n };\r\n\r\n /**\r\n * Get all the admins\r\n */\r\n $scope.getAdminList = function () {\r\n adminService.getAdminList().then(function (response) {\r\n if (response.data.error > 0) {\r\n $log.error(\"An error has occurred.\\nError: \" + response.data.error + \" (\" + response.data.error.message + \")\");\r\n modalService.alertModal(response.data.error.message);\r\n } else {\r\n $scope.admins = response.data.data;\r\n $scope.adminHeaders = Object.keys($scope.admins[0]);\r\n }\r\n }, function (response) {\r\n if (response.status == 401) {\r\n $state.go('login');\r\n return;\r\n }\r\n $log.error(\"An error has occurred while retrieving all the admin List.\\nHTTP error: \" + response.status);\r\n modalService.alertModal(customMessages['GeneralAPIError']);\r\n });\r\n };\r\n\r\n $scope.getAdminList();\r\n\r\n $scope.revokeAdmin = function (admin) {\r\n if (admin.starId) {\r\n modalService.confirmModal('Are you sure you want to revoke administrator privileges from '+admin.starId+'?',\"Revoke Privileges\").then(function () {\r\n adminService.revokeAdmin(admin.starId).then(function (response) {\r\n $scope.getAdminList();\r\n },\r\n function (error) { \r\n modalService.alertModal(error.data.message);\r\n })\r\n });\r\n }\r\n };\r\n\r\n $scope.grantAdmin = function () {\r\n\r\n if (!$scope.newAdminId) {\r\n modalService.alertModal(\"Please enter a user ID.\",false,\"Try Again\",\"#600\");\r\n return;\r\n }\r\n\r\n modalService.confirmModal(\"Are you sure you want to grant administrator privileges to '\"+$scope.newAdminId+\"'? This user will have full access to reports, content editors, and will be able to grant to and revoke administrator privileges from any other user.\",\"Please Confirm\").then(function() {\r\n adminService.grantAdmin($scope.newAdminId).then(function (response) {\r\n $scope.getAdminList();\r\n },\r\n function (error) {\r\n modalService.alertModal(error.data.message,false,\"Error\",\"#600\");\r\n });\r\n $scope.admin.starId = null; \r\n });\r\n };\r\n\r\n}]);\r\n\n'use strict';\r\napp.factory('adminService', ['$http', 'siteSettings', function ($http, siteSettings) {\r\n var serviceBase = siteSettings.serviceBase;\r\n var adminServiceFactory = {};\r\n \r\n // Content\r\n adminServiceFactory.putContent = function (id,data) {\r\n return $http.post(serviceBase + 'api/content/' + id, data, { headers: { 'Content-Type': 'application/json' } });\r\n };\r\n adminServiceFactory.putContentCohorts = function (id,data) {\r\n return $http.post(serviceBase + 'api/cohort/' + id +'/content', data, { headers: { 'Content-Type': 'application/json' } });\r\n };\r\n\r\n adminServiceFactory.deleteSlide = function (id) {\r\n return $http.delete(serviceBase + 'api/content/' + id);\r\n };\r\n \r\n // Playlists\r\n adminServiceFactory.getPlaylist = function () {\r\n return $http.get(serviceBase + 'api/playlist');\r\n };\r\n\r\n adminServiceFactory.getPlaylistUnused = function () {\r\n return $http.get(serviceBase + 'api/playlist/unused');\r\n };\r\n\r\n adminServiceFactory.updatePlaylist = function (data) {\r\n console.dir(data);\r\n return $http.post(serviceBase + 'api/playlist', data, { headers: { 'Content-Type': 'application/json' } });\r\n };\r\n\r\n // Sections\r\n adminServiceFactory.getSectionList = function () {\r\n return $http.get(serviceBase + 'api/section/list');\r\n };\r\n\r\n // Quizzes\r\n adminServiceFactory.updateQuiz = function (data, id) {\r\n return $http.post(serviceBase + 'api/quiz/' + id, data, { headers: { 'Content-Type': 'application/json' } });\r\n };\r\n\r\n adminServiceFactory.deleteQuiz = function (id) {\r\n return $http.delete(serviceBase + 'api/quiz/' + id);\r\n };\r\n \r\n // Users\r\n adminServiceFactory.getAllLocalUsers = function() {\r\n return $http.get(serviceBase + 'api/user/local');\r\n }\r\n adminServiceFactory.addLocalUser = function(data) {\r\n return $http.post(serviceBase + 'api/user/local', data, { headers: { 'Content-Type': 'application/json' } });\r\n }\r\n adminServiceFactory.deleteLocalUser = function(id) {\r\n return $http.delete(serviceBase + 'api/user/local/'+id);\r\n }\r\n adminServiceFactory.setLocalUserEnable = function(enabled) {\r\n return $http.post(serviceBase + 'api/user/local/enable', enabled, { headers: { 'Content-Type': 'application/json' } });\r\n }\r\n adminServiceFactory.setLocalUserPassword = function(id, password) {\r\n return $http.put(serviceBase + 'api/user/local/'+id, JSON.stringify(password), { headers: { 'Content-Type': 'application/json' } });\r\n }\r\n adminServiceFactory.getLocalUserEnable = function() {\r\n return $http.get(serviceBase + 'api/user/local/enable');\r\n }\r\n \r\n // Syslog\r\n adminServiceFactory.getErrorList = function () {\r\n return $http.get(serviceBase + 'api/admin/log');\r\n };\r\n\r\n // Admin assignment\r\n adminServiceFactory.getAdminList = function () {\r\n return $http.get(serviceBase + 'api/admin/list');\r\n };\r\n\r\n adminServiceFactory.grantAdmin = function (data) {\r\n return $http.post(serviceBase + 'api/admin/grant', '\"' + data + '\"', { headers: { 'Content-Type': 'application/json' } });\r\n };\r\n\r\n adminServiceFactory.revokeAdmin = function (data) {\r\n return $http.post(serviceBase + 'api/admin/revoke', '\"' + data + '\"', { headers: { 'Content-Type': 'application/json' } });\r\n };\r\n\r\n adminServiceFactory.getPlaylistTitle = function() {\r\n return $http.get(serviceBase + 'api/playlist/name').then(function (results) {\r\n return results;\r\n });\r\n };\r\n \r\n // Student assignment\r\n adminServiceFactory.assign = function(ids) {\r\n return $http.post(serviceBase+\"api/admin/assign\",ids);\r\n }\r\n \r\n adminServiceFactory.unassign = function(ids) {\r\n return $http.post(serviceBase+\"api/admin/unassign\",ids);\r\n }\r\n \r\n // Cohorts\r\n adminServiceFactory.getCohortList = function () {\r\n return $http.get(serviceBase + 'api/cohort');\r\n };\r\n\r\n adminServiceFactory.createCohort = function(data) {\r\n return $http.put(serviceBase + 'api/cohort/', data);\r\n }\r\n adminServiceFactory.deleteCohort = function(id) {\r\n return $http.delete(serviceBase + 'api/cohort/' + id);\r\n }\r\n adminServiceFactory.setUserCohorts = function(data) {\r\n return $http.post(serviceBase + \"api/cohort/user\", data);\r\n }\r\n\r\n adminServiceFactory.enroll = function(flag,ids) {\r\n return $http.post(serviceBase+\"api/admin/cohort/\"+flag+\"/expel\",ids);\r\n }\r\n adminServiceFactory.expel = function(flag,ids) {\r\n return $http.post(serviceBase+\"api/admin/cohort/\"+flag+\"/enroll\",ids);\r\n }\r\n \r\n adminServiceFactory.getCohortsByUser = function(id) {\r\n return $http.get(serviceBase+\"api/user/\"+id);\r\n }\r\n\r\n // Settings\r\n adminServiceFactory.getAllSettings = function () {\r\n return $http.get(serviceBase + 'api/admin/settings');\r\n };\r\n\r\n adminServiceFactory.pushSetting = function(id, value)\r\n {\r\n return $http.post(serviceBase + 'api/admin/settings/' + id, value);\r\n };\r\n\r\n // Reports\r\n var _getReportMaster = function(tag) {\r\n return $http.get(serviceBase + 'api/admin/analytics'+tag); \r\n }\r\n \r\n adminServiceFactory.getReport = function () {\r\n return _getReportMaster('');\r\n };\r\n\r\n adminServiceFactory.getReportByDays = function (numberOfDays) {\r\n return _getReportMaster('/'+numberOfDays);\r\n };\r\n\r\n adminServiceFactory.getReportByKeyword = function (keyword) {\r\n return _getReportMaster('?search=' + keyword);\r\n };\r\n\r\n adminServiceFactory.getSiteReport = function() {\r\n return $http.get(serviceBase + 'api/site/' + siteSettings.siteName + '/analytics'); \r\n }\r\n\r\n adminServiceFactory.deleteAccount = function (data) {\r\n return $http.delete(serviceBase + 'api/user/' + data);\r\n };\r\n\r\n return adminServiceFactory;\r\n\r\n}]);\n/**\r\n * AdminController.js\r\n *\r\n */\r\n'use strict';\r\napp.controller('assignmentController', ['$scope', '$interval', 'adminService', 'modalService', function ($scope, $interval, adminService, modalService) {\r\n\r\n $scope.working = false;\r\n\r\n $scope.submissionList = '';\r\n $scope.results = null;\r\n\r\n var _assignOrUnassign = function(unassign) {\r\n $scope.working=true;\r\n\r\n if ($scope.submissionList == '') {\r\n $scope.working=false;\r\n modalService.alertModal(\"Please enter at least one StarID or TechID.\",false,\"Please Try Again\",\"#600\");\r\n return;\r\n }\r\n\r\n if (unassign) {\r\n var method = adminService.unassign\r\n }\r\n else {\r\n var method = adminService.assign\r\n }\r\n\r\n // Filter the list to remove duplicates and empties\r\n var result = [];\r\n $scope.submissionList.split(\"\\n\").forEach(function(item) {\r\n if(result.indexOf(item) < 0) {\r\n result.push(item);\r\n }\r\n })\r\n \r\n result = result.filter(function(a) {\r\n return a !== '';\r\n });\r\n\r\n method(result).then(function(data) {\r\n $scope.results = data.data.data;\r\n $scope.working=false;\r\n }, function() {\r\n $scope.working=false;\r\n modalService.alertModal(\"Something went wrong. Please contact the application developer.\",false,\"Error\",\"#600\");\r\n });\r\n\r\n }\r\n $scope.assign = function() {\r\n _assignOrUnassign(false);\r\n }\r\n\r\n $scope.unassign = function() {\r\n _assignOrUnassign(true);\r\n }\r\n\r\n}]);\r\n\n'use strict';\r\napp.controller('cohortController', ['$scope', 'adminService', 'modalService', function ($scope, adminService, modalService) {\r\n\r\n $scope.activity = {\r\n \"addingCohort\": false,\r\n \"deletingCohort\": false\r\n };\r\n\r\n $scope.cards = [\r\n {\r\n \"id\": \"editCohorts\",\r\n \"title\": \"Add/Delete Cohorts\",\r\n \"icon\": \"list-ul\",\r\n \"active\": true\r\n },\r\n {\r\n \"id\": \"assignStudents\",\r\n \"title\": \"Student Cohorts\",\r\n \"icon\": \"user\",\r\n \"active\": false\r\n },\r\n {\r\n \"id\": \"bulk\",\r\n \"title\": \"Bulk Enroll\",\r\n \"icon\": \"group\",\r\n \"active\": false\r\n }\r\n ];\r\n\r\n $scope.selectedStudent = null;\r\n\r\n $scope.newCohort = {\r\n \"flagName\": \"\",\r\n \"flagDescription\": \"\"\r\n }\r\n\r\n $scope.enrollment = {\r\n id: null,\r\n studentId: null,\r\n userList: []\r\n };\r\n \r\n $scope.newCohort = {\"name\":\"\",\"description\":\"\"};\r\n\r\n $scope.busy=false;\r\n\r\n $scope.isActive = function(ui) {\r\n var item = $scope.cards.filter(function(c) { return c.id == ui });\r\n if (!item) return false;\r\n return (item[0]['active'] == true);\r\n }\r\n \r\n $scope.showUI = function(ui) {\r\n $scope.cards.forEach(function(c) {\r\n c['active'] = false;\r\n });\r\n $scope.selectedStudent=null;\r\n $scope.result=null;\r\n ui.active = true;\r\n }\r\n\r\n $scope.toggleCohort = function(id) {\r\n \r\n var index = $scope.selectedStudent.cohorts.indexOf(id);\r\n\r\n if (index == -1) {\r\n $scope.selectedStudent.cohorts.push(id);\r\n }\r\n else {\r\n $scope.selectedStudent.cohorts.splice(index,1);\r\n }\r\n }\r\n\r\n $scope.updateCohortList = function() {\r\n adminService.getCohortList().then(function(data) {\r\n $scope.cohorts = data.data.data;\r\n });\r\n }\r\n\r\n $scope.updateCohortList();\r\n\r\n $scope.lookupStudent = function() {\r\n\r\n $scope.selectedStudent = null;\r\n\r\n if (!$scope.enrollment.studentId) {\r\n modalService.alertModal(\"Please enter a StarID or Tech ID.\",false,\"Error\",\"#600\");\r\n return; \r\n }\r\n\r\n $scope.busy=true;\r\n adminService.getCohortsByUser($scope.enrollment.studentId).then(function(data) {\r\n $scope.busy=false;\r\n $scope.selectedStudent = data.data.data;\r\n }, function(error) {\r\n var errMsg;\r\n $scope.selectedStudent = null;\r\n $scope.busy=false;\r\n if (error.data==null)\r\n {\r\n errMsg = \"Could not reach the server. Please try again later.\";\r\n }\r\n else {\r\n errMsg = error.data.message;\r\n }\r\n modalService.alertModal(errMsg,false,\"Error\",\"#600\");\r\n });\r\n }\r\n\r\n $scope.clearCohorts = function() {\r\n $scope.selectedStudent.cohorts=[];\r\n }\r\n\r\n $scope.addCohort = function(cohort) {\r\n //console.log(\"About to try to add this cohort: \");\r\n //console.dir(cohort);\r\n //console.dir($scope);\r\n $scope.activity.addingCohort = true;\r\n adminService.addCohort(cohort.flagName, cohort.flagDescription).then(function(data) {\r\n $scope.cohorts.push(JSON.parse(JSON.stringify(cohort)));\r\n $scope.newCohort.flagName=\"\";\r\n $scope.newCohort.flagDescription=\"\";\r\n $scope.activity.addingCohort=false; \r\n }, function(data) {\r\n console.dir(data);\r\n var msg = \"\";\r\n if (data.data.error==400) {\r\n msg = data.data.message;\r\n }\r\n else if (data.data.error==500) {\r\n msg = siteSettings.customMessage.GeneralAPIError;\r\n }\r\n else {\r\n msg = siteSettings.customMessages.GeneralAPIError;\r\n }\r\n modalService.alertModal(msg,false,\"Error\",\"#600\");\r\n $scope.activity.addingCohort=false; \r\n });\r\n }\r\n\r\n $scope.deleteCohort = function(cohort) {\r\n if ($scope.cohorts.length < 2) {\r\n modalService.alertModal(\"You cannot delete the only cohort!\",false,\"Error\",\"#600\");\r\n return;\r\n }\r\n modalService.confirmModal(\"Are you sure you want to DELETE the cohort '\"+cohort.flagDescription+\"'? Removing this cohort will automatically un-assign it from all users and content to which it is currently assigned - this can have unexpected side-effects.\",\"Please Confirm\").then(function() {\r\n $scope.busy=true;\r\n adminService.deleteCohort(cohort.flagId).then(function() {\r\n $scope.busy=false;\r\n $scope.updateCohortList();\r\n modalService.alertModal(\"Cohort successfully deleted!\",false,\"Success\",\"#060\");\r\n \r\n }, function(err) {\r\n $scope.busy=false;\r\n modalService.alertModal(err.data.message+\" Please contact the application developer.\",false,\"Error\",\"#600\");\r\n })\r\n });\r\n }\r\n\r\n $scope.createCohort = function() {\r\n $scope.busy=true;\r\n if (!$scope.newCohort.flagName || 0 === $scope.newCohort.flagName.length) {\r\n modalService.alertModal(\"Please enter an ID for your new cohort. It should consist only of lowercase letters, numbers and the underscore (_) symbol. No spaces or special characters, please.\",false,\"Error\",\"#600\");\r\n return;\r\n }\r\n if (!$scope.newCohort.flagDescription || 0 === $scope.newCohort.flagDescription.length) {\r\n modalService.alertModal(\"Please enter a name for your cohort. This name will be used to refer to the cohort throughout hte system.\",false,\"Error\",\"#600\");\r\n return;\r\n }\r\n\r\n var newCohort = {\r\n \"name\": $scope.newCohort.flagName,\r\n \"description\": $scope.newCohort.flagDescription\r\n };\r\n\r\n $scope.busy=true;\r\n console.dir(newCohort);\r\n adminService.createCohort(newCohort).then(function() {\r\n $scope.busy=false;\r\n $scope.updateCohortList();\r\n $scope.newCohort.flagName=\"\";\r\n $scope.newCohort.flagDescription=\"\";\r\n modalService.alertModal(\"Cohort successfully added!\",false,\"Success\",\"#060\");\r\n \r\n }, function(err) {\r\n $scope.busy=false;\r\n modalService.alertModal(err.data.message+\" Please contact the application developer.\",false,\"Error\",\"#600\");\r\n })\r\n\r\n }\r\n\r\n $scope.submitCohortChanges = function() {\r\n var submission = {\r\n \"userId\": $scope.selectedStudent.userId,\r\n \"cohorts\": $scope.selectedStudent.cohorts\r\n };\r\n\r\n $scope.busy=true;\r\n console.dir(submission);\r\n adminService.setUserCohorts(submission).then(function() {\r\n $scope.busy=false;\r\n $scope.updateCohortList();\r\n modalService.alertModal(\"Cohorts successfully updated!\",false,\"Success\",\"#060\");\r\n \r\n }, function(err) {\r\n $scope.busy=false;\r\n modalService.alertModal(err.data.message+\" Please contact the application developer.\",false,\"Error\",\"#600\");\r\n })\r\n }\r\n\r\n var _assignOrUnassign = function(unassign) {\r\n\r\n var id = $scope.enrollment.id;\r\n \r\n if ($scope.enrollment.userList == '') {\r\n modalService.alertModal(\"Please enter at least one StarID or TechID.\",false,\"Please Try Again\",\"#600\");\r\n return;\r\n }\r\n\r\n if ($scope.enrollment.id == null) {\r\n modalService.alertModal(\"Please select a cohort to enroll users in or remove users from.\",false,\"Please Try Again\",\"#600\");\r\n return;\r\n }\r\n\r\n $scope.busy=true;\r\n $scope.results=null;\r\n\r\n if (unassign) {\r\n var method = adminService.enroll\r\n }\r\n else {\r\n var method = adminService.expel\r\n }\r\n\r\n // Filter the list to remove duplicates and empties\r\n var result = [];\r\n $scope.enrollment.userList.split(\"\\n\").forEach(function(item) {\r\n if(result.indexOf(item) < 0) {\r\n result.push(item);\r\n }\r\n })\r\n \r\n result = result.filter(function(a) {\r\n return a !== '';\r\n });\r\n\r\n $scope.busy=false;\r\n\r\n //return;\r\n\r\n method(id,result).then(function(data) {\r\n $scope.results = data.data.data;\r\n $scope.busy=false;\r\n }, function() {\r\n $scope.busy=false;\r\n modalService.alertModal(\"Something went wrong. Please contact the application developer.\",false,\"Error\",\"#600\");\r\n });\r\n\r\n }\r\n $scope.enroll = function(id) {\r\n _assignOrUnassign(false,id);\r\n }\r\n\r\n $scope.remove = function(id) {\r\n _assignOrUnassign(true,id);\r\n }\r\n}]);\r\n\n'use strict';\r\napp.controller('logController', ['$scope', '$log', '$state', 'adminService', \"modalService\", function ($scope, $log, $state, adminService, modalService) {\r\n\r\n $scope.errors = [];\r\n \r\n $scope.getErrorLog = function () {\r\n adminService.getErrorList().then(function (response) {\r\n if (response.data.error > 0) {\r\n $log.error(\"An error has occurred.\\nError: \" + response.data.error + \" (\" + response.data.error.message + \")\");\r\n modalService.alertModal(response.data.error.message);\r\n } else {\r\n $scope.errors = response.data.data;\r\n console.dir($scope.errors);\r\n }\r\n }, function (response) {\r\n if (response.status == 401) {\r\n $state.go('login');\r\n return;\r\n }\r\n $log.error(\"An error has occurred while retrieving the error list.\\nHTTP error: \" + response.status);\r\n modalService.alertModal(customMessages['GeneralAPIError']);\r\n });\r\n };\r\n\r\n $scope.getErrorLog();\r\n\r\n}]);\r\n\n/**\r\n * PlaylistController.js\r\n */\r\n'use strict';\r\napp.controller('PlaylistController', ['$scope', '$log', '$state', 'adminService', 'modalService', function ($scope, $log, $state, adminService, modalService) {\r\n\r\n $scope.newSection = { };\r\n\r\n // June-July 2019 Rewrite\r\n $scope.extractEditablePlaylist = function() {\r\n // Get the playlist from the server\r\n adminService.getPlaylist().then(function (response) {\r\n // If something went wrong display an error.\r\n if (response.data.error > 0) {\r\n $log.error(\"An error has occurred.\\nError: \" + response.data.error + \" (\" + response.data.error.message + \")\");\r\n modalService.alertModal(response.data.error.message);\r\n } else {\r\n // Convert playlist to editable form\r\n var pl = response.data.data;\r\n $scope.playlist = [];\r\n // Iterate sections\r\n for ($i = 0; $i < pl.length; $i++) {\r\n var sec = {\r\n \"id\": pl[$i][0].sectionId,\r\n \"type\": \"section\",\r\n \"title\": pl[$i][0].sectionTitle,\r\n \"items\": [],\r\n \"editing\": false\r\n };\r\n\r\n for ($j = 0; $j < pl[$i].length; $j++)\r\n {\r\n var s = pl[$i];\r\n var item = {\r\n \"id\": s[$j].itemId,\r\n \"type\": s[$j].itemType,\r\n \"title\": s[$j].contentTitle\r\n };\r\n if (item.type=='q') {\r\n item.title = s[$j].sectionTitle + \" -- SECTION QUIZ\";\r\n }\r\n if (item.type=='s') {\r\n item.title = \"Cohort Selection Screen\";\r\n }\r\n sec.items.push(item);\r\n }\r\n\r\n if (sec.title==\"\") {\r\n sec.title = \"(Untitled Section)\";\r\n }\r\n $scope.playlist.push(sec);\r\n //console.dir(pl[$i]);\r\n }\r\n\r\n adminService.getPlaylistUnused().then(function (response) {\r\n $scope.playlistUnassigned = []\r\n var uc = response.data.data;\r\n for ($k = 0; $k < uc.length; $k++) {\r\n var c = {\r\n \"type\": \"c\",\r\n \"id\": uc[$k].id,\r\n \"title\": uc[$k].title\r\n };\r\n $scope.playlistUnassigned.push(c);\r\n }\r\n\r\n console.dir($scope.playlistUnassigned);\r\n $scope.loading = false;\r\n }, function(response) {\r\n $log.error(\"An error has occurred while retrieving unused content pages.\\nHTTP error: \" + response.status);\r\n });\r\n }\r\n }, function (response) {\r\n // Normal routine to drop to login if 401 unauthorized.\r\n if (response.status == 401) {\r\n $state.go('login');\r\n return;\r\n }\r\n $log.error(\"An error has occurred while retrieving the playlist.\\nHTTP error: \" + response.status);\r\n modalService.alertModal(customMessages['GeneralAPIError']);\r\n });\r\n };\r\n\r\n $scope.startNewSection = function() {\r\n $scope.newSection.active = true;\r\n }\r\n $scope.cancelNewSection = function() {\r\n $scope.newSection = {\r\n \"id\": -1,\r\n \"type\": \"section\",\r\n \"title\": \"\",\r\n \"items\": [],\r\n \"error\": false,\r\n \"active\": false\r\n };\r\n }\r\n $scope.commitNewSection = function() {\r\n if ($scope.newSection.title == \"\") {\r\n $scope.newSection.error = true;\r\n return;\r\n }\r\n $scope.playlist.push({\r\n \"id\": -1,\r\n \"type\": \"section\",\r\n \"title\": $scope.newSection.title,\r\n \"items\": [],\r\n \"editing\": false\r\n });\r\n $scope.cancelNewSection();\r\n }\r\n\r\n $scope.editExistingSection = function(sec) {\r\n sec.newTitle = sec.title;\r\n sec.editing=true;\r\n }\r\n $scope.saveEditExistingSection = function(sec) {\r\n sec.title = sec.newTitle;\r\n sec.editing=false;\r\n }\r\n $scope.cancelEditExistingSection = function(sec) {\r\n sec.editing=false;\r\n }\r\n $scope.deleteExistingSection = function(sec) {\r\n modalService.confirmModal('Are you sure you want to DELETE the section? All content pages will be moved to the Available Pages section and ANY QUIZ ASSOCIATED WITH THE SECTION WILL BE LOST.',\"Delete Section\").then(function () {\r\n for ($n = 0; $n < sec.items.length; $n++) {\r\n if (sec.items[$n].type == \"c\") $scope.playlistUnassigned.unshift(sec.items[$n]);\r\n }\r\n var index = $scope.playlist.indexOf(sec);\r\n if(index !== -1) {\r\n $scope.playlist.splice(index, 1);\r\n }\r\n });\r\n }\r\n\r\n $scope.toggleExpanded = function(section) {\r\n section.expanded = !section.expanded;\r\n }\r\n \r\n $scope.save = function() {\r\n var playlistOrder = 0;\r\n // build playlist\r\n var submissionPlaylist = [];\r\n\r\n angular.forEach($scope.playlist, function (value, key) {\r\n angular.forEach(value.items, function (v, k) {\r\n playlistOrder += 100;\r\n submissionPlaylist.push({\r\n \"playlistOrder\": playlistOrder,\r\n \"itemType\": v.type,\r\n \"itemId\": v.id,\r\n \"sectionName\": value.title,\r\n \"sectionId\": value.id\r\n });\r\n });\r\n });\r\n modalService.confirmModal('Are you sure you want to save the playlist?',\"Update Playlist\").then(function () { \r\n $scope.loading=true;\r\n adminService.updatePlaylist(JSON.stringify(submissionPlaylist)).then(function () {\r\n modalService.alertModal(\"The playlist has been successfully updated and is available to users immediately.\",false,\"Success\",\"#060\");\r\n $scope.extractEditablePlaylist();\r\n },\r\n function (error) {\r\n modalService.alertModal(error.data.message);\r\n });\r\n });\r\n }\r\n //Reset the playlist\r\n $scope.cancel = function () {\r\n modalService.confirmModal('Are you sure you want to undo ALL changes you have made to the playlist?',\"Reset Playlist\").then(function () {\r\n \r\n $scope.loading=true;\r\n $scope.extractEditablePlaylist();\r\n\r\n });\r\n };\r\n\r\n $scope.loading=true;\r\n\r\n // initialize newSection variable\r\n $scope.cancelNewSection();\r\n\r\n // retrieve current playlist\r\n $scope.extractEditablePlaylist();\r\n\r\n}]);\n/**\r\n * QuizCreateController.js\r\n */\r\n'use strict';\r\napp.controller('QuizCreateController', ['$scope', '$log', '$state', 'adminService', 'modalService', function ($scope, $log, $state, adminService, modalService) {\r\n\r\n //Intialize the variables\r\n\r\n $scope.section = {};\r\n\r\n $scope.noQuizSections = [];\r\n\r\n angular.forEach($scope.sections, function (value, key) {\r\n if (value.hasQuiz == 0) $scope.noQuizSections.push({ id: value.sectionId, name: value.sectionTitle});\r\n });\r\n\r\n $scope.questions = [];\r\n\r\n //Create a new question\r\n $scope.newQuestion = function () {\r\n var data = {\r\n \"question_text\": \"\",\r\n \"question_answers\": {\r\n 0: \"\",\r\n 1: \"\",\r\n 2: \"\",\r\n 3: \"\"\r\n }\r\n };\r\n $scope.questions.push(data);\r\n };\r\n\r\n // Add another answer option to a question\r\n $scope.addNewAnswer = function(q) {\r\n var numAnswers = q.question_answers.length();\r\n question_answers[numAnswers]=\"\";\r\n };\r\n\r\n $scope.newQuestion();\r\n\r\n //Remove selected question\r\n $scope.removeQuestion = function (question) {\r\n var index = $scope.questions.indexOf(question);\r\n $scope.questions.splice(index, 1);\r\n };\r\n\r\n //Save the newly created quiz\r\n $scope.save = function () {\r\n var data = new Array();\r\n var result = new Array();\r\n\r\n for (var i = 0; i < $scope.questions.length; i++) {\r\n var arr = new Array();\r\n for (var key in $scope.questions[i].question_answers) {\r\n if ($scope.questions[i].question_answers[key] != \"\")\r\n arr.push($scope.questions[i].question_answers[key]);\r\n }\r\n result.push(arr);\r\n data.push({\r\n 'questionText': $scope.questions[i].question_text,\r\n 'questionAnswers': result[i]\r\n });\r\n }\r\n\r\n modalService.confirmModal('Are you sure you want to save the quiz?',\"Update Quiz\").then(function () {\r\n if ($scope.questions.length != 0 && $scope.section.selected != -1) {\r\n console.dir($scope.section);\r\n adminService.updateQuiz(JSON.stringify(data), $scope.section.selected).then(function (response) {\r\n $scope.getQuizs();\r\n $scope.questions = [];\r\n $scope.section.selected = -1;\r\n //direct to quiz page\r\n $state.go('admin.quizzes');\r\n },\r\n function (error) {\r\n modalService.alertModal(error.data.message);\r\n });\r\n } else {\r\n modalService.alertModal('Please fill in at least one question and select the Section before saving.');\r\n }\r\n });\r\n };\r\n \r\n //Reset the quiz and redirect to quiz list\r\n $scope.cancel = function () {\r\n $scope.questions = [];\r\n $scope.section.selected = null;\r\n //direct to quiz page\r\n $state.go('admin.quizzes');\r\n };\r\n}]);\n/**\r\n * QuizEditController.js\r\n */\r\n'use strict';\r\napp.controller('QuizEditController', ['$scope', '$log', '$state', '$stateParams', 'studentService', 'adminService', 'modalService', function ($scope, $log, $state, $stateParams, studentService, adminService, modalService) {\r\n\r\n //Intialize the variables\r\n\r\n if ($stateParams.quiz) {\r\n //set the selected section value which is passed from quiz list page\r\n $scope.section = {\r\n selected: $stateParams.quiz.sectionId\r\n };\r\n\r\n // Get a particular quiz\r\n studentService.getQuiz($stateParams.quiz.sectionId).then(function (response) {\r\n if (response.data.error > 0) {\r\n $log.error(\"An error has occurred.\\nError: \" + response.data.error + \" (\" + response.data.error.message + \")\");\r\n modalService.alertModal(response.data.error.message);\r\n } else {\r\n $scope.questions = response.data.data.questions;\r\n //($scope.questions);\r\n }\r\n }, function (response) {\r\n $log.error(\"An error has occurred while retrieving the quiz.\\nHTTP error: \" + response.status);\r\n if (response.status == 400) {\r\n modalService.alertModal(response.data.message);\r\n } else {\r\n modalService.alertModal(customMessages['GeneralAPIError']);\r\n }\r\n });\r\n }\r\n\r\n //create a new question\r\n $scope.newQuestion = function () {\r\n var data = {\r\n \"question_text\": \"\",\r\n \"question_answers\": {\r\n 0: \"\",\r\n 1: \"\",\r\n 2: \"\",\r\n 3: \"\"\r\n }\r\n };\r\n $scope.questions.push(data);\r\n };\r\n\r\n // Add another answer option to a question\r\n $scope.addNewAnswer = function(q) {\r\n console.dir(q.question_answers);\r\n var numAnswers = q.question_answers.length;\r\n q.question_answers[numAnswers]=\"\";\r\n };\r\n\r\n //remove selected question\r\n $scope.removeQuestion = function (question) {\r\n var index = $scope.questions.indexOf(question);\r\n $scope.questions.splice(index, 1);\r\n };\r\n\r\n //update the edit quiz\r\n $scope.save = function () {\r\n var data = new Array();\r\n var result = new Array();\r\n\r\n for (var i = 0; i < $scope.questions.length; i++) {\r\n var arr = new Array();\r\n for (var key in $scope.questions[i].question_answers) {\r\n if ($scope.questions[i].question_answers[key] != \"\")\r\n arr.push($scope.questions[i].question_answers[key]);\r\n }\r\n result.push(arr);\r\n data.push({\r\n 'questionText': $scope.questions[i].question_text,\r\n 'questionAnswers': result[i]\r\n });\r\n }\r\n modalService.confirmModal('Are you sure you want to save the quiz?',\"Update Quiz\").then(function () {\r\n if ($scope.questions.length != 0 && $scope.section.selected != -1) {\r\n adminService.updateQuiz(JSON.stringify(data), $scope.section.selected).then(function (response) {\r\n $scope.getQuizs();\r\n $scope.questions = [];\r\n $scope.section.selected = -1;\r\n //direct to quiz page\r\n $state.go('admin.quizzes');\r\n },\r\n function (error) {\r\n modalService.alertModal(error.data.message);\r\n });\r\n } else {\r\n modalService.alertModal('Please fill in at least one question and select the Section before saving.');\r\n }\r\n });\r\n };\r\n \r\n //Reset the quiz and redirect to quiz list\r\n $scope.cancel = function () {\r\n $scope.questions = [];\r\n $scope.section.selected = null;\r\n //direct to quiz page\r\n $state.go('admin.quizzes');\r\n };\r\n}]);\n/**\r\n * QuizListController.js\r\n */\r\n'use strict';\r\napp.controller('QuizListController', ['$scope', '$log', '$state', 'adminService', 'modalService', function ($scope, $log, $state, adminService, modalService) {\r\n \r\n //call the getQuiz method in dashboard to list all the quizs\r\n $scope.getQuizs();\r\n\r\n //create a new quiz\r\n $scope.newQuiz = function () {\r\n //direct to quiz create page\r\n $state.go('admin.createQuiz');\r\n };\r\n\r\n //direct to edit quiz page screen\r\n $scope.editQuiz = function (quiz) {\r\n //direct to quiz edit page\r\n $state.go('admin.editQuiz', { quiz: quiz });\r\n };\r\n\r\n //remove a particular quiz \r\n $scope.removeQuiz = function (section) {\r\n modalService.confirmModal('Are you sure you want to delete the quiz for \\\"'+section.sectionTitle+'? This operation CANNOT be undone.',\"Delete Quiz\").then(function () {\r\n adminService.deleteQuiz(section.sectionId).then(function () {\r\n modalService.alertModal('The quiz was successfully deleted.',false,'Success!','#060');\r\n $scope.getQuizs();\r\n },\r\n function (error) {\r\n if (error.data.message) {\r\n modalService.alertModal(error.data.message);\r\n }\r\n else {\r\n modalService.alertModal('An undefined error occurred. Please report this bug to the develpment team.');\r\n }\r\n });\r\n });\r\n };\r\n\r\n}]);\n/*\r\n * reportController.js -- Manages the report display page for administrators\r\n *\r\n * (C) 2016-2019 B507\r\n */\r\n\r\n'use strict';\r\n\r\napp.controller('ReportController', ['$scope', '$log', '$filter', 'adminService', 'modalService', 'siteService', function ($scope, $log, $filter, adminService, modalService, siteService) {\r\n\r\n // Defines which cards are available.\r\n $scope.cards = [\r\n {\r\n \"title\": \"Student Status\",\r\n \"icon\": \"check\",\r\n \"active\": true\r\n },\r\n ];\r\n\r\n // Filters for displaying student status. Applied using the reportFilter filter.\r\n $scope.filters = {\r\n status: \"0\",\r\n days: \"0\",\r\n search: null\r\n };\r\n\r\n $scope.start_date = new Date();\r\n\r\n // Incremented each time a loading operation begins; decremented as they complete.\r\n $scope.loading = 0;\r\n\r\n // Set to True when a CSV is being generated.\r\n $scope.generating=false;\r\n\r\n // Options available for show dates\r\n $scope.showDates = {\r\n \"All\": \"0\",\r\n \"Today\": \"1\",\r\n \"Past Week\": \"7\",\r\n \"Past Month\": \"30\",\r\n \"Past Year\": \"365\"\r\n };\r\n\r\n //Initialize pagination variables\r\n $scope.pager = {\r\n ippChoices: [25, 50, 75, 100, 250],\r\n current: 1,\r\n ipp: 25,\r\n maxPageChoices: 5,\r\n count: 0\r\n };\r\n\r\n // Downloads report data from the server.\r\n $scope.getReport = function () {\r\n $scope.loading++;\r\n adminService.getReport().then(function (response) {\r\n $scope.loading--;\r\n if (response.data.error > 0) {\r\n $log.error(\"An error has occurred.\\nError: \" + response.data.error + \" (\" + response.data.error.message + \")\");\r\n modalService.alertModal(response.data.error.message);\r\n } else {\r\n $scope.report = response.data.data;\r\n for (var i = 0; i < $scope.report.length; i++) {\r\n if ($scope.report[i].endTime) {\r\n $scope.report[i].endTime_raw = $scope.report[i].endTime;\r\n $scope.report[i].endTime = moment($scope.report[i].endTime).format('MMMM Do, YYYY');\r\n }\r\n else {\r\n $scope.report[i].endTime = null;\r\n $scope.report[i].endTime_raw = null;\r\n }\r\n }\r\n $scope.full_report = $scope.report;\r\n if ($scope.report.length > 0)\r\n $scope.reportHeaders = Object.keys($scope.report[0]);\r\n $scope.totalItems = $scope.report.length;\r\n }\r\n }, function (response) {\r\n $scope.loading--;\r\n $log.error(\"An error has occurred while retrieving the report.\\nHTTP error: \" + response.status);\r\n modalService.alertModal(customMessages['GeneralError']);\r\n });\r\n };\r\n\r\n //pull all the report information for displaying it in tabular format\r\n $scope.getSiteReport = function () {\r\n $scope.loading++;\r\n adminService.getSiteReport().then(function (response) {\r\n $scope.loading--;\r\n\r\n $scope.siteReport = {}\r\n for (var i = 0; i < response.data.data.rows.length; i++) {\r\n var localItem = response.data.data.rows[i];\r\n var userId = JSON.parse(JSON.stringify(localItem['userId']));\r\n //localItem['userId']=null;\r\n $scope.siteReport[userId]=localItem;\r\n }\r\n $scope.siteHeaders = response.data.data.headers;\r\n\r\n }, function () {\r\n $scope.loading--;\r\n console.info(\"Info: Site has no custom report columns.\");\r\n });\r\n };\r\n\r\n //Reset user account so the user starts orientation from the begining\r\n $scope.deleteAccount = function (account) {\r\n modalService.confirmModal('Are you sure you want to reset the user account for ' + account.userId + '? This will erase the student\\'s progress (including quiz attempts) from the system, and the student will start over from the beginning as if they had not previously started orientation.',\"Reset User Account\").then(function () {\r\n if (account.userId) {\r\n adminService.deleteAccount(account.userId).then(function (response) {\r\n modalService.alertModal(account.userId+\" has been successfully reset.\",false,\"Success\",\"#060\");\r\n $scope.getReport();\r\n },\r\n function (error) {\r\n modalService.alertModal((error.data.message?error.data.message:\"An undefined error occurred. Please report this bug to the development team.\"),false,\"Error\",\"#600\");\r\n });\r\n }\r\n else {\r\n modalService.alertModal(\"Error deleting account: account object does not contain StarID. Please report this bug to the development team.\",false,\"Error\",\"#600\");\r\n }\r\n });\r\n };\r\n\r\n\r\n // Generates and \"downloads\" a CSV file of the currently displayed student(s) based on the set filters.\r\n $scope.generateCsv = function() {\r\n $scope.generating=true;\r\n // String to hold the entire CSV file's contents\r\n var csvString = '';\r\n\r\n var filteredReport = $filter('reportFilter')($scope.report,$scope.filters);\r\n\r\n // Add headers\r\n angular.forEach($scope.reportHeaders, function (value, key) {\r\n //To fix name which has both first and last names separated by coma\r\n if (value==\"endTime_raw\") return;\r\n if (value == 'Name')\r\n value = '\"Last Name\",\"First Name\"';\r\n else\r\n csvString = csvString + '\"' + value + '\",';\r\n });\r\n angular.forEach($scope.siteHeaders, function (value, key) {\r\n csvString = csvString + '\"' + value[1] + '\",';\r\n });\r\n csvString = csvString.slice(0,-1) + \"\\n\";\r\n\r\n // Add each row of the report\r\n angular.forEach(filteredReport, function (row, key) {\r\n angular.forEach(row, function (value, k) {\r\n if (!k.includes('$') && k != \"endTime_raw\"){\r\n csvString = csvString + '\"' + value + '\",';\r\n }\r\n });\r\n if ($scope.siteReport !== undefined) {\r\n var siteData = $scope.siteReport[row['userId']];\r\n if (siteData !== undefined) {\r\n angular.forEach($scope.siteHeaders,function(v) {\r\n var keyName = v[0];\r\n var value = siteData[keyName]\r\n csvString = csvString + '\"' + value + '\",';\r\n });\r\n }\r\n else {\r\n var reptString = '\"\",';\r\n csvString = csvString + reptString.repeat($scope.siteHeaders.length);\r\n }\r\n }\r\n csvString = csvString.slice(0,-1) + \"\\n\";\r\n });\r\n\r\n // Generate and click a link dynamically\r\n var a = $('', {\r\n style: 'display:none',\r\n href: 'data:application/octet-stream;base64,' + btoa(csvString),\r\n download: 'orientation-report.csv'\r\n }).appendTo('body')\r\n a[0].click()\r\n a.remove();\r\n\r\n $scope.generating=false;\r\n\r\n }\r\n\r\n $scope.filterDate = function() {\r\n var input = $('#start_date');\r\n\r\n var start_date = moment(input.val());\r\n var today = moment(new Date());\r\n\r\n $scope.filters.days = today.diff(start_date, 'days');\r\n }\r\n\r\n // START PAGE LOAD CODE\r\n\r\n // Get reports\r\n $scope.getReport();\r\n $scope.getSiteReport();\r\n\r\n // Try to get the number of days in this semester.\r\n siteService.getSemesterDaysElapsed().then(function(data) {\r\n $scope.showDates[\"This Semester\"] = data.data;\r\n }, function() {\r\n // If not, log condition and don't add the new entry.\r\n console.info(\"Info: Site is not enabled for semester timeframes.\");\r\n });\r\n\r\n}]);\r\n\n/**\r\n * reportFilter.js\r\n */\r\n'use strict';\r\n\r\n// 3-25-19 New report filter function\r\napp.filter('reportPageFilter', function() {\r\n return function(reportData, pagerState) {\r\n pagerState.count = reportData.length; // update page count\r\n var startIndex = (pagerState.current - 1) * pagerState.ipp;\r\n var result = reportData.slice(startIndex, pagerState.ipp+startIndex);\r\n return result;\r\n }\r\n});\r\n\r\napp.filter('reportFilter', function() {\r\n\r\n return function(reportData, filterOptions) {\r\n \r\n var filteredResults = []\r\n angular.forEach(reportData, function(item) {\r\n var shouldInclude=true;\r\n\r\n // Filter completed/not completed\r\n if (filterOptions.status==\"1\" && item.endTime==null) shouldInclude=false;\r\n if (filterOptions.status==\"-1\" && item.endTime!=null) shouldInclude=false;\r\n\r\n // Filter days\r\n if (filterOptions.days != \"0\" && item.endTime_raw != null) {\r\n var filterDays = parseInt(filterOptions.days);\r\n var sinceDate = moment().subtract(filterDays,\"days\");\r\n var thisEntryEndDate = moment(item.endTime_raw);\r\n if (thisEntryEndDate < sinceDate) shouldInclude=false;\r\n\r\n }\r\n\r\n // Process search box\r\n if (filterOptions.search) {\r\n if (\r\n item.userId.toLowerCase().indexOf(filterOptions.search.toLowerCase()) == -1 &&\r\n item.name.toLowerCase().indexOf(filterOptions.search.toLowerCase()) == -1\r\n ) shouldInclude=false;\r\n }\r\n if (shouldInclude) filteredResults.push(item);\r\n })\r\n\r\n return filteredResults;\r\n\r\n };\r\n});\r\n\n/**\r\n * AdminController.js\r\n *\r\n */\r\n'use strict';\r\napp.controller('SettingsController', ['$timeout', '$scope', '$log', 'adminService', 'modalService', function ($timeout, $scope, $log, adminService, modalService) {\r\n\r\n //edit a new section\r\n $scope.displaySettings = function () {\r\n adminService.getAllSettings().then(function (response) {\r\n\r\n $scope.settings = response.data.data;\r\n \r\n }, function (response) {\r\n $log.error(\"An error has occurred while retrieving the list of settings.\\nHTTP error: \" + response.status);\r\n modalService.alertModal(\"Unable to retrieve list of settings. Please contact B507 for assistance.\");\r\n });\r\n }; \r\n\r\n $scope.setChanged = function (opt) {\r\n opt.hasChanged = true;\r\n }\r\n\r\n $scope.submitSettings = function() {\r\n $scope.state.submit = 1\r\n for ($i = 0; $i < $scope.settings.length; $i++) {\r\n\r\n var thisSetting = $scope.settings[$i];\r\n\r\n if (thisSetting.hasChanged)\r\n {\r\n adminService.pushSetting(thisSetting.optionId, JSON.stringify(thisSetting.optionValue));\r\n }\r\n }\r\n $timeout(function() {\r\n $scope.state.submit = 2;\r\n for ($i = 0; $i < $scope.settings.length; $i++) {\r\n \r\n var thisSetting = $scope.settings[$i];\r\n \r\n thisSetting.hasChanged = false;\r\n }\r\n }, 1000);\r\n }\r\n\r\n // Entry point for controller.\r\n $scope.state = {\r\n 'submitting': false,\r\n 'submitted': 0\r\n };\r\n\r\n $scope.displaySettings();\r\n\r\n}]);\r\n\n/**\r\n * SlideController.js\r\n *\r\n */\r\n'use strict';\r\napp.controller('SlideController', ['$scope', '$log', '$state', 'adminService', 'modalService', function ($scope, $log, $state, adminService, modalService) {\r\n\r\n $scope.expandedList = [];\r\n $scope.loading=true;\r\n\r\n $scope.loadPlaylist = function() {\r\n adminService.getPlaylist().then(function(data) {\r\n\r\n var displayPlaylist = [];\r\n \r\n data.data.data.forEach(function(i) {\r\n var sectionFiltered = i.filter(function(j) {\r\n return j.itemType==\"c\";\r\n });\r\n if (sectionFiltered.length > 0) {\r\n displayPlaylist.push({\r\n id: sectionFiltered[0].sectionId,\r\n sid: sectionFiltered[0].sectionId,\r\n title: sectionFiltered[0].sectionTitle,\r\n type: 'section'\r\n });\r\n sectionFiltered.forEach(function(j) {\r\n displayPlaylist.push({\r\n id: j.itemId,\r\n sid: j.sectionId,\r\n title: j.contentTitle,\r\n type: 'content'\r\n }); \r\n })\r\n }\r\n })\r\n $scope.playlist = displayPlaylist;\r\n $scope.loading=false;\r\n })\r\n };\r\n\r\n $scope.toggleSection = function(id) {\r\n var index = $scope.expandedList.indexOf(id);\r\n if (index == -1) {\r\n $scope.expandedList.push(id);\r\n }\r\n else {\r\n $scope.expandedList.splice(index,1);\r\n }\r\n }\r\n //create a new slide\r\n $scope.newSlide = function () {\r\n //direct to slide create page\r\n $state.go('admin.editSlide');\r\n };\r\n\r\n //edit a new slide\r\n $scope.editSlide = function (content) {\r\n //direct to slide edit page\r\n $state.go('admin.editSlide', { content: content });\r\n };\r\n\r\n //remove a particular slide\r\n $scope.removeSlide = function (id) {\r\n modalService.confirmModal('Are you sure you want to delete this slide?',\"Delete Slide\").then(function () {\r\n if (id || id == 0) {\r\n adminService.deleteSlide(id).then(function (response) {\r\n $scope.loadPlaylist();\r\n },\r\n function (error) {\r\n if (error.data == null) {\r\n modalService.alertModal('Unable to reach the server.',false,'Error','#600');\r\n }\r\n else {\r\n modalService.alertModal(error.data.message,false,'Error','#600');\r\n }\r\n });\r\n }\r\n });\r\n };\r\n\r\n $scope.loadPlaylist();\r\n}]);\r\n\n'use strict';\r\napp.controller('slideEditorController', ['$scope', '$state', '$stateParams', 'adminService', 'studentService', 'modalService', function ($scope, $state, $stateParams, adminService, studentService, modalService) {\r\n\r\n adminService.getCohortList().then(function(data) {\r\n $scope.cohorts = data.data.data;\r\n console.dir($scope.cohorts);\r\n });\r\n\r\n adminService.getSectionList().then(function (response) {\r\n if (response.data.error > 0) {\r\n $log.error(\"An error has occurred.\\nError: \" + response.data.error + \" (\" + response.data.error.message + \")\");\r\n modalService.alertModal(response.data.error.message);\r\n } else {\r\n $scope.sectionValues = {};\r\n angular.forEach(response.data.data, function(x) {\r\n $scope.sectionValues[x.sectionId]=x.sectionTitle;\r\n });\r\n }\r\n });\r\n\r\n $scope.loading=false;\r\n\r\n $scope.contentData = {\r\n contentId: -1,\r\n cohorts: [],\r\n type: \"content\",\r\n }\r\n\r\n $scope.youtube = {\r\n url: \"\",\r\n testing: false\r\n }\r\n\r\n if ($stateParams.content != null) {\r\n studentService.getContent($stateParams.content).then(function (response) {\r\n $scope.contentData.title = response.data.data.title;\r\n $scope.contentData.sectionId = response.data.data.section_id.toString();\r\n $scope.contentData.contentId = parseInt($stateParams.content);\r\n\r\n $scope.contentData.cohorts = response.data.data.cohort_id_list;\r\n\r\n if (response.data.data.md_content.substring(0,9) == \"@youtube:\") {\r\n\r\n $scope.contentData.youtubeId = response.data.data.md_content.substring(9);\r\n $scope.contentData.type = \"youtube\";\r\n }\r\n else {\r\n $scope.contentData.html = response.data.data.html_content;\r\n $scope.contentData.markdown = response.data.data.md_content;\r\n }\r\n\r\n }, function(error) {\r\n if (error.data==null) {\r\n modalService.alertModal('Could not reach the server.',false,'Error','#600');\r\n }\r\n else {\r\n modalService.alertModal(error.data.message,false,'Error','#600');\r\n }\r\n })\r\n }\r\n\r\n $scope.toggleCohort = function(id) {\r\n \r\n var index = $scope.contentData.cohorts.indexOf(id);\r\n\r\n if (index == -1) {\r\n $scope.contentData.cohorts.push(id);\r\n }\r\n else {\r\n $scope.contentData.cohorts.splice(index,1);\r\n }\r\n }\r\n //CKEDITOR.replace(\"ckeditor_textarea\");\r\n\r\n $scope.clearCohorts = function() {\r\n $scope.contentData.cohorts = [];\r\n }\r\n \r\n $scope.testYoutube = function() {\r\n $scope.youtube.url = \"//www.youtube.com/embed/\"+$scope.contentData.youtubeId+\"?rel=0\"; \r\n $scope.youtube.active = true;\r\n }\r\n\r\n $scope.resyncMarkdownHtml = function(toHtml) {\r\n if (toHtml) {\r\n // Convert current markdown to html\r\n var converter = new showdown.Converter();\r\n $scope.contentData.html = converter.makeHtml($scope.contentData.markdown);\r\n }\r\n else {\r\n // Convert current html to markdown\r\n var turndown = new TurndownService();\r\n $scope.contentData.markdown = turndown.turndown($scope.contentData.html || '');\r\n }\r\n }\r\n $scope.save = function() {\r\n var turndown = new TurndownService();\r\n\r\n $scope.loading=true;\r\n\r\n var markdownContent = ($scope.contentData.type==\"raw_md\" ? $scope.contentData.markdown : turndown.turndown($scope.contentData.html || ''))\r\n // Setup the response object\r\n var contentSendObject = {\r\n contentId: $scope.contentData.contentId,\r\n contentTitle: $scope.contentData.title,\r\n sectionId: parseInt($scope.contentData.sectionId),\r\n contentData: markdownContent,\r\n headerImage: \"assets/images/default.png\",\r\n comment: \"\",\r\n }\r\n\r\n if ($scope.contentData.type==\"youtube\") {\r\n contentSendObject.contentData = \"@youtube:\"+$scope.contentData.youtubeId\r\n }\r\n\r\n adminService.putContent(contentSendObject.contentId,contentSendObject).then(function(response) {\r\n // We may have gotten a new content ID.\r\n var newContentId = response.data.data.contentId;\r\n adminService.putContentCohorts(newContentId,$scope.contentData.cohorts).then(function(response) {\r\n modalService.alertModal(\"Content page successfully added! It has been added to the end of your playlist. Use the Playlist Editor to move it to the proper position.\",false,\"Success\",\"#060\");\r\n $state.go(\"admin.slides\");\r\n },function(error) {\r\n if (error.data==null) {\r\n modalService.alertModal('Could not reach the server.',false,'Error','#600');\r\n }\r\n else {\r\n modalService.alertModal(error.data.message,false,'Error','#600');\r\n } \r\n })\r\n }, function(err) {\r\n if (error.data==null) {\r\n modalService.alertModal('Could not reach the server.',false,'Error','#600');\r\n }\r\n else {\r\n modalService.alertModal(error.data.message,false,'Error','#600');\r\n }\r\n });\r\n }\r\n\r\n $scope.cancel = function() {\r\n $state.go(\"admin.slides\");\r\n }\r\n\r\n}]);\n'use strict';\r\napp.controller('userController', ['$scope', '$uibModal', 'adminService', \"modalService\", function ($scope, $uibModal, adminService, modalService) {\r\n\r\n $scope.enable_users = false;\r\n $scope.loading=true;\r\n\r\n\r\n $scope.updateUsers = function() {\r\n $scope.loading=true;\r\n adminService.getAllLocalUsers().then(function(s) {\r\n $scope.users = s.data.data;\r\n $scope.loading=false;\r\n }), function(e) {\r\n console.error(e)\r\n $scope.loading=false;\r\n }\r\n };\r\n\r\n $scope.switchUserEnable = function() {\r\n adminService.setLocalUserEnable($scope.enable_users);\r\n console.log(\"enable state is now \" + $scope.enable_users);\r\n }\r\n\r\n $scope.openNewUserModal = function() {\r\n $uibModal.open({\r\n templateUrl: 'user_add.html',\r\n controller: 'userAddController'\r\n }).result.then(function(s) {\r\n var submission = {\r\n UserId: s.userId,\r\n FirstName: s.firstName,\r\n LastNAme: s.lastName,\r\n IsAdmin: s.isAdmin,\r\n PasswordInClearText: s.pw0\r\n };\r\n $scope.loading=true;\r\n adminService.addLocalUser(submission).then(function() {\r\n modalService.alertModal(\"The user '\"+s.userId+\"' was added successfully!\",false,\"Success!\",\"#080\");\r\n $scope.updateUsers();\r\n }, function() {\r\n modalService.alertModal(\"Oops! Something went wrong while trying to add the new user. Please try again later or contact the developers for assistance.\",false,\"Whoops!\",\"#800\");\r\n });\r\n }, function(e) {\r\n console.info(\"Canceled adding new user.\");\r\n });\r\n }\r\n\r\n $scope.openChangePasswordModal = function(user) {\r\n $uibModal.open({\r\n templateUrl: 'user_pwd.html',\r\n resolve: {\r\n injection: function() { return user; }\r\n },\r\n controller: 'userPasswordController'\r\n }).result.then(function(s) {\r\n $scope.loading=true;\r\n adminService.setLocalUserPassword(user.id, s).then(function() {\r\n modalService.alertModal(\"The password for user '\"+user.userId+\"' was reset successfully!\",false,\"Success!\",\"#080\");\r\n $scope.loading=false;\r\n }, function() {\r\n modalService.alertModal(\"Oops! Something went wrong while trying to reset the user's password. Please try again later or contact the developers for assistance.\",false,\"Whoops!\",\"#800\");\r\n });\r\n }, function(e) {\r\n console.info(\"Canceled updating user password.\");\r\n });\r\n }\r\n\r\n $scope.deleteLocalUser = function(user) {\r\n modalService.confirmModal(\"Are you sure you want to DELETE the user '\"+user.userId+\"? This will delete all information in the system associated with the user, including any progress and statistics information.\",\"Please Confirm!\",\"#880\").then(function() {\r\n $scope.loading=true;\r\n adminService.deleteLocalUser(user.id).then(function() {\r\n modalService.alertModal(\"The user '\"+user.userId+\"' was deleted successfully!\",false,\"Success!\",\"#080\");\r\n $scope.updateUsers();\r\n }, function() {\r\n modalService.alertModal(\"Oops! Something went wrong while trying to delete the user. Please try again later or contact the developers for assistance.\",false,\"Whoops!\",\"#800\");\r\n });\r\n });\r\n }\r\n $scope.updateUsers();\r\n\r\n adminService.getLocalUserEnable().then(function(s) {\r\n $scope.enable_users=s.data.data;\r\n }, function(e) {\r\n console.error(e);\r\n });\r\n\r\n}]);\r\n\r\napp.controller('userAddController', ['$scope', '$uibModalInstance', 'adminService', function($scope, $uibModalInstance, adminService) {\r\n\r\n $scope.newUser = {\r\n firstName: '',\r\n lastName: '',\r\n userId: '',\r\n pw0: '',\r\n pw1: '',\r\n isAdmin: false\r\n };\r\n\r\n $scope.err = '';\r\n\r\n $scope.cancel = function () {\r\n $uibModalInstance.dismiss('cancel');\r\n };\r\n $scope.ok = function () {\r\n // Validations\r\n var nw = $scope.newUser;\r\n console.dir(nw);\r\n if (nw.pw0 != nw.pw1){\r\n $scope.err='Passwords must be the same.';\r\n return;\r\n }\r\n if (nw.pw0=='') {\r\n $scope.err='Password cannot be blank.';\r\n return;\r\n }\r\n if (nw.userId=='') {\r\n $scope.err='You must provide a user ID.';\r\n return;\r\n }\r\n if (nw.firstName=='') {\r\n $scope.err='You must provide a first name.';\r\n return;\r\n }\r\n $uibModalInstance.close($scope.newUser);\r\n };\r\n\r\n}]);\r\n\r\napp.controller('userPasswordController', ['injection', '$scope', '$uibModalInstance', 'adminService', function(injection, $scope, $uibModalInstance, adminService) {\r\n\r\n $scope.newUser = {\r\n id: '',\r\n userId: '',\r\n pw0: '',\r\n pw1: '',\r\n isAdmin: false\r\n };\r\n\r\n $scope.newUser.userId = injection.userId;\r\n $scope.newUser.id = injection.id\r\n\r\n $scope.err = '';\r\n\r\n $scope.cancel = function () {\r\n $uibModalInstance.dismiss('cancel');\r\n };\r\n $scope.ok = function () {\r\n // Validations\r\n var nw = $scope.newUser;\r\n console.dir(nw);\r\n if (nw.pw0 != nw.pw1){\r\n $scope.err='Passwords must be the same.';\r\n return;\r\n }\r\n if (nw.pw0=='') {\r\n $scope.err='Password cannot be blank.';\r\n return;\r\n }\r\n $uibModalInstance.close(nw.pw0);\r\n };\r\n\r\n}]);\n/**\r\n * ContentController.js\r\n */\r\n'use strict';\r\n\r\napp.controller('ContentController', ['$scope', '$log', '$state', 'studentService', 'modalService', function ($scope, $log, $state, studentService, modalService) {\r\n\r\n $scope.videoState = 0;\r\n $scope.youtubeVideoId = '';\r\n\r\n $scope.hideSkipBtn = true;\r\n $scope.hideNextBtn = 1;\r\n $scope.hidePreviousBtn = 1;\r\n $scope.title = \"...\";\r\n $scope.media = \"assets/images/default.png\";\r\n $scope.loading=true;\r\n\r\n /**\r\n * Set the html content for given contentID so that we can display it on the view\r\n */\r\n\r\n $scope.$on('setLoading', function(event, obj) {\r\n $scope.title = \"...\";\r\n $scope.videoState = 0;\r\n $scope.html_content = \"

Loading, please wait...

\";\r\n $scope.hideNextBtn = 1;\r\n $scope.hidePreviousBtn = 1;\r\n $scope.loading=true;\r\n if ($scope.vid) {\r\n $scope.vid.pause();\r\n //$scope.vid.dispose();\r\n }\r\n });\r\n \r\n $scope.$on('setContent', function (event, obj) {\r\n console.debug(\"content: displaying content ID \"+obj.contentID);\r\n studentService.getContent(obj.contentID).then(function (response) {\r\n if (response.data.error > 0) {\r\n $log.error(\"An error has occurred.\\nError: \" + response.data.error + \" (\" + response.data.error.message + \")\");\r\n modalService.alertModal(response.data.error.message);\r\n } else {\r\n $scope.content = response.data;\r\n $scope.$parent.contentId = $scope.content.data.id;\r\n //set the section title\r\n $scope.section_title = $scope.content.data.section;\r\n //set the content title\r\n $scope.title = $scope.content.data.title;\r\n //set the media\r\n $scope.media = $scope.content.data.image;\r\n //set the html content\r\n $scope.html_content = $scope.content.data.html_content;\r\n\r\n // hide/unhide buttons as needed\r\n $scope.hideNextBtn = $scope.content.data.isLast;\r\n $scope.hidePreviousBtn = $scope.content.data.isFirst;\r\n\r\n $scope.$parent.loading=false;\r\n $scope.loading=false;\r\n\r\n // do we have a video?\r\n var checkForVideo = $scope.content.data.md_content;\r\n \r\n // URL can be a maximum of 255 characters.\r\n if (checkForVideo.substring(0,7) == \"@video:\" && checkForVideo.length < 262)\r\n {\r\n var videoUrl = checkForVideo.substring(7);\r\n\r\n var setupOpt = {\r\n 'controls': true,\r\n 'autoplay': true,\r\n 'preload': 'auto'\r\n };\r\n\r\n //create video js player dynamically\r\n console.log(\"setting up video player for url '\"+videoUrl+\"'\");\r\n videojs('slide-video', setupOpt, function () {\r\n $scope.vid = videojs('slide-video').src([{ type: \"video/mp4\", src: videoUrl }]);\r\n });\r\n\r\n $scope.videoState = 1;\r\n $scope.html_content = null;\r\n }\r\n // YouTube ID can be a maximum of 12 characters.\r\n else if (checkForVideo.substring(0,9)==\"@youtube:\" && checkForVideo.length < 25)\r\n {\r\n $scope.youtubeUrl = \"//www.youtube.com/embed/\"+checkForVideo.substring(9)+\"?rel=0\"; \r\n $scope.videoState = 2;\r\n $scope.html_content = null;\r\n }\r\n // A raw post can contain raw HTML without markdown, but it is still going to be sanitized by Angular.\r\n else if (checkForVideo.substring(0,5)==\"@raw:\") {\r\n $scope.videoState=0;\r\n $scope.html_content = checkForVideo.substring(5);\r\n }\r\n // Fallback \r\n else {\r\n if ($scope.vid != undefined) {\r\n $scope.vid.pause();\r\n //$scope.vid.dispose();\r\n } \r\n $scope.videoState = 0;\r\n }\r\n }\r\n }, function (response) {\r\n if (response.status == 401)\r\n {\r\n $state.go('login');\r\n return;\r\n }\r\n\r\n $log.error(\"An error has occurred while retrieving the content.\\nHTTP error: \" + response.status);\r\n if (response.status == 403) {\r\n modalService.alertModal(response.data.message);\r\n } else {\r\n modalService.alertModal(customMessages['GeneralAPIError']);\r\n }\r\n });\r\n });\r\n\r\n}]);\n/**\r\n * contentDirective.js\r\n */\r\n'use strict';\r\napp.directive('ooLinksInNewWindow', function () {\r\n return {\r\n priority: 10,\r\n link: function (scope, element, attrs) {\r\n scope.$watch(attrs.ngBindHtml, function (newvalue) {\r\n var elems = element.find('a');\r\n elems.attr('target', '_blank');\r\n\r\n // move focus for accessibility to the title\r\n $('#title-container').focus();\r\n });\r\n }\r\n };\r\n});\n/**\r\n * QuizController.js\r\n */\r\n'use strict';\r\napp.controller('QuizController', ['$scope', '$log', 'authService', 'studentService', 'modalService', function ($scope, $log, authService, studentService, modalService) {\r\n\r\n $scope.userAnswers = {}; // Declare userAnswers variable\r\n $scope.cohortQuiz = false; // specifies whether we are in cohort mode\r\n\r\n $scope.loading=false;\r\n $scope.submitting=false;\r\n\r\n // Get questions for a quiz\r\n $scope.$on('setQuizQuestions', function (event, obj) {\r\n $scope.questions = {};\r\n $scope.cohortQuiz = false;\r\n $scope.loading=true;\r\n studentService.getQuiz(obj.quizID).then(function (response) {\r\n $scope.loading=false;\r\n $scope.submitting=false;\r\n if (response.data.error > 0) {\r\n $log.error(\"An error has occurred.\\nError: \" + response.data.error + \" (\" + response.data.error.message + \")\");\r\n modalService.alertModal(response.data.error.message);\r\n } else {\r\n $scope.quizId = obj.quizID;\r\n $scope.questions = response.data.data.questions;\r\n $scope.seed = response.data.data.seed;\r\n }\r\n }, function (response) {\r\n $scope.loading=false;\r\n $scope.submitting=false;\r\n $log.error(\"An error has occurred while retrieving the quiz.\\nHTTP error: \" + response.status);\r\n if (response.status == 400) {\r\n modalService.alertModal(response.data.message);\r\n //when the quiz is already taken, call the get next item method to navigate user to next module in the playlist\r\n $scope.getNextItem();\r\n } else {\r\n modalService.alertModal(customMessages['GeneralAPIError']);\r\n }\r\n });\r\n });\r\n \r\n // Get questions for a cohort selection screen.\r\n $scope.$on('setCohortQuestions', function (event, obj) {\r\n $scope.cohortQuiz = true;\r\n $scope.questions = {};\r\n $scope.loading=true;\r\n studentService.getCohortSelectOptions(obj.playlistId).then(function (response) {\r\n $scope.loading=false;\r\n $scope.submitting=false;\r\n if (response.data.error > 0) {\r\n $log.error(\"An error has occurred.\\nError: \" + response.data.error + \" (\" + response.data.error.message + \")\");\r\n modalService.alertModal(response.data.error.message);\r\n } else {\r\n $scope.playlistId = obj.playlistId;\r\n $scope.questions = response.data.data.questions;\r\n //($scope.questions);\r\n $scope.seed = response.data.data.seed;\r\n }\r\n }, function (response) {\r\n $scope.loading=false;\r\n $scope.submitting=false;\r\n $log.error(\"An error has occurred while retrieving the selection list.\\nHTTP error: \" + response.status);\r\n if (response.status == 400) {\r\n modalService.alertModal(response.data.message);\r\n //when the quiz is already taken, call the get next item method to navigate user to next module in the playlist\r\n $scope.getNextItem();\r\n } else {\r\n modalService.alertModal(customMessages['GeneralAPIError']);\r\n }\r\n });\r\n });\r\n\r\n // Master submit function\r\n $scope.submitData = function () {\r\n if ($scope.cohortQuiz) {\r\n $scope.submitCohorts();\r\n }\r\n else {\r\n $scope.gradeQuiz();\r\n }\r\n }\r\n\r\n // Submit quiz responses \r\n $scope.gradeQuiz = function () {\r\n var promptString = 'Are you sure you want to submit your quiz?'\r\n if ($scope.quiz_id == 0) // special case handling for the student status quiz\r\n {\r\n var whichSchool = document.getElementById(\"question0_answer\" + $scope.userAnswers[0] + \"_label\").innerText;\r\n\r\n var isMilitary = $scope.userAnswers[1];\r\n\r\n promptString = 'You have indicated that you are attending classes at location \"' + whichSchool + '\" and that ';\r\n\r\n promptString += (isMilitary == 0 ? 'you have served or are currently serving in the US Military. ' :\r\n 'you have NOT served and are not currently serving in the US Military. ');\r\n\r\n promptString += 'Are these responses correct? (Please note that you cannot change these responses later on your own. If you make an error at this point, you will need to contact the Office of Extended Education in order to change your responses.)';\r\n }\r\n modalService.confirmModal(promptString,\"Submit Quiz\").then(function () {\r\n var answers = [];\r\n angular.forEach($scope.userAnswers, function (value, key) {\r\n this.push(value);\r\n }, answers);\r\n var data = JSON.stringify({\r\n seed: $scope.seed,\r\n answers: answers\r\n });\r\n if (answers.length == $scope.questions.length) {\r\n $scope.submitting=true;\r\n studentService.gradeQuiz(data, $scope.quizId).then(function (response) {\r\n if (response.data.error == 0) {\r\n $scope.userAnswers = [];\r\n if ($scope.quizId != 0) \r\n modalService.alertModal('You have answered all of the questions correctly! You will now proceed to the next section of the orientation.',\r\n false,\r\n \"Congratulations!\",\r\n \"#060\");\r\n var promise = authService.refresh();\r\n promise.then(function (response) {\r\n //On successfull authentication direct user to home page\r\n //call the get sections function \r\n $scope.getSections();\r\n //when the quiz is already taken, call the get next item method to navigate user to next module in the playlist\r\n $scope.getNextItem();\r\n }, function (response) {\r\n modalService.alertModal(response.error_description);\r\n });\r\n }\r\n },\r\n function (error) {\r\n answers = [];\r\n $scope.userAnswers = [];\r\n modalService.alertModal(\"You have answered one or more questions on the quiz incorrectly. You will now be taken back to the beginning of this section. Please re-read the content and attempt the quiz again.\",\r\n false,\r\n \"Please Try Again\",\r\n \"#600\");\r\n //when user fails quiz, call the get next item method to navigate user to first silde of the same section\r\n $scope.getNextItem();\r\n });\r\n } else {\r\n modalService.alertModal('Please answer all of the questions before you submit your quiz.');\r\n }\r\n });\r\n };\r\n\r\n // Submit cohort choices\r\n $scope.submitCohorts = function () {\r\n var promptString = 'Are you sure you are ready to submit your selections?'\r\n modalService.confirmModal(promptString,\"Submit\").then(function () {\r\n var answers = [];\r\n angular.forEach($scope.userAnswers, function (value, key) {\r\n this.push(value);\r\n }, answers);\r\n var data = JSON.stringify({\r\n seed: 0,\r\n answers: answers\r\n });\r\n if (answers.length == $scope.questions.length) {\r\n studentService.enrollCohorts(data, $scope.playlistId).then(function (response) {\r\n if (response.data.error == 0) {\r\n $scope.userAnswers = [];\r\n var promise = authService.refresh();\r\n promise.then(function (response) {\r\n //On successfull authentication direct user to home page\r\n //call the get sections function \r\n $scope.getSections();\r\n //when the quiz is already taken, call the get next item method to navigate user to next module in the playlist\r\n $scope.getNextItem();\r\n }, function (response) {\r\n modalService.alertModal(response.error_description);\r\n });\r\n }\r\n },\r\n function (error) {\r\n answers = [];\r\n $scope.userAnswers = [];\r\n modalService.alertModal(\"An error occurred submitting your responses. Please try again.\",\r\n false,\r\n \"Please Try Again\",\r\n \"#600\");\r\n //when user fails quiz, call the get next item method to navigate user to first silde of the same section\r\n });\r\n } else {\r\n modalService.alertModal('Please answer all of the questions before you submit your selections.');\r\n }\r\n });\r\n };\r\n\r\n}]);\n/**\r\n * studentController.js\r\n */\r\n'use strict';\r\napp.controller('studentController', ['$scope', '$log', '$state', '$rootScope', 'studentService', 'authService', 'modalService', function ($scope, $log, $state, $rootScope, studentService, authService, modalService) {\r\n\r\n $scope.sectionTitle = \"...\";\r\n $scope.loading=false;\r\n\r\n $scope.darkMode = function() { \r\n $rootScope.global_darkmode = !($rootScope.global_darkmode);\r\n };\r\n\r\n /**\r\n * Get all the sections\r\n */\r\n $scope.getSections = function () {\r\n studentService.getSections().then(function (response) {\r\n if (response.data.error > 0) {\r\n $log.error(\"An error has occurred.\\nError: \" + response.data.error + \" (\" + response.data.error.message + \")\");\r\n modalService.alertModal(response.data.error.message);\r\n } else {\r\n //find out total sections count\r\n $scope.totalSections = response.data.data.length;\r\n //calculate how many sections are read\r\n $scope.readSections = -1;\r\n angular.forEach(response.data.data, function (value, key) {\r\n $scope.readSections = $scope.readSections+value.allowed;\r\n });\r\n //last section finished tasks\r\n if ($scope.totalSections == $scope.readSections+1)\r\n $scope.readSections = $scope.totalSections;\r\n\r\n //calculate the progress bar value\r\n $scope.progressValue = ($scope.readSections / $scope.totalSections) * 100;\r\n $scope.sections = response.data.data;\r\n }\r\n }, function (response) {\r\n if (response.status == 401) {\r\n $state.go('login');\r\n return;\r\n }\r\n\r\n $log.error(\"An error has occurred while retrieving all the sections.\\nHTTP error: \" + response.status);\r\n modalService.alertModal(siteSettings.customMessages['GeneralAPIError']);\r\n });\r\n };\r\n\r\n /**\r\n * Retrieve sections progress bar finished tasks and display those on the left side nav bar\r\n */\r\n $scope.getSections();\r\n\r\n // get the user name\r\n authService.getFullName().then(function (response) {\r\n if (response.data.error > 0) {\r\n if (response.status == 401) {\r\n $state.go('login');\r\n return;\r\n }\r\n $log.error(\"An error has occurred.\\nError: \" + response.data.error + \" (\" + response.data.error.message + \")\");\r\n } else {\r\n $scope.fullName = response.data.data.name;\r\n $scope.showSkipBtn = response.data.data.canSkip;\r\n }\r\n });\r\n\r\n // Get the playlist title\r\n studentService.getPlaylistTitle().then(function (response) {\r\n if (response.data.error > 0) {\r\n $log.error(\"An error has occurred.\\nError: \" + response.data.error + \" (\" + response.data.error.message + \")\");\r\n modalService.alertModal(response.data.error.message);\r\n } else {\r\n var plName = response.data.data.playlistTitle;\r\n $(\"#maintitle-text\").text(plName);\r\n }\r\n });\r\n \r\n /**\r\n * Get a section\r\n */\r\n $scope.getSection = function (sectionID) {\r\n studentService.getSection(sectionID).then(function (response) {\r\n if (response.data.error > 0) {\r\n $log.error(\"An error has occurred.\\nError: \" + response.data.error + \" (\" + response.data.error.message + \")\");\r\n modalService.alertModal(response.data.error.message);\r\n } else {\r\n $scope.contents = response.data.data.contents;\r\n }\r\n }, function (response) {\r\n if (response.status == 401) {\r\n $state.go('login');\r\n return;\r\n }\r\n $log.error(\"An error has occurred while retrieving a section.\\nHTTP error: \" + response.status);\r\n });\r\n };\r\n\r\n /**\r\n * Expand selected section\r\n */\r\n $scope.selectedSection = function (section) {\r\n if (section.allowed == 1) {\r\n $scope.sectionTitle = section.sectionTitle;\r\n $scope.sectionId = section.sectionId;\r\n //set the html content by passing the content id parameter\r\n $scope.$broadcast('setLoading'); \r\n $scope.$broadcast('setContent', { contentID: section.firstContent });\r\n $scope.getSection(section.sectionId); \r\n }\r\n };\r\n\r\n /**\r\n * Get selected content and display it\r\n */\r\n $scope.selectedContent = function (content) {\r\n console.debug(\"Navigating to content object id \" + content.id + \" (\" + content.title + \")\");\r\n if (content.allowed == 1) {\r\n //set the html content by passing the content id parameter\r\n $scope.$broadcast('setLoading'); \r\n $scope.$broadcast('setContent', { contentID: content.id });\r\n }\r\n };\r\n\r\n /**\r\n * Navigate to next item\r\n */\r\n $scope.getNextItem = function () {\r\n\r\n $scope.loading=true;\r\n $scope.$broadcast('setLoading');\r\n\r\n console.debug(\"called getNextItem\");\r\n studentService.getNextItemPlaylist().then(function (response) {\r\n if (response.data.error > 0) {\r\n $log.error(\"An error has occurred but success was indicated. This should not happen!\\nError: \" + response.data.error + \" (\" + response.data.error.message + \")\");\r\n modalService.alertModal(response.data.message);\r\n } else {\r\n $scope.itemType = response.data.data.itemType;\r\n $scope.itemId = response.data.data.itemId;\r\n //set the section title\r\n $scope.sectionTitle = response.data.data.sectionTitle;\r\n $scope.sectionId = response.data.data.sectionId;\r\n $scope.hideNextBtn = response.data.data.isLast;\r\n $scope.hidePreviousBtn = response.data.data.isFirst;\r\n //call the get sections function\r\n $scope.getSections();\r\n $scope.getSection($scope.sectionId);\r\n\r\n if (!angular.isUndefined($scope.itemId) && $scope.itemType == 'c') {\r\n $scope.quizFlag = false;\r\n //set the html content by passing the content id parameter\r\n $scope.$broadcast('setContent', { contentID: $scope.itemId });\r\n } else if (!angular.isUndefined($scope.itemId) && $scope.itemType == 'q') {\r\n $scope.quizFlag = true;\r\n //set the quiz questions by passing the quiz id parameter\r\n $scope.$broadcast('setQuizQuestions', { quizID: $scope.itemId });\r\n $scope.quiz_id = $scope.itemId;\r\n } \r\n else if (!angular.isUndefined($scope.itemId) && $scope.itemType == 's') {\r\n $scope.quizFlag = true;\r\n //set the quiz questions by passing the quiz id parameter\r\n $scope.$broadcast('setCohortQuestions', { playlistId: $scope.itemId });\r\n $scope.quiz_id = $scope.itemId;\r\n } \r\n else if (!angular.isUndefined($scope.itemId) && $scope.itemType == 'x') {\r\n $scope.hideNextBtn = 1;\r\n }\r\n }\r\n }, function (response) {\r\n if (response.status == 401) {\r\n $state.go('login');\r\n return;\r\n }\r\n // New Code - allow the backend to indicate that an item cannot be navigated to yet.\r\n if (response.status == 403) {\r\n modalService.alertModal(response.data.message);\r\n return;\r\n }\r\n // End New Code\r\n $log.error(\"An error has occurred while retreiving the next item in the playlist.\\nHTTP error: \" + response.status);\r\n modalService.alertModal(customMessages['GeneralAPIError']);\r\n });\r\n };\r\n\r\n /**\r\n * Navigate to previous item\r\n */\r\n $scope.getPreviousItem = function () {\r\n\r\n $scope.loading=true;\r\n $scope.$broadcast('setLoading');\r\n\r\n console.debug(\"called getPreviousItem\");\r\n\r\n studentService.getPreviousItemPlaylist().then(function (response) {\r\n if (response.data.error > 0) {\r\n $log.error(\"An error has occurred.\\nError: \" + response.data.error + \" (\" + response.data.error.message + \")\");\r\n modalService.alertModal(response.data.error.message);\r\n } else {\r\n $scope.itemType = response.data.data.itemType;\r\n $scope.itemId = response.data.data.itemId;\r\n //set the section title\r\n $scope.sectionTitle = response.data.data.sectionTitle;\r\n $scope.sectionId = response.data.data.sectionId;\r\n $scope.hideNextBtn = response.data.data.isLast;\r\n //hide previous button when the playlist has just began\r\n $scope.hidePreviousBtn = response.data.data.isFirst;\r\n //call the get sections function \r\n $scope.getSections();\r\n $scope.getSection($scope.sectionId);\r\n \r\n if (!angular.isUndefined($scope.itemId) && $scope.itemType == 'c') {\r\n $scope.quizFlag = false;\r\n //set the html content by passing the content id parameter\r\n $scope.$broadcast('setContent', { contentID: $scope.itemId });\r\n } else if (!angular.isUndefined($scope.itemId) && $scope.itemType == 'q') {\r\n $scope.quizFlag = true;\r\n //set the quiz questions by passing the quiz id parameter\r\n $scope.$broadcast('setQuizQuestions', { quizID: $scope.itemId });\r\n $scope.quiz_id = $scope.itemId;\r\n }\r\n else if (!angular.isUndefined($scope.itemId) && $scope.itemType == 's') {\r\n $scope.quizFlag = true;\r\n //set the quiz questions by passing the quiz id parameter\r\n $scope.$broadcast('setCohortQuestions', { playlistId: $scope.itemId });\r\n $scope.quiz_id = $scope.itemId;\r\n }\r\n else if (!angular.isUndefined($scope.itemId) && $scope.itemType == 'x') {\r\n $scope.hidePreviousBtn = 1;\r\n }\r\n }\r\n }, function (response) {\r\n if (response.status == 401) {\r\n $state.go('login');\r\n return;\r\n }\r\n $log.error(\"An error has occurred while retreiving the previous item in the playlist.\\nHTTP error: \" + response.status);\r\n modalService.alertModal(customMessages['GeneralAPIError']);\r\n });\r\n };\r\n\r\n /**\r\n * Navigate to current item\r\n */\r\n $scope.getCurrentItem = function () {\r\n\r\n studentService.getCurrentItemPlaylist().then(function (response) {\r\n if (response.data.error > 0) {\r\n $log.error(\"An error has occurred.\\nError: \" + response.data.error + \" (\" + response.data.error.message + \")\");\r\n modalService.alertModal(response.data.error.message);\r\n } else {\r\n $scope.itemType = response.data.data.itemType;\r\n $scope.itemId = response.data.data.itemId;\r\n //set the section title\r\n $scope.sectionTitle = response.data.data.sectionTitle;\r\n $scope.sectionId = response.data.data.sectionId;\r\n $scope.hideNextBtn = response.data.data.isLast;\r\n $scope.hidePreviousBtn = response.data.data.isFirst;\r\n //call the get sections function \r\n $scope.getSections();\r\n if ($scope.sectionId >= 0)\r\n $scope.getSection($scope.sectionId);\r\n\r\n if (!angular.isUndefined($scope.itemId) && $scope.itemType == 'c') {\r\n $scope.quizFlag = false;\r\n //set the html content by passing the content id parameter\r\n $scope.$broadcast('setContent', { contentID: $scope.itemId });\r\n } else if (!angular.isUndefined($scope.itemId) && $scope.itemType == 'q') {\r\n $scope.quizFlag = true;\r\n //set the quiz questions by passing the quiz id parameter\r\n $scope.$broadcast('setQuizQuestions', { quizID: $scope.itemId });\r\n $scope.quiz_id = $scope.itemId;\r\n }\r\n else if (!angular.isUndefined($scope.itemId) && $scope.itemType == 's') {\r\n $scope.quizFlag = true;\r\n //set the quiz questions by passing the quiz id parameter\r\n $scope.$broadcast('setCohortQuestions', { playlistId: $scope.itemId });\r\n $scope.quiz_id = $scope.itemId;\r\n } \r\n else if (!angular.isUndefined($scope.itemId) && $scope.itemType == 'a') {\r\n //Based on the item type user is directed to corresponding student or admin view\r\n $state.go('admin.report');\r\n }\r\n else if (!angular.isUndefined($scope.itemId) && $scope.itemType == 'x') {\r\n }\r\n }\r\n }, function (response) {\r\n if (response.status == 401) {\r\n $state.go('login');\r\n return;\r\n }\r\n $log.error(\"An error has occurred while retreiving the current item in the playlist.\\nHTTP error: \" + response.status);\r\n modalService.alertModal(siteSettings.customMessages['GeneralAPIError']);\r\n });\r\n };\r\n\r\n /**\r\n * Load the slide where the user left off\r\n */\r\n $scope.getCurrentItem();\r\n\r\n /**\r\n * Logout functionality\r\n */\r\n $scope.logout = function () {\r\n authService.logOut();\r\n //direct to login page\r\n $state.go('welcome');\r\n };\r\n\r\n /**\r\n * Rewrite Browser back button functionality\r\n */\r\n // $scope.$on('$locationChangeStart', function (event) {\r\n // if (authService.authentication.isAuthenticated && $scope.itemType != 'a') {\r\n // console.debug(\"$locationChangeStart firing...\");\r\n // event.preventDefault();\r\n // $scope.getPreviousItem();\r\n // }\r\n // });\r\n\r\n}]);\n/**\r\n * studentService.js\r\n */\r\n'use strict';\r\napp.factory('studentService', ['$http', 'siteSettings', function ($http, siteSettings) {\r\n var serviceBase = siteSettings.serviceBase;\r\n var studentServiceFactory = {};\r\n\r\n studentServiceFactory.getSections = function () {\r\n return $http.get(serviceBase + 'api/section');\r\n };\r\n\r\n studentServiceFactory.getSection = function (sectionID) {\r\n return $http.get(serviceBase + 'api/section/' + sectionID);\r\n };\r\n\r\n studentServiceFactory.getPlaylistTitle = function() {\r\n return $http.get(serviceBase + 'api/playlist/name');\r\n };\r\n\r\n studentServiceFactory.getCohortSelectOptions = function (playlistId) {\r\n return $http.get(serviceBase + 'api/cohort/' + playlistId).then(function (results) {\r\n return results;\r\n });\r\n };\r\n\r\n studentServiceFactory.enrollCohorts = function(data, playlistId) { \r\n return $http.post(serviceBase + 'api/cohort/'+playlistId+'/enroll', data, { headers: { 'Content-Type': 'application/json' } });\r\n };\r\n\r\n // content\r\n studentServiceFactory.getContents = function () {\r\n return $http.get(serviceBase + 'api/content/');\r\n };\r\n\r\n studentServiceFactory.getContent = function (contentID) {\r\n return $http.get(serviceBase + 'api/content/' + contentID);\r\n };\r\n\r\n studentServiceFactory.getCurrentItemPlaylist = function () {\r\n return $http.get(serviceBase + 'api/playlist/current');\r\n };\r\n\r\n studentServiceFactory.getNextItemPlaylist = function () {\r\n return $http.get(serviceBase + 'api/playlist/next');\r\n };\r\n\r\n studentServiceFactory.getPreviousItemPlaylist = function () {\r\n return $http.get(serviceBase + 'api/playlist/previous');\r\n };\r\n\r\n // Quiz\r\n studentServiceFactory.getQuizs = function () {\r\n return $http.get(serviceBase + 'api/quiz');\r\n };\r\n\r\n studentServiceFactory.getQuiz = function (quizID) {\r\n return $http.get(serviceBase + 'api/quiz/' + quizID);\r\n };\r\n\r\n studentServiceFactory.gradeQuiz = function(data, quizID) { \r\n return $http.post(serviceBase + 'api/quiz/grade/' + quizID, data, { headers: { 'Content-Type': 'application/json' } });\r\n };\r\n\r\n studentServiceFactory.getQuizDetails = function (quizID) {\r\n return $http.get(serviceBase + 'api/quiz/');\r\n };\r\n\r\n\r\n return studentServiceFactory;\r\n}]);\n/**\r\n * authInterceptorService.js\r\n */\r\n'use strict';\r\napp.factory('authInterceptorService', ['$q', '$injector', '$state', 'localStorageService', function ($q, $injector, $state, localStorageService) {\r\n\r\n var authInterceptorServiceFactory = {};\r\n\r\n authInterceptorServiceFactory.request = function (config) {\r\n config.headers = config.headers || {};\r\n var authData = localStorageService.get('authorizationData');\r\n if (authData) {\r\n config.headers.Authorization = 'Bearer ' + authData.token;\r\n }\r\n return config;\r\n }\r\n\r\n authInterceptorServiceFactory.responseError = function (rejection) {\r\n if (rejection.status === 401) {\r\n var authService = $injector.get('authService');\r\n var authData = localStorageService.get('authorizationData');\r\n if (authData) {\r\n return $q.reject(rejection);\r\n }\r\n authService.logOut();\r\n $state.go('login');\r\n }\r\n return $q.reject(rejection);\r\n }\r\n \r\n return authInterceptorServiceFactory;\r\n}]);\n/**\r\n * authService.js\r\n */\r\n'use strict';\r\napp.factory('authService', ['$http', '$q', 'localStorageService', 'siteSettings', function ($http, $q, localStorageService, siteSettings) {\r\n\r\n function encodeURIComponentX (str) {\r\n return encodeURIComponent(str).replace(/[!'()]/g, escape).replace(/\\*/g, \"%2A\");\r\n }\r\n\r\n var serviceBase = siteSettings.serviceBase;\r\n var authServiceFactory = {};\r\n\r\n var _authentication = {\r\n isAuthenticated: false\r\n };\r\n\r\n authServiceFactory.getFullName = function () {\r\n return $http.get(serviceBase + 'api/user');\r\n }\r\n\r\n authServiceFactory.refresh = function () {\r\n\r\n var storedData = localStorageService.get('authorizationData');\r\n var data = \"grant_type=refresh_token&refresh_token=\" + encodeURIComponentX(storedData.refresh_token);\r\n\r\n var deferred = $q.defer();\r\n\r\n var userName = storedData.userName;\r\n\r\n $http.post(serviceBase + 'api/login', data, { headers: { 'Content-Type': 'application/x-www-form-urlencoded', } }).then(function (response) {\r\n localStorageService.set('authorizationData', { token: response.data.access_token, refresh_token: response.data.refresh_token, userName: userName });\r\n _authentication.isAuthenticated = true;\r\n deferred.resolve(response);\r\n }, function (response) {\r\n _logOut();\r\n deferred.reject(response);\r\n });\r\n return deferred.promise;\r\n };\r\n\r\n authServiceFactory.login = function (loginData) {\r\n\r\n var data = \"grant_type=password&username=\" + loginData.userName + \"&password=\" + encodeURIComponentX(loginData.password);\r\n var deferred = $q.defer();\r\n\r\n $http.post(serviceBase + 'api/login', data, { headers: { 'Content-Type': 'application/x-www-form-urlencoded', } }).then(function (response) {\r\n localStorageService.set('authorizationData', { token: response.data.access_token, refresh_token: response.data.refresh_token, userName: loginData.userName });\r\n _authentication.isAuthenticated = true;\r\n deferred.resolve(response);\r\n }, function (response) {\r\n _logOut();\r\n deferred.reject(response);\r\n });\r\n \r\n return deferred.promise;\r\n };\r\n\r\n var _logOut = function () {\r\n localStorageService.remove('authorizationData');\r\n _authentication.isAuthenticated = false;\r\n };\r\n\r\n authServiceFactory.getAPIVersion = function() {\r\n return $http.get(serviceBase + 'api/public/version');\r\n }\r\n \r\n authServiceFactory.logOut = _logOut;\r\n authServiceFactory.authentication = _authentication;\r\n\r\n return authServiceFactory;\r\n}]);\n// WARNING: This filter allows ALL HTML to be rendered without any XSS protection.\r\n// Source content must be trusted!\r\napp.filter('html', ['$sce', function ($sce) { \r\n return function (text) {\r\n return $sce.trustAsHtml(text);\r\n }; \r\n}])\n/**\r\n * LoginController.js\r\n */\r\n'use strict';\r\napp.controller('LoginController', ['$scope', '$state', 'authService', 'siteSettings', function ($scope, $state, authService, siteSettings) {\r\n\r\n //Intialize the login variables\r\n $scope.loginData = {\r\n userName: null,\r\n password: null\r\n };\r\n\r\n $scope.loginError=\"\";\r\n \r\n $scope.siteSettings = siteSettings;\r\n\r\n $scope.login = function () {\r\n $(\"#loading-spinner-container\").css(\"display\", \"inline\");\r\n $(\"#login-button\").prop(\"disabled\",true);\r\n $scope.loginError=\"\";\r\n authService.login($scope.loginData).then(function (response) {\r\n if (response.data.multiplaylist == \"1\")\r\n $state.go('select');\r\n else \r\n $state.go('home');\r\n }, function (response) {\r\n console.dir(response);\r\n if (response.data==null) {\r\n $scope.loginError = \"The server is not responding. Please try again later.\";\r\n }\r\n else if (!response.data.error_description) { \r\n $scope.loginError = siteSettings.customMessages.GeneralAPIError;\r\n }\r\n else {\r\n $scope.loginError = response.data.error_description;\r\n }\r\n $(\"#loading-spinner-container\").css(\"display\", \"none\");\r\n $(\"#login-button\").prop(\"disabled\", false);\r\n });\r\n };\r\n}]);\r\n\n/**\r\n * modalService.js\r\n */\r\n'use strict';\r\napp.factory('modalService', ['$uibModal', function ($uibModal) {\r\n var modalServiceFactory = {};\r\n \r\n modalServiceFactory.alertModal = function (message, confirm, title, color) {\r\n var uibmodal = $uibModal.open({\r\n templateUrl: 'modal.html',\r\n controller: function ($scope, $uibModalInstance) {\r\n $scope.alert_message = message;\r\n $scope.bkgcolor = (typeof color !== 'undefined') ? color : \"#480059\";\r\n $scope.titleBar = (typeof title !== 'undefined') ? title : \"Message\";\r\n $scope.isConfirm = (typeof confirm !== 'undefined') ? confirm : false;\r\n $scope.close = function () {\r\n $uibModalInstance.close();\r\n };\r\n $scope.cancel = function (result) {\r\n $uibModalInstance.dismiss('cancel');\r\n };\r\n $scope.ok = function (result) {\r\n $uibModalInstance.close(result);\r\n };\r\n }\r\n });\r\n return uibmodal.result; \r\n };\r\n\r\n modalServiceFactory.confirmModal = function (message, title, color) {\r\n return modalServiceFactory.alertModal(message,true,title,color);\r\n }\r\n \r\n return modalServiceFactory;\r\n\r\n}]);\n/**\r\n * LoginController.js\r\n */\r\n'use strict';\r\napp.controller('SelectController', ['$scope', '$state', 'selectService', 'siteSettings', function ($scope, $state, selectService, siteSettings) {\r\n $scope.siteSettings = siteSettings;\r\n \r\n $scope.selectPlaylist = function () {\r\n $(\"#loading-spinner-container\").css(\"display\", \"inline\");\r\n $(\"#select-button\").prop(\"disabled\",true);\r\n selectService.selectPlaylist({selectedPlaylist: $(\"#selectedPlaylist\").val()}).then(function (response) {\r\n //On successfull authentication direct user to home page\r\n // Update token from service\r\n $state.go('home');\r\n }, function (response) {\r\n $scope.login_error = response.error_description;\r\n $(\"#loading-spinner-container\").css(\"display\", \"none\");\r\n $(\"#select-button\").prop(\"disabled\", false);\r\n });\r\n };\r\n\r\n selectService.getPlaylists().then(function (response) {\r\n if (response.data.error > 0) {\r\n $log.error(\"An error has occurred.\\nError: \" + response.data.error + \" (\" + response.data.error.message + \")\");\r\n } else {\r\n $scope.playlists = response.data.data;\r\n }\r\n });\r\n\r\n}]);\r\n\n/**\r\n * selectService.js\r\n */\r\n'use strict';\r\napp.factory('selectService', ['$http', '$q', 'localStorageService', 'siteSettings', function ($http, $q, localStorageService, siteSettings) {\r\n var serviceBase = siteSettings.serviceBase;\r\n var selectServiceFactory = {};\r\n\r\n selectServiceFactory.getPlaylists = function () {\r\n return $http.get(serviceBase + 'api/playlist/list');\r\n };\r\n\r\n selectServiceFactory.selectPlaylist = function (playlistChoice) {\r\n\r\n var deferred = $q.defer();\r\n\r\n $http.get(serviceBase + 'api/playlist/select/' + playlistChoice.selectedPlaylist).then(function (response) {\r\n var currentAuthData = localStorageService.get('authorizationData');\r\n currentAuthData.token = response.data.data.token;\r\n currentAuthData.refresh_token = response.data.data.refresh;\r\n localStorageService.set('authorizationData', currentAuthData);\r\n deferred.resolve(response);\r\n }, function (err, status) {\r\n deferred.reject(err);\r\n });\r\n return deferred.promise;\r\n };\r\n\r\n return selectServiceFactory;\r\n}]);\n'use strict';\r\napp.factory('siteService', ['$http', 'siteSettings', function ($http, siteSettings) {\r\n var serviceBase = siteSettings.serviceBase;\r\n var mnsuSiteServiceFactory = {};\r\n\r\n var _getSemesterDaysElapsed = function () {\r\n return $http.get(serviceBase + 'api/site/minnstate/semester_days_elapsed').then(function (results) {\r\n return results;\r\n });\r\n };\r\n\r\n mnsuSiteServiceFactory.getSemesterDaysElapsed = _getSemesterDaysElapsed;\r\n\r\n return mnsuSiteServiceFactory;\r\n\r\n}]);\n/**\r\n * WelcomeController.js\r\n */\r\n'use strict';\r\napp.controller('WelcomeController', ['$scope', '$state', 'authService', 'modalService', 'siteSettings', function ($scope, $state, authService, modalService, siteSettings) {\r\n // Direct the user to login page\r\n $scope.go = function () {\r\n $state.go('login');\r\n };\r\n\r\n $scope.appIsOk = false;\r\n\r\n authService.getAPIVersion().then(function (response) {\r\n $scope.appIsOk = true;\r\n console.log(\"API Version \"+response.data.data.version);\r\n }, function() {\r\n modalService.alertModal(siteSettings.customMessages.ServerOfflineError, false,'Application Unavailable','#600');\r\n });\r\n\r\n}]);\r\n"],"file":"app.js"}