-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add enrollment date and custom fields to students profile information CSV #32216
base: master
Are you sure you want to change the base?
Add enrollment date and custom fields to students profile information CSV #32216
Conversation
Thanks for the pull request, @igobranco! What's next?Please work through the following steps to get your changes ready for engineering review: 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. 🔘 Let us know that your PR is ready for review:Who will review my changes?This repository is currently maintained by Where can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:
When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
cdc831b
to
f9bfde2
Compare
@jmakowski1123 and @ProductRyan do you feel like there should be a product review for this? If not, which team owns instructor reports? |
Hi @jmakowski1123 and @ProductRyan - flagging Ed's question for you. Thanks! |
Friendly follow-up on this @jmakowski1123 and @ProductRyan |
Product Feature Review ticket created and assigned to Spencer, I believe he owns the instructor reports. openedx/platform-roadmap#281 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is running as expected (enrollment_date is appearing in the user profile report).
But I've raised some concerns about the STUDENT_PROFILE_DOWNLOAD_FIELDS_CUSTOM_STUDENT_ATTRIBUTES
feature part of this PR (see inline).
"student_profile_download_fields_custom_student_attributes", | ||
getattr( | ||
settings, | ||
"STUDENT_PROFILE_DOWNLOAD_FIELDS_CUSTOM_STUDENT_ATTRIBUTES", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @igobranco , could you refactor this new feature flag to use documented edx-toggles instead? See How to: Documenting new feature toggles for instructions, and instructor.toggles and discussion.config.settings for examples.
Unfortunately I don't think there's a way to use SiteConfiguration as a toggle, so it'll need to be a DjangoSetting (feature flag), Waffle Switch or Waffle Flag. But if org-wide settings are a requirement for your use case, let's talk about it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Say someone uses STUDENT_PROFILE_DOWNLOAD_FIELDS_CUSTOM_STUDENT_ATTRIBUTES = ['age']
but fails to add the property/method to the User model. When they run the profile report, this line will throw a TypeError.
Could you please update extract_attr(student, feature)
to catch that TypeError?
You could communicate the error in the report field if you think that's an appropriate place for it, but it should at least be logged, and shouldn't cause the whole report to fail.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @igobranco , do you know roughly when you'll have time to complete this PR? It would be great if we could get this feature into Redwood.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nudge @igobranco 😃
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your updates @igobranco . Do you have any thoughts on my suggestions above?
Hi @igobranco! Do you plan to pursue this pull request? If so, it looks like some new checks need to be run. Thanks! |
Add `enrollment_date` column on the csv file of all students enrolled in a course.
Allow site operators to include on the export of profile information as CSV custom fields if the platform has an extending User model. This can be used if you have an extended model that include for example an university student number and site operator want to export the student number on the student profile information CSV.
f9bfde2
to
e907ed4
Compare
Hi @igobranco - checking in on this! |
Description
This pull request refactors the query of the students profile information CSV so it retrieves the CourseEnrollment object and adds by default the enrollment date on the CSV.
This change as direct impact to "Course Author" that have the "Data Researcher" role because they can better understand when its students have been enrolled in the course.
Additionally, another improvement has been implemented on the same use case. That allows site operators to include on the export custom fields if the platform has an extending User model. This can be used if you have an extended model that include for example an university student number and Site Operator want to export the student number on the student profile information CSV.
The pull request has impact on the use case: LMS > Course > Instructor > Data download > Download profile information as a CSV
Supporting information
None.
Testing instructions
LMS > Course > Instructor > Data download > Download profile information as a CSV
Open a course on the LMS, open the
Instructor
tab, selectData download
and then click on the buttonDownload profile information as a CSV
. If you are running on the Devstack the exported file should be on the/tmp/edx-s3
folder inside the LMS container.Example:
Deadline
None
I think this features can be easily backported to Palm and Olive.
Other information
None.