-
Notifications
You must be signed in to change notification settings - Fork 22
Exam Hub Apex Classes
Quick Access
- AuraGIFTImportController
- AuraGIFTImportController (duplicate?)
- ExamCreationAuraController
- ExamInterviewApexController
- ExamResultsPoolPageAuraController
- ExportQuestionController
- ExportQuestionPoolController
- MultiSelectFlowValues
- RemoveMultiselectBars
Description:
- This class is used in the GiftImport component. Imports GIFT-formatted file, sorts questions, creates Exam_Question__c
Public Methods:
- ImportFile(List questionList, String titan)
- Takes in titan and questionList from Aura controller and passes them on to other methods for parsing. Returns the number of created and updated records.
- SortQuestions(List examQuestionList)
- Sorts the questions taken in from the Aura component based on their types.
- CreateRecords(Map<String,List> sortedQuestions, String titan)
- Upserts Exam_Question__c records from sorted exam questions.
- HandleInit()
- Grabs list of titan and technology names and Ids and returns them to the GiftImport helper.
Private Methods:
- None
- Tests Written?
Code Coverage: 100%
Description:
- This class is used in the GiftImport component. Used to hold data imported from the GiftImport Aura component.
Variables:
- qTitle: Holds the Question Title.
- qText: Holds the Question Text.
- qAnswer: Holds the Question Answer.
Description:
- This class is used to format questions to export into GIFT format. It takes the current exam_question__c the class is being called from and formats it accordingly.
Public Methods:
- export(Exam_Question__c currentExamQuestion)
- takes the current exam question and checks
- if it is a Missing Word question
- what type of question it is and calls the method that formats that specific question type
- takes the current exam question and checks
- formatMultipleChoiceQuestionMW(Exam_Question__c question, String beforeSubstring, String afterSubstring)
- Formats Multiple Choice, Missing word questions. Takes in the current exam_question__c and the substring before and after the delimeter for missing word questions
- formatMultipleChoiceQuestion(Exam_Question__c question)
- formats multiple choice questions, takes in one parameter of the current question
- formatMultipleChoiceQuestionMultipleAnswers(Exam_Question__c question)
- formats multiple choice questions with multiple answers
- formatMultipleChoiceQuestionMultipleAnswersMW(Exam_Question__c question, String beforeSubstring, String afterSubstring)
- formats multiple choice questions with multiple answers that are also missing word questions. It translates the question to GIFT format using the before and after substrings.
- getCorrectAnswers(Exam_Question__c question)
- formats the correct answers depending on the answer explanations (whether they exist, how many)
- best for short answer and questions where there are no options but multiple correct answers listed
- getAnswerFormat (Exam_Question__c question)
- formats all answers in multiple choice based on the options and the format of the answer explanations
- getAnswersMultiSelect (Exam_Question__c question)
- formats all the answers for a multiple choice/multi select question based on the question parameter
- formatTrueFalseQuestion(Exam_Question__c question)
- takes in one exam_question__c parameter and formats into True/False GIFT format
- formatTrueFalseQuestionMW (Exam_Question__c question, String beforeSubstring, String afterSubstring)
- formats true/false and missing word questions, takes in the current exam_question__c and the substrings before and after the delimiter as parameters
- formatMatchingQuestion(Exam_Question__c question)
- formats matching questions in GIFT format
- formatMatchingQuestionMW (Exam_Question__c question, String beforeSubstring, String afterSubstring)
- formats matching questions with missing word delimeter and checkbox set to true
- formatShortAnswerQuestionMW(Exam_Question__c question, String beforeSubstring, String afterSubstring)
- formats fill in the blank questions aka short answer with missing word
- formatNumericalQuestion(Exam_Question__c question)
- formats questions with numerical answers
- formatNumericalQuestionMW(Exam_Question__c question, String beforeSubstring, String afterSubstring)
- formats numerical questions that also have missing word
- formatShortAnswerQuestion(Exam_Question__c question)
- formats short answer questions that are not fill in the blank
- formatEssayQuestion(Exam_Question__c question)
- formats essay questions ( ones that are short answer but do not have 'correct answers' listed because they're to be checked manually
- formatEssayQuestionMW(Exam_Question__c question, String beforeSubstring, String afterSubstring)
- essay question with the missing word checkbox checked
- formatQuestions(List questions)
- takes in a list of questions and formats them into a string with a newline/linebreak between each question
- getCorrectAnswer(Exam_Question__c question)
- gets correct answer in the case where there is only one to be appended eg.) True/False
- createFile()
- action on the ExportQuestion Visualforce page which generates a file of the question where the 'Export Questions' button is selected on the exam question page. The file contains the question in GIFT format and can be viewed from the user's reocrd detail page under the 'People' tab.
Private Methods:
- None
- Tests Written?
Code Coverage: 100%
Description:
- This class is used to format a question pool of questions to export into GIFT format. It takes the current question pool the class is being called from and finds all question assignments associated with it to then collect all exam questions associated with the current question pool.
Public Methods:
- export(Exam_Question__c currentExamQuestion)
- takes the current exam question and checks 1. if it is a Missing Word question 2. what type of question it is and calls the method that formats that specific question type
- formatMultipleChoiceQuestionMW(Exam_Question__c question, String beforeSubstring, String afterSubstring)
- Formats Multiple Choice, Missing word questions. Takes in the current exam_question__c and the substring before and after the delimeter for missing word questions
- formatMultipleChoiceQuestion(Exam_Question__c question)
- formats multiple choice questions, takes in one parameter of the current question
- formatMultipleChoiceQuestionMultipleAnswers(Exam_Question__c question)
- formats multiple choice questions with multiple answers
- formatMultipleChoiceQuestionMultipleAnswersMW(Exam_Question__c question, String beforeSubstring, String afterSubstring)
- formats multiple choice questions with multiple answers that are also missing word questions. It translates the question to GIFT format using the before and after substrings.
- getCorrectAnswers(Exam_Question__c question)
- formats the correct answers depending on the answer explanations (whether they exist, how many) - best for short answer and questions where there are no options but multiple correct answers listed
- getAnswerFormat (Exam_Question__c question)
- formats all answers in multiple choice based on the options and the format of the answer explanations
- getAnswersMultiSelect (Exam_Question__c question)
- formats all the answers for a multiple choice/multi select question based on the question parameter
- formatTrueFalseQuestion(Exam_Question__c question)
- takes in one exam_question__c parameter and formats into True/False GIFT format
- formatTrueFalseQuestionMW (Exam_Question__c question, String beforeSubstring, String afterSubstring)
- formats true/false and missing word questions, takes in the current exam_question__c and the substrings before and after the delimeter as parameters
- formatMatchingQuestion(Exam_Question__c question)
- formats matching questions in GIFT format
- formatMatchingQuestionMW (Exam_Question__c question, String beforeSubstring, String afterSubstring)
- formats matching questions with missing word delimeter and checkbox set to true
- formatShortAnswerQuestionMW(Exam_Question__c question, String beforeSubstring, String afterSubstring)
- formats fill in the blank questions aka short answer with missing word
- formatNumericalQuestion(Exam_Question__c question)
- formats questions with numerical answers
- formatNumericalQuestionMW(Exam_Question__c question, String beforeSubstring, String afterSubstring)
- formats numerical questions that also have missing word
- formatShortAnswerQuestion(Exam_Question__c question)
- formats short answer questions that are not fill in the blank
- formatEssayQuestion(Exam_Question__c question)
- formats essay questions ( ones that are short answer but do not have 'correct answers' listed because they're to be checked manually
- formatEssayQuestionMW(Exam_Question__c question, String beforeSubstring, String afterSubstring)
- essay question with the missing word checkbox checked
- formatQuestions(List questions)
- takes in a list of questions and formats them into a string with a newline/linebreak between each question
- getCorrectAnswer(Exam_Question__c question)
- gets correct answer in the case where there is only one to be appended eg.) True/False
- createFile()
- action on the ExportQuestionPool Visualforce page which generates a file of the question where the 'Export Questions' button is selected on the question pool page. The file contains the question pool's questions in GIFT format and can be viewed from the user's record detail page under the 'People' tab.
Private Methods:
- None
- Tests Written?
Code Coverage: 100%
Description:
- This class is used in the ExamCreation component.
Public Methods:
- GetQuestionPool(String searchKeyword)
- Get question pools, get all pools on init and then again when user interact with search bar.
- GetExamQuestions(Id poolId)
- Get Exam Questions in a pool.
- CreateExamAssignment(String examId, Map<Id, Integer> poolAndNumber)
- Create exam pool assignment records.
Private Methods:
- None
Nested Class:
- QuestionPoolWrapper - Use to send back only relevant information to the client side.
- Tests Written?
Code Coverage: 100%
Description:
- This class is has one invocable method to use in the question creation flow, for parsing multiple select picklists.
Invocable Method:
- CheckValues(List values)
- In order to be invocable it has to accept a list, this takes that list an parses out a the individual values from a multi select picklist
- Tests Written?
Code Coverage 100%
Description:
- This class has one invocable method to use in the question creation flow, for removing excess bars added as a part of the multi-select process.
Invocable Method:
- RemoveBars(List OneStringList)
- In order to be invocable it has to except a list and that list will only contain one string, which this method will remove the ending bars in that are added as a part of the flow's process
- Tests Written?
Code Coverage 100%
Description:
- This controller is used to retrieve the details of an Exam and also to submit a completed exam and answers.
Variables:
- None
Methods:
- List<List> examFinder(String examID)
- takes an ID for an Exam__c and returns a list of two lists. The first list is a set of Questions associated with the exam. [Data Model: Exam -> Exam_Pool_Assignments -> Exam_Pool -> Question_Assignments -> Question]. The second list in a monad that contains the details of the exam located in the Exam__c object: Its name, time limit, and associated Titans.
- void submitExam(String examId, String acctId)
- Takes in two IDs, one for the Exam and one for the Account of the user taking the exam.
- Currently updates an Exam_Result__c object that is associated with both IDs.
- void submitAnswers(List<Exam_Question__c> examQuestionList, Map<String, String> examAnswerList, String examId)
- Takes a List of Exam_Questions that was returned by examFinder but shuffled on the front end, a Map the takes the Question number (starting with '1') as the key and returns the user's answer as the value, and takes an ID associated with the exam.
- Then it creates a list of Hero_Answer__c and attempts to score the questions as it goes, but currently only does so with a bare equality comparison so it incorrectly scores ranges (e.g. answer '3' for range '1..5').
- Then it inserts the list of Hero_Answer__c.
- Tests Written?
Code Coverage 100%
Description:
- SOQL query methods to retrieve required data to calculate pool percentages.
Public Methods:
- GetAllExamResultPoolQuestions(String examResultId)
- Retrieves all questions and the pool name they are in from the current exam results.
- GetCorrectExamResultPoolQuestions(String examResultId)
- Retrieves all questions answered correctly and the pool name they are in from the current exam results.
Private Methods: None
- Tests Written?
Code Coverage 100%
├─Install Instructions
│ ├Site Setup
├─General Documentation
│ ├Data Modeling/Relationships
│ ├Data Model
│ ├Custom Objects & Fields
│ ├Issues & Suggestions
│ ├Known Issues
│ ├Data Model Issues & Suggestions
│ ├Dependency Chart
├─Resources
├─Package Overview
│ ├Trial of the Titans Package
│ ├QC Hub
│ ├Trainer Hub
│ ├Mock Interview
│ ├Chart Package Package
│ ├Hero Hub Package
│ ├Titan Hub Package
│ ├Exam Interview Package
│ ├Portfolio Hub Package
├─Archive