/
Guide to PDR Widget Configuration

Guide to PDR Widget Configuration

The widget can be used as follows

@{ Html.RenderAction("ProfessionalDevelopmentRecords", "PDR", new {path = Model.Path, isInstructor = false, title= "Professional Development Records (L4)", pdrLevel = 4, pdrVesselLevel = 4, emptyCssClass = "hidden", inProgressCssClass = "alert alert-error", completedCssClass = "alert alert-success", currentCssClass = "alert alert-info", futureCssClass = "alert alert-warning", user = @Model.CurrentUser , area = "Widget"}); }

Customizable Widget Parameters

Filter Parameters

  • path - The root page for searching for courses to display

  • user - The user whose courses/status the widget should display

  • pdrLevel - Filter for PDR level. Only applies to courses which *do not* have a Customer.Course.Vessel attribute. Filters our courses whose Customer.Course.Level attribute does not the parameter.

  • pdrVesselLevel - Filter for vessel PDR level. Only applies to courses which have a Customer.Course.Vessel attribute. Filters out courses whose Customer.Course.Vessel attribute does not match the parameter.

  • isInstructor - True indicates the widget is in ‘instructor mode’

  • instructorRank - (mandatory with isInstructor = “true”): show courses whose Rank match up with instructorRank and user’s orgProfileField ‘Can Assess Rank’.


Display Parameters

  • title Title displayed as a header of the widget

  • emptyCssClass CSS classes added to the widget <div> element if no courses have been found to list

  • inProgressCssClass CSS classes added to the widget <div> element if there are courses in different states (i.e. 1 completed, 2 registered, 3 not registered)

  • completedCssClass CSS classes added to the widget <div> element if the current user has completed all courses

  • currentCssClass CSS classes added to the widget <div> element if all courses have an active registration with the current user

  • futureCssClass CSS classes added to the widget <div> element if all courses have no active registration (inactive) or no registration


The PDR widget lists courses according to pdrLevel and pdrVesselLevel

  • If a course does have the attribute Customer.Course.Vessel the widget parameter pdrVesselLevel is used to match against the course attribute Customer.Course.Level.

  • If a course does not have the attribute Customer.Course.Vessel the widget parameter pdrLevel is used to match against the course attribute Customer.Course.Level.


This widget displays a list of links to courses which meet certain criteria. The specific criteria depends on whether the widget is in ‘instructor mode’ or not.

Normal Model

  • The widget displays a set of links to courses where:

    • The courses are descendants of the path

    • The course is not vessel-specific and The course’s Level attribute matches the pdrLevel parameter.

    • The course’s Rank attribute must match the current user’s Rank profile field.

    • The courses vessel matches the vessel custom profile field of the user (if the course has a vessel attribute)

  • In addition, each link is annotated to indicate status (ProfessionalDevelopmentRecordStatusEnum). The status is determined by:

    • Is there an offering in which the user has a registration

    • If not, the annotation is 'future'

    • If there is a registration with state 'active', then the annotation is 'active'

    • If there is a registration with state 'pending', then the annotation is 'future'

    • If there is a registration with state 'completed' or 'historical', the annotation is 'past'

    • Otherwise the annotation is 'future'


  • Rank matching should be done against a rank parameter passed into the widget rather than looking at the current user's rank

  • There will be a new org profile field 'CanInstructFor' which will be the rank that a user is allowed to act as an instructor for

  • The template page will pass in this rank value in when the widget is used as an instructor

  • The widget should take a boolean parameter IsInstructor

  • If false, the behaviour is as currently spec'd

  • If true, the widget does not need to look at registration state and no status icon should be displayed

  • i.e. if the widget is in IsIntructor mode, then it is basically just displaying a set of links


Use Widget for Students (isInstructor = “false”)

The widget parameter isInstructor must be set to false.

The user must have an organization profile field Rank in order to be able to see PDR courses in the widget. If the user’s Rank match up with the course attribute Customer.Course.Rank the PDR widget considers this course to be listed.

If the user doesn’t have an org profile field Vessel or the field has no value - all PDR courses are considered to be listed.

If the user has a Vessel assigned, only PDR courses with that matching Vessel attribute will be considered to be listed.

Use Widget for Instructors (isInstructor = “true”)

The widget parameter isInstructor must be set to true.

The widget parameter instructorRank must be set to a specific rank.

The user must have an organization profile field Rank and ‘Can Assess Rank’  in order to see PDR courses in the PDR widget. If the user’s ‘Can Assess Rank match up with the course attribute Customer.Course.Rank the PDR widget considers this course to be listed.

The course attribute Customer.Course.Level also needs to match up with the PDR widget parameter pdrLevel and pdrVesselLevel.

