Skip to content

Instantly share code, notes, and snippets.

@themightychris
Created August 13, 2019 21:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save themightychris/33e4c9b2106d2a7b2cb9f8587aa36dc1 to your computer and use it in GitHub Desktop.
Save themightychris/33e4c9b2106d2a7b2cb9f8587aa36dc1 to your computer and use it in GitHub Desktop.
Slate default importer columns
class AbstractSpreadsheetConnector
{
// column maps
public static $studentColumns = [
'Key' => 'ForeignKey',
'School ID Number' => 'StudentNumber',
'Student ID' => 'StudentNumber',
'Username' => 'Username',
'Password' => 'Password',
'Email' => 'Email',
'First Name' => 'FirstName',
'First' => 'FirstName',
'Last Name' => 'LastName',
'Last' => 'LastName',
'Middle Name' => 'MiddleName',
'Middle' => 'MiddleName',
'Gender' => 'Gender',
'Sex' => 'Gender',
'Birth Date' => 'BirthDate',
'Birthday' => 'BirthDate',
'Graduation Year' => 'GraduationYear',
'Graduation' => 'GraduationYear',
'Grade' => 'Grade',
'School' => 'School',
'Cohort' => 'Group', 'Group' => 'Group',
'Advisor' => 'AdvisorUsername',
# 'Assigned Password',
# 'Email',
# 'Phone',
# 'Postal Address'
];
public static $alumniColumns = [
'Username' => 'Username',
'Password' => 'Password',
'Email' => 'Email',
'First Name' => 'FirstName',
'First' => 'FirstName',
'Last Name' => 'LastName',
'Last' => 'LastName',
'Middle Name' => 'MiddleName',
'Middle' => 'MiddleName',
'Gender' => 'Gender',
'Sex' => 'Gender',
'Birth Date' => 'BirthDate',
'Birthday' => 'BirthDate',
'Graduation Year' => 'GraduationYear',
'Graduation' => 'GraduationYear'
];
public static $staffColumns = [
'First Name' => 'FirstName',
'First' => 'FirstName',
'Last Name' => 'LastName',
'Last' => 'LastName',
'Middle Name' => 'MiddleName',
'Middle' => 'MiddleName',
'Gender' => 'Gender',
'Sex' => 'Gender',
'Birth Date' => 'BirthDate',
'Birthday' => 'BirthDate',
# 'StaffID',
'Username' => 'Username',
'Password' => 'Password',
'Account Level' => 'AccountLevel',
'Account Type' => 'AccountLevel',
'Role / Job Title' => 'About',
'Email' => 'Email',
'School' => 'School',
# 'Phone',
# 'Postal Address'
];
public static $sectionColumns = [
'Section ID' => 'SectionExternal',
'Section Code' => 'SectionCode',
'Section code' => 'SectionCode',
'Title' => 'Title',
'Course Code' => 'CourseCode',
'Course code' => 'CourseCode',
'Teacher' => 'TeacherUsername',
'Term' => 'Term',
'Terms' => 'Term',
'Schedule' => 'Schedule',
'Location' => 'Location',
'Room' => 'Location',
'Students Capacity' => 'StudentsCapacity',
'# of Students' => 'StudentsCapacity',
'Seats' => 'StudentsCapacity',
'Notes' => 'Notes'
];
public static $enrollmentColumns = [
'School ID Number' => 'StudentNumber',
'School ID' => 'StudentNumber',
'Student Number' => 'StudentNumber',
'Username' => 'Username'
];
// minimum required columns
public static $studentRequiredColumns = [
'StudentNumber',
'FirstName',
'LastName'
];
public static $alumniRequiredColumns = [
'FirstName',
'LastName'
];
public static $staffRequiredColumns = [
'FirstName',
'LastName'
];
public static $sectionRequiredColumns = [
'CourseCode'
];
public static $enrollmentRequiredColumns = [];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment