-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #124 from umeditor/current-students
Current students
- Loading branch information
Showing
9 changed files
with
311 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
# See Course_Connection_EDA.recipie.yml for usage | ||
|
||
- plugin: snowfakery.standard_plugins.Salesforce.SalesforceQuery | ||
- plugin: faker_edu.Provider | ||
|
||
- macro: eda_course_connection_base | ||
fields: | ||
RecordType: | ||
random_choice: | ||
Student: 20 | ||
Faculty: 1 | ||
hed__Account__c: # The Academic Program that the student or faculty member is associated with. | ||
SalesforceQuery.random_record: | ||
from: Account | ||
where: RecordTypeId != null AND RecordType.Name!='Academic_Program' | ||
# hed__Affiliation__c: If this Contact is affiliated with an Academic Program through an existing Program Enrollment record, and that Program Enrollment is related to this Course Connection, this Affiliation field is auto-populated with the Program Enrollment's Affiliation. If both conditions aren't true, then this Affiliation field is left blank. | ||
hed__Contact__c: | ||
SalesforceQuery.random_record: | ||
from: Contact | ||
hed__Course_Offering__c: | ||
SalesforceQuery.random_record: | ||
from: hed__Course_Offering__c | ||
hed__Credits_Attempted__c: | ||
random_number: | ||
min: 1 | ||
max: 4 | ||
hed__Credits_Earned__c: | ||
random_number: | ||
min: 1 | ||
max: ${{hed__Credits_Attempted__c}} | ||
hed__Grade__c: | ||
random_number: | ||
min: 1 | ||
max: 4 | ||
hed__Primary__c: | ||
random_choice: | ||
- True | ||
- False | ||
# hed__Program_Enrollment__c: Need to create records first | ||
hed__Status__c: | ||
random_choice: | ||
- Current | ||
- Former | ||
- In Progress | ||
- Completed | ||
- Enrolled | ||
- Failed | ||
- On Hold | ||
- Withdrew | ||
- Audit | ||
hed__Credentialing_Identifier__c: ${{fake.bothify(text='#########')}} | ||
hed__Display_Grade__c: | ||
random_choice: | ||
- A+ | ||
- A | ||
- A- | ||
- B+ | ||
- B | ||
- B- | ||
- C+ | ||
- C | ||
- C- | ||
- D+ | ||
- D | ||
- D- | ||
- F | ||
hed__Verification_Status__c: | ||
random_choice: | ||
- Verified | ||
- Pending | ||
- Unverified | ||
- Revoked | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
## EDA Course Connection Example | ||
|
||
# Requirments | ||
# Install cci: See https://cumulusci.readthedocs.io/en/latest/get_started.html | ||
# Install the fake_edu Faker: See https://pypi.org/project/faker-edu/ | ||
|
||
# To run this code against a fresh scratch org called ("qa"): | ||
# | ||
# cci flow run eda:trial_org --org qa | ||
# cci task run generate_and_load_from_yaml -o generator_yaml snowfakery_samples/EDA/Course_Connection_EDA.recipe.yml -o num_records 30 -o num_records_tablename hed__Course_Enrollment__c --org qa | ||
|
||
# Look at snowfakery_samples/salesforce/Course_Connection.recipe.yml for more examples. | ||
# - include_file: standard_EDA_objs_recipe.yml | ||
|
||
- include_file: Course_Connection_EDA.macro.yml | ||
|
||
- object: hed__Course_Enrollment__c | ||
include: eda_course_connection_base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
# See Course_EDA.recipie.yml for usage | ||
|
||
- plugin: snowfakery.standard_plugins.Salesforce.SalesforceQuery | ||
- plugin: faker_edu.Provider | ||
|
||
- macro: eda_course_base | ||
fields: | ||
name: ${{fake.department_name}} ${{fake.random_int(min=100, max=500)}} | ||
hed__Account__c: | ||
SalesforceQuery.random_record: | ||
from: Account | ||
where: RecordTypeId != null AND RecordType.Name!='University_Department' | ||
hed__Course_ID__c: fake.bothify(text='#########')}} | ||
hed__Credit_Hours__c: ${{fake.random_int(min=1, max=5)}}.${{fake.random_int(min=0, max=99, step=25)}} | ||
# hed__Description__c This field has been replaced by the Extended Description field | ||
hed__Extended_Description__c: ${{fake.paragraph(nb_sentences=5)}} | ||
hed__Academic_Level__c: | ||
random_choice: | ||
- Pre-K/Preschool | ||
- Elementary | ||
- Middle School | ||
- High School | ||
- Undergraduate | ||
- Graduate | ||
- Doctoral | ||
- Post-Baccalaureate Certificate | ||
- Adult Education | ||
- Professional Education | ||
#hed__Credentialing_Identifier__c An International Resource Identifier that uniquely identifies this credential. | ||
hed__Issuer__c: | ||
SalesforceQuery.random_record: | ||
from: Account | ||
where: RecordTypeId != null AND RecordType.Name!='Educational_Institution' | ||
hed__Subject__c: | ||
random_choice: | ||
- Agriculture | ||
- Architecture | ||
- Biology | ||
- Business | ||
- Management, and Marketing | ||
- Communication | ||
- Computer and Information Sciences | ||
- Education | ||
- Engineering | ||
- English Language and Literature/Letters | ||
- Family and Consumer Sciences | ||
- Foreign Languages | ||
- General Studies and Humanities | ||
- Health Professions | ||
- History | ||
- Legal Professions and Studies | ||
- Mathematics and Statistics | ||
- Natural Resources and Conservation | ||
- Philosophy and Religious Studies | ||
- Physical Sciences | ||
- Psychology | ||
- Social Sciences | ||
- Visual and Performing Arts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
## EDA Course Example | ||
|
||
# Requirments | ||
# Install cci: See https://cumulusci.readthedocs.io/en/latest/get_started.html | ||
# Install the fake_edu Faker: See https://pypi.org/project/faker-edu/ | ||
|
||
# To run this code against a fresh scratch org called ("qa"): | ||
# | ||
# cci flow run eda:trial_org --org qa | ||
# cci task run generate_and_load_from_yaml -o generator_yaml snowfakery_samples/EDA/Course_EDA.recipe.yml -o num_records 30 -o num_records_tablename hed__Course__c --org qa | ||
|
||
# Look at snowfakery_samples/salesforce/Course.recipe.yml for more examples. | ||
# - include_file: standard_EDA_objs_recipe.yml | ||
|
||
- include_file: Course_EDA.macro.yml | ||
|
||
- object: hed__Course__c | ||
include: eda_course_base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# See Course_Offering_EDA.recipie.yml for usage | ||
|
||
- plugin: snowfakery.standard_plugins.Salesforce.SalesforceQuery | ||
- plugin: faker_edu.Provider | ||
|
||
- macro: eda_course_offering_base | ||
fields: | ||
hed__Course__c: | ||
SalesforceQuery.random_record: | ||
from: hed__Course__c | ||
hed__Term__c: | ||
SalesforceQuery.random_record: | ||
from: hed__Term__c | ||
Name: ${{fake.bothify(text='#########')}} # Course Offering ID | ||
hed__Section_ID__c: ${{fake.bothify(text='##')}} | ||
hed__Start_Date__c: | ||
date_between: | ||
start_date: -1y | ||
end_date: today | ||
hed__End_Date__c: | ||
date_between: | ||
start_date: -1y | ||
end_date: today | ||
hed__Capacity__c: | ||
random_number: | ||
min: 10 | ||
max: 300 | ||
step: 5 | ||
#hed__Time_Block__c: - Need to create records | ||
hed__Faculty__c: | ||
SalesforceQuery.random_record: | ||
from: contact | ||
#hed__Facility__c: - Need to create records |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
## EDA Course Offering Example | ||
|
||
# Requirments | ||
# Install cci: See https://cumulusci.readthedocs.io/en/latest/get_started.html | ||
# Install the fake_edu Faker: See https://pypi.org/project/faker-edu/ | ||
|
||
# To run this code against a fresh scratch org called ("qa"): | ||
# | ||
# cci flow run eda:trial_org --org qa | ||
# cci task run generate_and_load_from_yaml -o generator_yaml snowfakery_samples/EDA/Course_Offering_EDA.recipe.yml -o num_records 30 -o num_records_tablename hed__Course_Offering__c --org qa | ||
|
||
# Look at snowfakery_samples/salesforce/Course_Offering.recipe.yml for more examples. | ||
# - include_file: standard_EDA_objs_recipe.yml | ||
|
||
- include_file: Course_Offering_EDA.macro.yml | ||
|
||
- object: hed__Course_Offering__c | ||
include: eda_course_offering_base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
## EDA Account Example | ||
|
||
# Requirments | ||
# Install cci: See https://cumulusci.readthedocs.io/en/latest/get_started.html | ||
# Install the fake_edu Faker: See https://pypi.org/project/faker-edu/ | ||
|
||
# To run this code against a fresh scratch org called ("qa"): | ||
# | ||
# cci flow run eda:trial_org --org qa | ||
# cci task run generate_and_load_from_yaml -o generator_yaml snowfakery_samples/EDA/Term_EDA.recipe.yml -o num_records 300 -o num_records_tablename Acount --org qa | ||
|
||
# Look at snowfakery_samples/salesforce/Account.recipe.yml for more examples. | ||
# - include_file: standard_EDA_objs_recipe.yml | ||
|
||
- plugin: snowfakery.standard_plugins.Salesforce.SalesforceQuery | ||
- plugin: faker_edu.Provider | ||
|
||
- macro: eda_term_base | ||
fields: | ||
Name: Term | ||
hed__Account__c: | ||
SalesforceQuery.random_record: | ||
from: Account | ||
where: RecordTypeId != null AND RecordType.Name!='Educational_Institution' | ||
hed__Start_Date__c: | ||
date_between: | ||
start_date: -1y | ||
end_date: today | ||
hed__End_Date__c: | ||
date_between: | ||
start_date: -1y | ||
end_date: today | ||
hed__Parent_Term__c: | ||
hed__Type__c: | ||
random_choice: | ||
- Quarter | ||
- Semester | ||
- School Year | ||
- Part of Term | ||
hed__Grading_Period_Sequence__c: | ||
random_number: | ||
min: 1 | ||
max: 100 | ||
hed__Instructional_Days__c: | ||
random_number: | ||
min: 50 | ||
max: 100 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
## EDA Term Example | ||
|
||
# Requirments | ||
# Install cci: See https://cumulusci.readthedocs.io/en/latest/get_started.html | ||
# Install the fake_edu Faker: See https://pypi.org/project/faker-edu/ | ||
|
||
# To run this code against a fresh scratch org called ("qa"): | ||
# | ||
# cci flow run eda:trial_org --org qa | ||
# cci task run generate_and_load_from_yaml -o generator_yaml snowfakery_samples/EDA/Term_EDA.recipe.yml --org qa | ||
|
||
# Look at snowfakery_samples/salesforce/Term.recipe.yml for more examples. | ||
# - include_file: standard_EDA_objs_recipe.yml | ||
|
||
- include_file: Term_EDA.macro.yml | ||
|
||
- object: hed__Term__c | ||
include: eda_term_base | ||
fields: | ||
Name: Fall | ||
hed__Type__c: Quater | ||
hed__Grading_Period_Sequence__c: 1 | ||
|
||
- object: hed__Term__c | ||
include: eda_term_base | ||
fields: | ||
Name: Winter | ||
hed__Type__c: Quater | ||
hed__Grading_Period_Sequence__c: 2 | ||
|
||
- object: hed__Term__c | ||
include: eda_term_base | ||
fields: | ||
Name: Spring | ||
hed__Type__c: Quater | ||
hed__Grading_Period_Sequence__c: 3 | ||
|
||
- object: hed__Term__c | ||
include: eda_term_base | ||
fields: | ||
Name: Summer | ||
hed__Type__c: Quater | ||
hed__Grading_Period_Sequence__c: 4 |