Skip to content

Added staff role on ccx to all the staff members of master course. - #148

Closed
amir-qayyum-khan wants to merge 18 commits into
masterfrom
enhancement/aq/add_master_course_staff_in_ccx
Closed

Added staff role on ccx to all the staff members of master course.#148
amir-qayyum-khan wants to merge 18 commits into
masterfrom
enhancement/aq/add_master_course_staff_in_ccx

Conversation

@amir-qayyum-khan

Copy link
Copy Markdown

Background

From issue #126

What is done in this PR

Studio Updates: None.

LMS Updates:

  • Now when a coach creates a new ccx, I am assigning staff role on this ccx course to all staff of master course.
  • Now staff of master course has staff rights on master course as well as ccx courses.
  • This is for course staff to see what ccx coaches are doing with course.
  • Move code that is not rendering view to utility.

@pdpinch @giocalitri @pwilkins

  • Staff on Master course
    screen shot 2015-11-30 at 5 12 54 pm
  • Staff on CCX
    screen shot 2015-11-30 at 5 13 04 pm

@amir-qayyum-khan
amir-qayyum-khan force-pushed the enhancement/aq/add_master_course_staff_in_ccx branch from 3a0b91a to 7a2452f Compare November 30, 2015 11:02
Comment thread common/djangoapps/student/roles.py Outdated

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

  • Because code was not able to compare ccxLocator objects though it was able to compare courseLocator.
    In sum when this line was comparing ccx keys it always give false even both key are match. Thats why I am deserialising keys and comparing them as strings.
  • Second option is block this PR and create small PR against ccx locator.py and override __eq__ method. Because we dont have overridden __eq__ method thats why when i compare 2 ccx locator objects it always returns false.

After that resume PRs https://github.com/edx/edx-platform/pull/10672 and https://github.com/mitocw/edx-platform/pull/148/files

http://stackoverflow.com/questions/1227121/compare-object-instances-for-equality-by-their-attributes-in-python

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't see a corresponding __eq__ method in https://github.com/edx/opaque-keys/blob/master/opaque_keys/edx/locator.py -- how is this dealt with elsewhere in edX?

@amir-qayyum-khan amir-qayyum-khan changed the title WIP Added staff role on ccx to all the staff members of master course. Added staff role on ccx to all the staff members of master course. Nov 30, 2015
Comment thread lms/djangoapps/ccx/views.py Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

is this a master course key?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

No it is master course object

@amir-qayyum-khan
amir-qayyum-khan force-pushed the enhancement/aq/add_master_course_staff_in_ccx branch from 4b40f84 to 28e8d47 Compare November 30, 2015 14:23
@amir-qayyum-khan

Copy link
Copy Markdown
Author

@pdpinch fixed issues

@amir-qayyum-khan
amir-qayyum-khan force-pushed the enhancement/aq/add_master_course_staff_in_ccx branch 3 times, most recently from 8b720cb to 18028d9 Compare December 1, 2015 09:04
@amir-qayyum-khan

Copy link
Copy Markdown
Author

@pdpinch should i create this on upstream?

@pdpinch

pdpinch commented Dec 1, 2015

Copy link
Copy Markdown
Member

Ok. Can you add "wip" to the title, until someone from our team can give it a thumbs up?


I am mobile.

On Dec 1, 2015, at 8:04 AM, Amir Qayyum Khan notifications@github.com wrote:

@pdpinch should i create this on upstream?


Reply to this email directly or view it on GitHub.

Comment thread lms/djangoapps/ccx/views.py Outdated

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I'm not sure this is the right or current way they want the docstrings.

@amir-qayyum-khan
amir-qayyum-khan force-pushed the enhancement/aq/add_master_course_staff_in_ccx branch from 18028d9 to 34d9e3d Compare December 2, 2015 07:57
@amir-qayyum-khan

Copy link
Copy Markdown
Author

Done @giocalitri

@amir-qayyum-khan
amir-qayyum-khan force-pushed the enhancement/aq/add_master_course_staff_in_ccx branch from 34d9e3d to 095cfbd Compare December 2, 2015 08:15
Comment thread lms/djangoapps/ccx/api.py Outdated

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sorry to insist on this, but I think the way they want docstrings now is something like this:

Args:
    course (<the object type here>): Master course instance
    ccx_key (<the object type here>): CCX course key
    ...

Returns:
    None  # Not sure this is actually necessary

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actually I have seen both, so I am not sure

@giocalitri

Copy link
Copy Markdown

I know you put the test in the test_views.py, but I feel like we need another one in test_api.py

@amir-qayyum-khan
amir-qayyum-khan force-pushed the enhancement/aq/add_master_course_staff_in_ccx branch from 095cfbd to 7f173d0 Compare December 3, 2015 11:50
@amir-qayyum-khan

Copy link
Copy Markdown
Author

@giocalitri Done with moving code and creating test file.
Removed api.py because the function i made is not api but utility function.
So i moved it in utility.
Updated comment as well.

CC @pdpinch

Comment thread lms/djangoapps/ccx/tests/test_utils.py Outdated

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

can please you use the full path for this? Even if it is correct I would avoid using this kind of imports unless the module is in the same directory of the file that imports it

Christine Lytwynec and others added 15 commits December 8, 2015 14:39
If platform name or "All rights reserved" translation contain non-ascii characters,
certificate HTML view would break with "'ascii' codec can't encode character...".
We were logging warnings about group names when no group names were
requested. This will clean up Splunk a little bit.
…d-time

Release/due times no longer round to half hours.
…jasmine-tests

ECOM-3103: Added Jasmine tests for the Financial Assistance form
…-tests

Problem type bok choy and a11y tests
Auto setting of verification deadlines with manual overrides
Fix issue with unicode characters in certificates.
These two directories are not added to sys.path when running the
application, so there is no need to add them for pylint.  When they are
added, they make it impossible to run pylint properly because
lms.lib.xblock is imported when trying to import xblock.
Update XBlock to 0.4.4 (just a packaging change)
@amir-qayyum-khan
amir-qayyum-khan force-pushed the enhancement/aq/add_master_course_staff_in_ccx branch 3 times, most recently from 409774a to 4a1c456 Compare December 10, 2015 11:37
…_ccx

Made coach dashboard available on ccx in addition to master course
@amir-qayyum-khan
amir-qayyum-khan force-pushed the enhancement/aq/add_master_course_staff_in_ccx branch 6 times, most recently from b227b3c to 35592a0 Compare December 10, 2015 11:59
@amir-qayyum-khan
amir-qayyum-khan force-pushed the enhancement/aq/add_master_course_staff_in_ccx branch from 35592a0 to bfcdb54 Compare December 10, 2015 12:27
@pdpinch pdpinch closed this Dec 10, 2015
tehreem-sadat pushed a commit that referenced this pull request Jan 13, 2020
…_hashing

Use secure salt for retirement username/email hashing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants