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

[SE-4175] Add CCX ID to generated filename prefixes #27028

Merged

Conversation

gabor-boros
Copy link
Contributor

@gabor-boros gabor-boros commented Mar 16, 2021

This pull requests adds a new feature to include CCX course IDs in the generated course filenames used for downloading reports, etc.

The suffix appended to the generated filename prefix is following the <separator>_ccx_<ccx id> pattern, to ensure unique filename generation per ccx - previously all CCX courses were downloaded with the same name.

Dependencies: None

Screenshots:
Screenshot 2021-03-16 at 16 22 12

Sandbox URL: Due to an DeprecatedEdxPlatformImportError exception the sandbox is not provisioned.

Merge deadline: None

Testing instructions:

  1. Enable ALLOW_COURSE_STAFF_GRADE_DOWNLOADS, ENABLE_GRADE_DOWNLOADS, and ENABLE_COURSE_FILENAME_CCX_SUFFIX features.
  2. Create a course
  3. Enable CCX for the course in the advanced settings
  4. Create a new CCX for the course
  5. Generate and download grades

Author notes and concerns:

This change should be cherry-picked to Koa and Lilac as well.

Reviewers

@openedx-webhooks
Copy link

openedx-webhooks commented Mar 16, 2021

Thanks for the pull request, @gabor-boros! I've created OSPR-5675 to keep track of it in JIRA, where we prioritize reviews. Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

Please let us know once your PR is ready for our review and all tests are green.

@openedx-webhooks openedx-webhooks added needs triage open-source-contribution PR author is not from Axim or 2U labels Mar 16, 2021
@gabor-boros gabor-boros marked this pull request as draft March 16, 2021 17:26
@gabor-boros gabor-boros force-pushed the gabor/add-ccx-id-to-filename-prefixes branch from 8bd2100 to 9bfb630 Compare March 17, 2021 08:52
@natabene
Copy link
Contributor

@gabor-boros Thank you for your contribution. Please let me know once it is ready for our review.

@gabor-boros
Copy link
Contributor Author

@natabene I'll let you know as soon this is ready for a review.

@openedx-webhooks openedx-webhooks added waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. and removed needs triage labels Mar 18, 2021
)

if enable_course_filename_ccx_suffix and getattr(course_id, 'ccx', None):
filename += separator.join([filename, 'ccx', course_id.ccx])
Copy link
Contributor

@mavidser mavidser Mar 22, 2021

Choose a reason for hiding this comment

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

filename = separator.join([filename, 'ccx', course_id.ccx]) - the additional + is causing tests to fail.

Copy link
Contributor

@mavidser mavidser left a comment

Choose a reason for hiding this comment

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

LGTM. This should be ready for edx's review once the tests pass :)

@gabor-boros gabor-boros marked this pull request as ready for review March 22, 2021 09:48
@openedx-webhooks openedx-webhooks added needs triage and removed waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. labels Mar 22, 2021
@gabor-boros
Copy link
Contributor Author

@natabene This is ready for edX review 🚀

@nasthagiri
Copy link
Contributor

@pdpinch Can you review and merge this PR related to CCX?

@pdpinch
Copy link
Contributor

pdpinch commented Apr 6, 2021

jenkins run all

1 similar comment
@gabor-boros
Copy link
Contributor Author

jenkins run all

@gabor-boros
Copy link
Contributor Author

FTR: Oh, there's an invalid syntax error:

18:04:13    File "/home/jenkins/workspace/edx-platform-quality-pipeline-pr/cms/envs/test.py", line 26, in <module>
18:04:13      from .common import *
18:04:13    File "/home/jenkins/workspace/edx-platform-quality-pipeline-pr/cms/envs/common.py", line 470
18:04:13      'ENABLE_HELP_LINK': True,
18:04:13      ^
18:04:13  SyntaxError: invalid syntax

@gabor-boros
Copy link
Contributor Author

@pdpinch FYI, I just fixed the failing tests 😇

@natabene
Copy link
Contributor

@pdpinch Could you have another look?

@gabor-boros
Copy link
Contributor Author

@natabene Could you please help me scheduling this PR for review? 😇

@pdpinch
Copy link
Contributor

pdpinch commented May 10, 2021

Sorry I missed both your updates -- I'll take a look this week.

@pdpinch pdpinch self-assigned this May 10, 2021
@pdpinch
Copy link
Contributor

pdpinch commented May 11, 2021

