AppConstant.swift 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155
  1. //
  2. // AppConstant.swift
  3. // LMS
  4. //
  5. // Created by Suraj Kumar Mandal on 17/08/22.
  6. //
  7. import UIKit
  8. import Foundation
  9. struct AppConstant {
  10. // App colors
  11. static let BASE_COLOR = #colorLiteral(red: 0, green: 0.2823529412, blue: 0.6431372549, alpha: 1)
  12. //Alert View Constants
  13. static let Ok = "OK"
  14. static let defaultTitle = "Alert"
  15. static let defaultMsg = "Something went wrong"
  16. static let internetAlertTitle = "No Internet"
  17. static let internetAlertMessage = "Internet connection is not available, please check your internet connection and try again"
  18. static let quizInstruction = ["There will be 5 questions for digital literacy assessment.", "For each question only one possible answer can be given.", "You have to choose the correct one by clicking the mouse.", "Exam can be accessed only twice before final submission.", "The time limit will be 5 minutes."]
  19. static let answerInstruction = ["Drag And Drop Correct Match From Right Hand Side", "Enter Answer In Input Box", "Select [ One ] Options", "Select [ One / More Than One ] Options", "Choose One Option"]
  20. // QUiz constants
  21. static let MultipleMCQ = "Multiple select MCQ"
  22. static let SingleMCQ = "Single select MCQ"
  23. static let Match = "Match the following"
  24. static let Fill = "Fill in the blanks"
  25. static let TrueFalse = "True and False"
  26. static let boolOption = ["True", "False"]
  27. // API's constant values
  28. static let ProdClientSecret = "IYTMU3ULXzXZ6XYSZMKtrJzpRmkXusZr"
  29. static let DevClientSecret = "YRA0h2JB0vLyChqLSarWXPsU2LdPaaZN"
  30. static let ClientSecret = ProdClientSecret
  31. static let ClientId = "lms-mobile-app"
  32. }
  33. struct ApiURL {
  34. private struct ProdUrl {
  35. static let Keycloak = "https://hindujaauth.finlabsindia.org"
  36. static let AppData = "https://hindujalms.finlabsindia.org:444"
  37. }
  38. private struct DevUrl {
  39. static let Keycloak = "https://keytest.finlabsindia.org"
  40. static let AppData = "https://hindujadev.finlabsindia.org:444"
  41. }
  42. private static let KeycloakDomain = ProdUrl.Keycloak
  43. private static let AppDataDomain = ProdUrl.AppData
  44. static var AccessToken: String {
  45. return KeycloakDomain + "/realms/lms/protocol/openid-connect/token"
  46. }
  47. static var GetUserDetails: String {
  48. return AppDataDomain + "/user/api/v1/lms-user/getUserByUserId"
  49. }
  50. static var GetStudentDetails: String {
  51. return AppDataDomain + "/admin/api/v1/lms-admin/student/getStudentDetailsByUserId"
  52. }
  53. static var GetSessionList: String {
  54. return AppDataDomain + "/admin/api/v1/lms-admin/calendar"
  55. }
  56. static var GetAssessmentList: String {
  57. return AppDataDomain + "/lms-assessment-service/api/v1/lms_assessment/schedule/getByUserId"
  58. }
  59. static var GetCalendarData: String {
  60. return AppDataDomain + "/admin/api/v1/lms-admin/schedule/light/user"
  61. }
  62. static var GetSessionIntervention: String {
  63. return AppDataDomain + "/admin/api/v1/lms-admin/interventions/view"
  64. }
  65. static var GetInterventionLevel: String {
  66. return AppDataDomain + "admin/api/v1/lms-admin/interventions/intervention-level/byInterventionId"
  67. }
  68. static var GetBatchList: String {
  69. return AppDataDomain + "/batch/api/v1/lms-batch/batch/list/Approved"
  70. }
  71. static var GetUnitsList: String {
  72. return AppDataDomain + "/content/api/v1/lms-content/unit/getByUserId"
  73. }
  74. static var GetLessons: String {
  75. return AppDataDomain + "/content/api/v1/lms-content/lesson/filter"
  76. }
  77. static var GetLessonsList: String {
  78. return AppDataDomain + "/content/api/v1/lms-content/content/filter"
  79. }
  80. static var DownloadBase64: String {
  81. return AppDataDomain + "/files/files/download/base64"
  82. }
  83. static var GetQuizAttempts: String {
  84. return AppDataDomain + "/lms-assessment-service/api/v1/lms_assessment/attempt/mgmt/user/attempts"
  85. }
  86. static var GetQuizData: String {
  87. return AppDataDomain + "/lms-assessment-service/api/v1/lms_assessment/data/mgmt/beneficiary/assessment"
  88. }
  89. static var GetQuizTime: String {
  90. return AppDataDomain + "/lms-assessment-service/api/v1/lms_assessment/data/mgmt/assessment/time"
  91. }
  92. static var SubmitQuizAnswer: String {
  93. return AppDataDomain + "/lms-assessment-service/api/v1/lms_assessment/attempt/mgmt/user/answer/post"
  94. }
  95. static var UploadAssessment: String {
  96. return AppDataDomain + "/lms-assessment-service/api/v1/lms_assessment/attempt/mgmt/offline/upload"
  97. }
  98. static var GetNewAssessmentList: String {
  99. return AppDataDomain + "/lms-assessment-service/api/v1/lms_assessment/getAssessmentList"
  100. }
  101. static var SubmitAnswer: String {
  102. return AppDataDomain + "/lms-assessment-service/api/v1/lms_assessment/attempt/mgmt/user/answer/post2"
  103. }
  104. static var SubmitTotalAssessment: String {
  105. return AppDataDomain + "/lms-assessment-service/api/v1/lms_assessment/attempt/mgmt/submit/assignment2"
  106. }
  107. static var GeAllSubmittedAnswers: String {
  108. return AppDataDomain + "/lms-assessment-service/api/v1/lms_assessment/getAllAnswerAttemptByUser"
  109. }
  110. }
  111. struct PlaceHolderText {
  112. static let UserName = "Username or email"
  113. static let Password = "Password"
  114. }