-
Notifications
You must be signed in to change notification settings - Fork 65
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
593 additions
and
127 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
public with sharing class QuizEditorController { | ||
private static final QuizQuestionService questionService = new QuizQuestionService(); | ||
private static final QuizSessionService sessionService = new QuizSessionService(); | ||
|
||
@AuraEnabled(cacheable=true) | ||
public static List<Quiz_Question__c> getAllQuestions() { | ||
return questionService.getQuestions(); | ||
} | ||
|
||
@AuraEnabled | ||
public static void setSessionQuestions(Id sessionId, List<Id> questionIds) { | ||
if (sessionId == null) { | ||
throw new AuraHandledException('Missing session Id.'); | ||
} | ||
if (questionIds == null) { | ||
throw new AuraHandledException('Missing questions Ids.'); | ||
} | ||
sessionService.setSessionQuestions(sessionId, questionIds); | ||
} | ||
|
||
@AuraEnabled(cacheable=true) | ||
public static List<Quiz_Question__c> getSessionQuestions(Id sessionId) { | ||
if (sessionId == null) { | ||
throw new AuraHandledException('Missing session Id.'); | ||
} | ||
return sessionService.getSessionQuestions(sessionId); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<apiVersion>48.0</apiVersion> | ||
<status>Active</status> | ||
</ApexClass> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
public class QuizQuestionService extends QuizAbstractDataService { | ||
public List<Quiz_Question__c> getQuestions() { | ||
return [SELECT Id, Label__c FROM Quiz_Question__c]; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ApexClass xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<apiVersion>48.0</apiVersion> | ||
<status>Active</status> | ||
</ApexClass> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
src/main/default/flexipages/Quiz_Session_Record_Page.flexipage-meta.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<FlexiPage xmlns="http://soap.sforce.com/2006/04/metadata"> | ||
<flexiPageRegions> | ||
<componentInstances> | ||
<componentInstanceProperties> | ||
<name>collapsed</name> | ||
<value>false</value> | ||
</componentInstanceProperties> | ||
<componentInstanceProperties> | ||
<name>hideChatterActions</name> | ||
<value>false</value> | ||
</componentInstanceProperties> | ||
<componentInstanceProperties> | ||
<name>numVisibleActions</name> | ||
<value>3</value> | ||
</componentInstanceProperties> | ||
<componentName>force:highlightsPanel</componentName> | ||
</componentInstances> | ||
<name>header</name> | ||
<type>Region</type> | ||
</flexiPageRegions> | ||
<flexiPageRegions> | ||
<componentInstances> | ||
<componentName>questionPicker</componentName> | ||
</componentInstances> | ||
<name>leftcol</name> | ||
<type>Region</type> | ||
</flexiPageRegions> | ||
<flexiPageRegions> | ||
<componentInstances> | ||
<componentName>force:detailPanel</componentName> | ||
</componentInstances> | ||
<name>rightcol</name> | ||
<type>Region</type> | ||
</flexiPageRegions> | ||
<masterLabel>Quiz Session Record Page</masterLabel> | ||
<sobjectType>Quiz_Session__c</sobjectType> | ||
<template> | ||
<name>flexipage:recordHomeTwoColEqualHeaderTemplateDesktop</name> | ||
</template> | ||
<type>RecordPage</type> | ||
</FlexiPage> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.