Skip to content
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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

igobranco
Copy link
Contributor

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, select Data download and then click on the button Download 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:

make dev.shell.lms
cat /tmp/edx-s3/grades/bb6d638a296059742509a0d319ddf8456b6dbf9a/edX_DemoX_Demo_Course_student_profile_info_2023-05-09-1149.csv

Deadline

None
I think this features can be easily backported to Palm and Olive.

Other information

None.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label May 10, 2023
@openedx-webhooks
Copy link

openedx-webhooks commented May 10, 2023

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 approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.

🔘 Provide context

To 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:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads

🔘 Get a green build

If 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 @openedx/wg-maintenance-edx-platform. Tag them in a comment and let them know that your changes are ready for review.

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:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@e0d
Copy link
Contributor

e0d commented May 18, 2023

@jmakowski1123 and @ProductRyan do you feel like there should be a product review for this? If not, which team owns instructor reports?

@mphilbrick211
Copy link

@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!

@mphilbrick211
Copy link

@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

@jmakowski1123
Copy link

Product Feature Review ticket created and assigned to Spencer, I believe he owns the instructor reports. openedx/platform-roadmap#281

@mphilbrick211
Copy link

@mphilbrick211 mphilbrick211 added the waiting for eng review PR is ready for review. Review and merge it, or suggest changes. label Feb 21, 2024
@pomegranited pomegranited self-assigned this Mar 6, 2024
Copy link
Contributor

@pomegranited pomegranited left a 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",
Copy link
Contributor

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?

Copy link
Contributor

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.

Copy link
Contributor

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nudge @igobranco 😃

Copy link
Contributor

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?

@pomegranited pomegranited added the waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. label Mar 14, 2024
@mphilbrick211
Copy link

Hi @igobranco! Do you plan to pursue this pull request? If so, it looks like some new checks need to be run. Thanks!

@mphilbrick211 mphilbrick211 added product review complete PR has gone through product review inactive PR author has been unresponsive for several months and removed product review PR requires product review before merging waiting for eng review PR is ready for review. Review and merge it, or suggest changes. labels Jul 31, 2024
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.
@igobranco igobranco force-pushed the igobranco/instructor-add-enrollment-date-profile-info-csv branch from f9bfde2 to e907ed4 Compare August 2, 2024 15:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
inactive PR author has been unresponsive for several months open-source-contribution PR author is not from Axim or 2U product review complete PR has gone through product review waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc.
Projects
Status: In Eng Review
Development

Successfully merging this pull request may close these issues.

6 participants