The widget can be used as follows

@{ Html.RenderAction("ProfessionalDevelopmentRecords", "PDR", new {path = Model.Path, isInstructor = false, title= "Professional Development Records (L4)", pdrLevel = 4, pdrVesselLevel = 4, emptyCssClass = "hidden", inProgressCssClass = "alert alert-error", completedCssClass = "alert alert-success", currentCssClass = "alert alert-info", futureCssClass = "alert alert-warning", user = @Model.CurrentUser , area = "Widget"}); }

Customizable Widget Parameters

Filter Parameters

  • path - The root page for searching for courses to display

  • user - The user whose courses/status the widget should display

  • pdrLevel - Filter for PDR level. Only applies to courses which *do not* have a Customer.Course.Vessel attribute. Filters our courses whose Customer.Course.Level attribute does not the parameter.

  • pdrVesselLevel - Filter for vessel PDR level. Only applies to courses which have a Customer.Course.Vessel attribute. Filters out courses whose Customer.Course.Vessel attribute does not match the parameter.

  • isInstructor - True indicates the widget is in ‘instructor mode’

  • instructorRank - (mandatory with isInstructor = “true”): show courses whose Rank match up with instructorRank and user’s orgProfileField ‘Can Assess Rank’.


Display Parameters

  • title Title displayed as a header of the widget

  • emptyCssClass CSS classes added to the widget <div> element if no courses have been found to list

  • inProgressCssClass CSS classes added to the widget <div> element if there are courses in different states (i.e. 1 completed, 2 registered, 3 not registered)

  • completedCssClass CSS classes added to the widget <div> element if the current user has completed all courses

  • currentCssClass CSS classes added to the widget <div> element if all courses have an active registration with the current user

  • futureCssClass CSS classes added to the widget <div> element if all courses have no active registration (inactive) or no registration


The PDR widget lists courses according to pdrLevel and pdrVesselLevel

  • If a course does have the attribute Customer.Course.Vessel the widget parameter pdrVesselLevel is used to match against the course attribute Customer.Course.Level.

  • If a course does not have the attribute Customer.Course.Vessel the widget parameter pdrLevel is used to match against the course attribute Customer.Course.Level.


This widget displays a list of links to courses which meet certain criteria. The specific criteria depends on whether the widget is in ‘instructor mode’ or not.

Normal Model

  • The widget displays a set of links to courses where:

    • The courses are descendants of the path

    • The course is not vessel-specific and The course’s Level attribute matches the pdrLevel parameter.

    • The course’s Rank attribute must match the current user’s Rank profile field.

    • The courses vessel matches the vessel custom profile field of the user (if the course has a vessel attribute)

  • In addition, each link is annotated to indicate status (ProfessionalDevelopmentRecordStatusEnum). The status is determined by:

    • Is there an offering in which the user has a registration

    • If not, the annotation is 'future'

    • If there is a registration with state 'active', then the annotation is 'active'

    • If there is a registration with state 'pending', then the annotation is 'future'

    • If there is a registration with state 'completed' or 'historical', the annotation is 'past'

    • Otherwise the annotation is 'future'


  • Rank matching should be done against a rank parameter passed into the widget rather than looking at the current user's rank

  • There will be a new org profile field 'CanInstructFor' which will be the rank that a user is allowed to act as an instructor for

  • The template page will pass in this rank value in when the widget is used as an instructor

  • The widget should take a boolean parameter IsInstructor

  • If false, the behaviour is as currently spec'd

  • If true, the widget does not need to look at registration state and no status icon should be displayed

  • i.e. if the widget is in IsIntructor mode, then it is basically just displaying a set of links


Use Widget for Students (isInstructor = “false”)

The widget parameter isInstructor must be set to false.

The user must have an organization profile field Rank in order to be able to see PDR courses in the widget. If the user’s Rank match up with the course attribute Customer.Course.Rank the PDR widget considers this course to be listed.

If the user doesn’t have an org profile field Vessel or the field has no value - all PDR courses are considered to be listed.

If the user has a Vessel assigned, only PDR courses with that matching Vessel attribute will be considered to be listed.

Use Widget for Instructors (isInstructor = “true”)

The widget parameter isInstructor must be set to true.

The widget parameter instructorRank must be set to a specific rank.

The user must have an organization profile field Rank and ‘Can Assess Rank’  in order to see PDR courses in the PDR widget. If the user’s ‘Can Assess Rank match up with the course attribute Customer.Course.Rank the PDR widget considers this course to be listed.

The course attribute Customer.Course.Level also needs to match up with the PDR widget parameter pdrLevel and pdrVesselLevel.