Guide to Add Environmental PDRs
**The following guide assumes familiarity with the MarineLMS and use of the Client tool on /Pages/Dev, as well as the /wiki/spaces/CMD/pages/5432378246 system**
Placeholders
Place holders in this document for some client commands need to be replaced before they can be used. Usually all parameters in [...].
[OrgPath]
[All Vessels For That Org]
[temporary upload file name]
[OrgName]
[PDR Location Path]
[Vessel x]
[SShoreside user name]
PDRs for the following OrgPaths
/Root/Carnival/CCL
/Root/Carnival/HAG
/Root/Carnival/CMG
/Root/CUK
Files located at Carnival EO PDRs
Setup Batch Size for importCarnivalUsers
addNavPageAttribute [OrgPath] Customer.CUK.UserImport.BatchSize 5000
User Selectable Paging Size Feature
addNavPageAttribute [OrgPath] System.Customer.PageSizes "10,25,50"
Carnival Rank and Vessel Mapping Mapping
Rank and Vessel mapping as json files in NavPage attributes.
Use pages/dev file upload to upload the VesselLocations and RankBasedValues files for the specific org path.
JSON Files for VesselLocations and RankBasedValues
RankBasedValuesByRank ([OrgName]).json
VesselLocations ([OrgName]).json
Import NavPageAttributes
Page attributes for CUK org page:
Customer.CUK.VesselLocations
createOrUpdateNavPageAttributeFromFile [OrgPath] Customer.CUK.VesselLocations [temporary upload file name]
Customer.CUK.RankBasedValuesByRank.
createOrUpdateNavPageAttributeFromFile [OrgPath] Customer.CUK.RankBasedValuesByRank [temporary upload file name]
Mandatory OrgProfileFields
Rank
Rank PDR Level
Vessel
Vessel PDR Level
Posting Rank
Department
Can Assess Rank
Can Assess Rank 2
Can Assess Rank 3
Can Assess Rank 4
Can Sign Off
Can Sign Off 2
Can Sign Off 3
Can Sign Off 4
Can Sign Off 5
Can Sign Off 6
Can Sign Off 7
Client commands to add the OrgProfileFields:
AddOrgProfileField Rank [OrgPath] scs false true "none\[All Ranks, separated with ‘\’]"
AddOrgProfileField Department [OrgPath] string false false
AddOrgProfileField "Posting Rank" [OrgPath] string false false
AddOrgProfileField "Rank PDR Level" [OrgPath] scs false false "none\3\2\1"
AddOrgProfileField Vessel [OrgPath] scs false true "Shore\[All Vessels For That Org]"
AddOrgProfileField "Vessel PDR Level" [OrgPath] scs false false "none\3\2\1"
AddOrgProfileField "Can Sign Off" [OrgPath] scs false false "none\[All Ranks, separated with ‘\’]"
AddOrgProfileField "Can Sign Off 2" [OrgPath] scs false false "none\[All Ranks, separated with ‘\’]"
AddOrgProfileField "Can Sign Off 3" [OrgPath] scs false false "none\[All Ranks, separated with ‘\’]"
AddOrgProfileField "Can Sign Off 4" [OrgPath] scs false false "none\[All Ranks, separated with ‘\’]"
AddOrgProfileField "Can Sign Off 5" [OrgPath] scs false false "none\[All Ranks, separated with ‘\’]"
AddOrgProfileField "Can Sign Off 6" [OrgPath] scs false false "none\[All Ranks, separated with ‘\’]"
AddOrgProfileField "Can Sign Off 7" [OrgPath] scs false false "none\[All Ranks, separated with ‘\’]"
AddOrgProfileField "Can Assess Rank" [OrgPath] scs false false "none\[All Ranks, separated with ‘\’]"
AddOrgProfileField "Can Assess Rank 2" [OrgPath] scs false false "none\[All Ranks, separated with ‘\’]"
AddOrgProfileField "Can Assess Rank 3" [OrgPath] scs false false "none\[All Ranks, separated with ‘\’]"
AddOrgProfileField "Can Assess Rank 4" [OrgPath] scs false false "none\[All Ranks, separated with ‘\’]"
Run PDR Generator
You will need a repository to get the PDR Generator (GIT repository: psdev/CUK/PdrGenerator) http://gitlab.docker.marinels.local/marinels/psdev (ssh://git@gitlab.docker.marinels.local:30100/marinels/psdev.git)
PDR Generator configuration
Open the PDR Generator solution in Visual Studio
Program.cs
In the function Main in the Program.cs; set the following variables:
var targetFolder = @”D:\temp\EO”; // Generated PDR files will be put here var rank = “EO”; // Short Rank title var title = “Environmental Officer”; // Full Rank title var noVesselPDR = false; // Flag to NOT generate any vessel PDRs RankPdrLevels = new List<int>() {2, 3}; // Specify the Rank PDR levels VesselPdrLevels = new List<int>() {3}; // must be a sub-set of RankPdrLevels
App.Config
In the App.config you will find a list of all the vessels by OL. Note if sections are not commented out, this will generate for all the uncommented OLs.
<configuration> <appSettings> <add key="OrgUserName" value="[OrgName]-Users"/> <add key="organizationPath" value="[OrgPath]"/> <add key="PDRLocationPath" value="[PDR Location Path]"/> </appSettings> <Vessels> <!-- vessel names --> <add key="[Vessel 1]" value="[Vessel 1]" /> <add key="[Vessel 2]" value="[Vessel 2]"/> ... </Vessels> </configuration>
Run the PDR Generator application.
The generated PDRs files will be located in the targetFolder specified in the configuration.
Import and Setup the Generated EO PDRs
Go to the OrgPath page on the LMS
- Create a navigation link “PDRs”
Import the Environmental PDRs as NavPage using the client tool, run the command
ImportNavPage [parentNavPagePath] [linkUrlName] [linkDisplayName] [groupName] [absolute import directoryPath] [importMode]
example:
ImportNavPage “[PDR Location Path]” “EO” “Environmental Officer” “” “D:\FTP\Stefan\EO\Environmental PDRs\EO.Pg” Copy
Note: Copy imports any offerings
NavPage Template Files
Make sure the NavPage template files at Org-FileCollection folder '/templates' exist:
PDR_NavPage.cshtml
PDR_CourseNavPage.cshtml
Note: Check if the NavPage templates contain any hard coded paths which need to change (e.g. /Root/Carnival/ExampleCCL)
Assessment Guidelines (not necessary for EO)
Copy the following files into the org’s file collection folder /PDRs/AssessmentGuidelines
all assessment guideline files (.html) generated by the PDR generator
guidelines.js
guidelines-data.json
Note: Need to separate PDR guidelines js file per PDR so it doesn’t grow too big with multiple PDRs
JS and CSS Files
Make sure the following referenced files are present:
<link rel="stylesheet" href="style.css" />
<link rel="stylesheet" href="../../css/bootstrap.min.css" />
<script src="../../js/jquery-1.11.2.min.js" ></script>
<script src="../../js/bootstrap.min.js" ></script>
<script src="guidelines.js" ></script>
Note: style.css must be in org’s file collection folder /PDRs/AssessmentGuidelines
Org NavPage Attributes (Rule Mapping Variables)
The PDR generator created a file which client commands to add NavPage attributes.
setNavPageAttributesCommandLines.txt
Org Link Attributes
The PDR generator created a file with client commands for permissions attributes at [OrgPath]
setLinkAttributesCommandLines.txt
CanView Permissions for Sign Off
The PDR generator created a file with client commands for CanView link attributes. Those will be added at the level of the PDR location [PDR Location Path].
canViewPermissionsForSignOffLinkAttributesCommandLines.txt
Course Registration Rules
The PDR generator created a file with client commands with all registration rules
regCompletionRuleCommandLines.txt
Course Completion Rules
The PDR generator created a file with client commands with all course completion rules
setOfferingRoleRuleCommandLines.txt
Note: For release version 3.0, this command will error out but Mike has fixed the bug; so if on version 3.0 the offering registration rule will be inputted using the User Interface Edit Page Attribute function
Example Completion Rule:
Key | Value |
---|---|
System.SetOfferingRole.Rule | SetOfferingRole(Instructor,/Root/Carnival/CCL/PDRs/$CanAssessRank$/$EOCourseLevel$):ProfileNameMatch(Can Assess Rank[\s]*[2-4]*$,$CanAssessRank$) |
Import Questions
Import to Question Repository using the command client tool or User Interface:
Using the client tool; execute the following command
Usage: importQuestions [path] [filePath] - where path specifies a NavPage
Example: importQuestions /Root/CSmart/ “D:/Question/Question.xml”
2. Using the /Root page UI, 'Manage' > 'Question Repository'
use the import Question tool on the page.
Create Assessments
Create an Assessment in the Assessment Repository using the User Interface.
Note: Ensure the name of the assessment is consistent with assessment linked to “Assess Criteria” and “Verifier Sign Off” link.
Notification Template and Rules
- Copy the notification template StudentEvaluationFinishedFull.cshtml to the '/NotificationTemplates' folder in MarineLMS.Service.Main project
- Add SShoreside user with email address
- Note the user name if multiple Orgs exist in the same instance (user names will be unique and may have numbers at the end if the same user gets created - e.g. SShoreside1)
- Create user group [OL-Name]-Notification-Users
- createGroup [OrgPath] [OL-Name]-Notifcation-Users
- Add all Captain Notification users to group ‘[OL-Name]-Notification-Users’ so they get notified:
- Set Vessel for which the Captain Notification user should be notified for
- Set Rank to Captain
- Add SIR Mapping
- addNavPageAttribute [OrgPath] Customer.CUK.SIRMapping “EO:Captain”
- example: addNavPageAttribute /Root/Carnival/ExampleCCL Customer.CUK.SIRMapping “EO: Captain”
- Execute the following command to add notification rule
- addOrgNotificationRule [OrgPath] IsCategory(Exam,StudentEvaluationCompleted);LinkAttributeIsEqualTo(Customer.Course.Assessment,SignOff);AssessmentGradeGreaterOrEqual(99) User([SShoreside user name]) Email
- example: addOrgNotificationRule "Root/CUK" IsCategory(Exam,StudentEvaluationCompleted);LinkAttributeIsEqualTo(Customer.Course.Assessment,Assess);AssessmentGradeGreaterOrEqual(99) SignOffUser([OL-Name]-Notification-Users) Email
ATTENTION PITFALL:
If there are multiple Orgs hosting PDRs in the same MarineLMS installation the user SShoreside may have different user name as it must be unique per installation. You need to set the proper SShoreside username (e.g. SShoreside1) for the first notification rule!
Test!
Some tests whether the PDR is working correctly:
Test the Offering Registration Rule
- Make sure a course offering exists for the selected PDR level
- e.g PDR level : EO Rank PDR2
- Add user to the required PDR level. Go to Manage user and edit user properties.
- e.g Set User’s rank : EO ; Rank PDR Level : 2
Verification: To verify that the registration rule worked; check if the user was automatically registered in the Offering previously created.
NOTE: Registration can take several minutes
Test the Completion Rule
The offering /wiki/spaces/CMD/pages/5432392227 must be in place before this can be tested
- Vessel PDR
- Completing Assess Criteria and Verifier Sign Off (both 100%) the completion rule is expected to run automatically
- Rank PDR
- Completing Assess Criteria (100%) the completion rule is expected to run automatically
Verification: Check the registration report; if the completion rule worked correctly; the user would have a completion date and the registration status will be Completed.
Test Notification Rules
/wiki/spaces/CMD/pages/5432387149get sent on StudentEvaluationCompleted and if evaluation score is 100% (‘Assess Criteria’ or ‘Verifier Sign Off’).
Example Users
CaptainBreeze with Rank Captain and Vessel Carnival Breeze
ChiefBreeze with Rank Chief Engineer and Vessel Carnival Breeze
SShoreside is a regular user with email address
EOBreeze user being evaluated. Has Rank EO and Vessel Carnival Breeze
Org Configuration
CCL-Notification-Users: CaptainBreeze,CaptainDream
SIRMapping: EO:Captain
Notifications
Complete ‘Assess Criteria’ for Rank PDR
Completing the Assess Criteria for a Rank PDR is handled like a ‘Verifier Sign Off’. No explicit ‘Verifier Sign Off’ exists for Rank EO.
Send notification to SShoreside
Complete ‘Assess Criteria’ for Vessel PDR
Send notification to all users in user group CCL-Notification-Users whose Rank is Captain (from SIRMapping) AND are assigned to the same Vessel as the evaluated user (in this case Carnival Breeze): CaptainBreeze
Complete ‘Verifier Sign Off’ for Vessel PDR
Send notification to SShoreside