This version of the Ed-Fi Dashboards is no longer supported. See the Ed-Fi Technology Version Index for a link to the latest version.
How To: Pull Metadata from the ListMetadataProvider
- Kistel Hazel
- Ian Christopher
Overview
The Ed-Fi Dashboards v1.3.1 introduced a new ListMetadataProvider that allows teacher and staff data to be pulled from an external provider. This is useful for implementations where the dashboard data stores are not natively housing this information, or where a direct pointer to a system of record is desirable.
Implementations prior to v1.3.1 may have custom code that needs to be updated. For example, implementers may see an error screen when viewing the Campus Staff List or the Campus Teacher List page if you have a custom ListMetadataProvider.
The steps to update the the current ListMetadataProvider are:
Open your custom ListMetadataProvider, usually in the EdFi.Dashboards.Extensions.State.Resources project, in Staff\ListMetadataProvider.cs.
Open the core ListMetadataProvider, located in the EdFi.Dashboards.Resources project, in Staff\ListMetadataProvider.cs.
Scroll to the bottom of the Core ListMetadataProvider. Copy the entire contents of the Teacher/Staff List C# Region. Paste the contents inside the extended class, at the very end of the Class.
In the Extended ListMetadataProvider, in
GetListMetadata()
, at the bottom of the C#switch
statement, above thedefault:
statement, paste the following code:
case MetadataListIdResolver.TeacherListId: return TeacherListMetadata(); case MetadataListIdResolver.StaffListId: return StaffListMetadata();
That section should now look like:
case MetadataListIdResolver.PriorYearSchoolMetricTableListId: return SchoolMetricTableMetadata(); case MetadataListIdResolver.GoalPlanningSchoolMetricTableListId: return GoalPlanningSchoolMetricTableMetadata(); case MetadataListIdResolver.TeacherListId: return TeacherListMetadata(); case MetadataListIdResolver.StaffListId: return StaffListMetadata(); default: throw new KeyNotFoundException(string.Format("The Metadata List Id:{0} was not found.", metadataListId));
Once these steps are complete, build and verify that the Staff and Teacher List pages are working as designed.