Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Include Page
_Previous Version Note
_Previous Version Note

The Ed-Fi Dashboards have a ListMetadataProvider that allows teacher and staff data to be pulled from an external data source. 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.

This feature was introduced in Ed-Fi Dashboards v1.3.1. 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:

  1. Open your custom ListMetadataProvider, usually in the EdFi.Dashboards.Extensions.State.Resources project, in Staff\ListMetadataProvider.cs.

  2. Open the core ListMetadataProvider, located in the EdFi.Dashboards.Resources project, in Staff\ListMetadataProvider.cs.

  3. 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.

  4. In the Extended ListMetadataProvider, in GetListMetadata(), at the bottom of the C# switch statement, above the default: statement, paste the following code:

Code Block
languagec#
case MetadataListIdResolver.TeacherListId:
	return TeacherListMetadata();
case MetadataListIdResolver.StaffListId:
	return StaffListMetadata();

That section should now look like:

Code Block
languagec#
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.