@gabor-boros I don't understand what you mean by this, in the PR description:

This PR differs from the upstream PR, since the upstream already removed Python2 related syntax from its code.

Copy link
Contributor

@pdpinch pdpinch left a comment

Choose a reason for hiding this comment

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

Looking good to me now. 👍

@natabene
Copy link
Contributor

@pdpinch Is this fit to merge? If so, let's merge.

@pdpinch
Copy link
Contributor

pdpinch commented May 25, 2021

Sure thing! I wasn't sure if it needed another approval.

@pdpinch pdpinch merged commit baca477 into openedx:master May 25, 2021
@openedx-webhooks
Copy link

@gabor-boros 🎉 Your pull request was merged!

Please take a moment to answer a two question survey so we can improve your experience in the future.

@edx-pipeline-bot
Copy link
Contributor

EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production.

@edx-pipeline-bot
Copy link
Contributor

EdX Release Notice: This PR has been deployed to the production environment.

@edx-pipeline-bot
Copy link
Contributor

EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production.

@edx-pipeline-bot
Copy link
Contributor

EdX Release Notice: This PR has been deployed to the production environment.

@gabor-boros gabor-boros deleted the gabor/add-ccx-id-to-filename-prefixes branch May 29, 2021 13:31
blarghmatey pushed a commit to mitodl/edx-platform that referenced this pull request Aug 2, 2021
gabor-boros added a commit to open-craft/edx-platform that referenced this pull request Oct 11, 2021
gabor-boros added a commit to open-craft/edx-platform that referenced this pull request Oct 11, 2021
gabor-boros added a commit to edx-olive/edx-platform-old that referenced this pull request Oct 11, 2021
gabor-boros added a commit to open-craft/edx-platform that referenced this pull request Oct 25, 2021
gabor-boros added a commit to open-craft/edx-platform that referenced this pull request Nov 1, 2021
edx-community-bot added a commit that referenced this pull request Nov 8, 2021
…27028)

This is the backport of https://github.com/edx/edx-platform/pull/27028.

---
This pull requests backport a feature to include CCX course IDs in the generated course filenames used for downloading reports, etc.

The suffix appended to the generated filename prefix is following the  `<separator>_ccx_<ccx id>` pattern, to ensure unique filename generation per ccx - previously all CCX courses were downloaded with the same name.

**Dependencies**: None

**Screenshots**: 
![Screenshot 2021-03-16 at 16 22 12](https://user-images.githubusercontent.com/19173947/111349994-f1c42980-8681-11eb-8fff-d28024899957.png)

**Sandbox URL**: TBD

**Merge deadline**: None

**Testing instructions**:

1. Navigate to https://pr29101.sandbox.opencraft.hosting
2. Login as staff
3. Navigate to https://pr29101.sandbox.opencraft.hosting/courses/ccx-v1:edX+DemoX+Demo_Course+ccx@1/instructor#view-data_download
4. Click "Download profile information as a CSV" button
5. Check that the file name contains CCX
gabor-boros added a commit to open-craft/edx-platform that referenced this pull request Nov 8, 2021
edx-community-bot added a commit that referenced this pull request Nov 8, 2021
…27028)

This is the backport of https://github.com/edx/edx-platform/pull/27028.

---
This pull requests backport a feature to include CCX course IDs in the generated course filenames used for downloading reports, etc.

The suffix appended to the generated filename prefix is following the  `<separator>_ccx_<ccx id>` pattern, to ensure unique filename generation per ccx - previously all CCX courses were downloaded with the same name.

**Dependencies**: None

**Screenshots**: 
![Screenshot 2021-03-16 at 16 22 12](https://user-images.githubusercontent.com/19173947/111349994-f1c42980-8681-11eb-8fff-d28024899957.png)

**Sandbox URL**: TBD

**Merge deadline**: None

**Testing instructions**:

1. Navigate to https://pr29101.sandbox.opencraft.hosting
2. Login as staff
3. Navigate to https://pr29101.sandbox.opencraft.hosting/courses/ccx-v1:edX+DemoX+Demo_Course+ccx@1/instructor#view-data_download
4. Click "Download profile information as a CSV" button
5. Check that the file name contains CCX
gabor-boros added a commit to open-craft/edx-platform that referenced this pull request Nov 9, 2021
fsologureng pushed a commit to eol-uchile/edx-platform that referenced this pull request Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged open-source-contribution PR author is not from Axim or 2U
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants