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

WIP Refactored schedule tree #11647

Closed

Conversation

amir-qayyum-khan
Copy link
Contributor

Background

fixes mitocw#146, fixes mitocw#165, fixes mitocw#54, fixes mitocw#39
mit_pr

What is done in this PR

Studio Updates: None.
LMS Updates:

  • Refactored schedule page to use full potential of backbonejs
  • Now schedule tree will not collapse after setting dates or removing child.
Detail:
  • User can see start or due date on schedule tree.
  • User can remove a unit (can be chapter, subsection or vertical) from tree. By doing so we will hide this component along with children by setting `hidden=true``
  • Added validation on changing start or due date on schedule tree.
  • The units with hidden=false is shown to schedule tree on left size, the units with hidden=true is supplied to form at right side. From there user can change visibility of hidden units by clicking Adding a unit or Adding all units
  • Added validation on start and due date in form.
  • In this refactoring I moved possible code to template.underscore files.
  • Made custom view for tree, right container, set date button
  • ccx_schedule.js is the main view. It saves, edit, update collection and renders other view

@pdpinch @giocalitri @justinabrahms

screen shot 2016-01-04 at 7 41 22 pm

@openedx-webhooks
Copy link

Thanks for the pull request, @amir-qayyum-khan! I've created OSPR-1161 to keep track of it in JIRA. JIRA is a place for product owners to prioritize feature reviews by the engineering development teams.

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

  • supporting documentation
  • edx-code email 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 still be done via the GitHub pull request interface. As a reminder, our process documentation is here.

@jbarciauskas
Copy link
Contributor

FTR this will need both T&L and a11y review @cahrens @cptvitamin @scottrish

@jbarciauskas
Copy link
Contributor

@cahrens @cptvitamin @scottrish any sense when you will be able to get to this?

@nedbat
Copy link
Contributor

nedbat commented Mar 16, 2016

@cahrens @cptvitamin @scottrish any sense of a timeline?

@cahrens
Copy link

cahrens commented Mar 16, 2016

This has not been prioritized into a sprint yet (so for TNL, unfortunately no).

@cahrens
Copy link

cahrens commented Mar 24, 2016

@amir-qayyum-khan TNL will review this PR within the next 2 weeks (reviewer TBD). Please let us know if you will not be available in the next 2 weeks for questions and feedback.

Note that this PR will additionally require accessibility review.

@jbarciauskas
Copy link
Contributor

Thanks for the reminder @cahrens - @cptvitamin just a ping on the a11y review on this one as well

@amir-qayyum-khan
Copy link
Contributor Author

@cahrens thanks for reminder.
I am available.

@cahrens
Copy link

cahrens commented Mar 31, 2016

I have created a sandbox with this branch of code-- https://ccx.sandbox.edx.org.

@amir-qayyum-khan how do I enable the CCX functionality?

@pdpinch
Copy link
Contributor

pdpinch commented Mar 31, 2016

tl;dr: enable the CCX advanced setting in studio. Add a coach through the instructor dashboard membership panel (can be the same user). As a coach, click on the "CCX Coach" tab.

Configuration instructions are at http://edx.readthedocs.org/projects/edx-installing-configuring-and-running/en/latest/configuration/enable_ccx.html http://edx.readthedocs.org/projects/edx-installing-configuring-and-running/en/latest/configuration/enable_ccx.html (hopefully unnecessary, since CCX is enabled on edx.org http://edx.org/ but I don't know how your sandboxes are built)

User instructions are at http://edx.readthedocs.org/projects/open-edx-building-and-running-a-course/en/latest/set_up_course/custom_courses.html http://edx.readthedocs.org/projects/open-edx-building-and-running-a-course/en/latest/set_up_course/custom_courses.html

There's also a test plan in Confluence, but I don't think you need to go that far: https://openedx.atlassian.net/wiki/display/OPEN/CCX+Test+Plan https://openedx.atlassian.net/wiki/display/OPEN/CCX+Test+Plan

@amir-qayyum-khan amir-qayyum-khan force-pushed the refactor/aq/schedule.js branch 3 times, most recently from 2213f5f to 8f56df0 Compare April 1, 2016 15:19
@amir-qayyum-khan
Copy link
Contributor Author

jenkins run lettuce

@@ -0,0 +1,181 @@
<div class="field">
Copy link

Choose a reason for hiding this comment

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

XSS best practices need to be followed-- there are unescaped strings in here like "chapter.display_name" and "date" (in template above). All strings should be escaped unless they include HTML. If they include HTML, they must be properly wrapped using HTMLUtils methods.

Please read over the new XSS best practices document-- http://edx.readthedocs.org/projects/edx-developer-guide/en/latest/conventions/safe_templates.html

All the underscore files in this PR should be cleaned up.

Copy link

Choose a reason for hiding this comment

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

See #11899-- some of the templates may have been fixed up already. Although it looks like underscore files where not touched.

@amir-qayyum-khan amir-qayyum-khan deleted the refactor/aq/schedule.js branch April 4, 2016 21:32
@amir-qayyum-khan
Copy link
Contributor Author

@cahrens i will complete work on it this week. I will tag you as soon as i complete.

@amir-qayyum-khan amir-qayyum-khan changed the title Refactored schedule tree WIP Refactored schedule tree May 18, 2016
@cahrens
Copy link

cahrens commented Jun 1, 2016

@amir-qayyum-khan Can I get an update on when this will be ready for review? Thanks!

@amir-qayyum-khan
Copy link
Contributor Author

@cahrens Do you know case of this error?

Traceback (most recent call last):
  File "manage.py", line 116, in <module>
    execute_from_command_line([sys.argv[0]] + django_args)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute_from_command_line
    utility.execute()
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 346, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/base.py", line 394, in run_from_argv
    self.execute(*args, **cmd_options)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/core/management/base.py", line 445, in execute
    output = self.handle(*args, **options)
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 168, in handle
    collected = self.collect()
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 114, in collect
    for original_path, processed_path, processed in processor:
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/require/storage.py", line 108, in post_process
    baseUrl = require_settings.REQUIRE_BASE_URL,
  File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/require/storage.py", line 52, in run_optimizer
    raise OptimizationError("Error while running r.js optimizer.")
require.storage.OptimizationError: Error while running r.js optimizer.

@cahrens
Copy link

cahrens commented Jun 2, 2016

It's an error running the RequireJS optimizer. The message doesn't give any details-- you will have to re-examine changes you've made related to JS optimization.

@cahrens
Copy link

cahrens commented Jun 2, 2016

And it looks like it is too late, but I'd like to plead again that you don't squash review feedback commits with the original commit. Please do squash the feedback commits into a single commit (since my last review), but don't squash with the original commit as then I have no way to tell what has change since I last looked at the PR.

@amir-qayyum-khan amir-qayyum-khan force-pushed the refactor/aq/schedule.js branch 2 times, most recently from b4c51c6 to 8b11f3b Compare June 22, 2016 22:13
@amir-qayyum-khan
Copy link
Contributor Author

jenkins run bokchoy
jenkins run a11y

@amir-qayyum-khan
Copy link
Contributor Author

  • Fixed some accessibility issues
  • Fixed syntax issues in build.js
  • Fixed quality issues in js files.

cc @pdpinch

@amir-qayyum-khan
Copy link
Contributor Author

jenkins run quality

@amir-qayyum-khan
Copy link
Contributor Author

jenkins run a11y

@shaunagm
Copy link
Contributor

@amir-qayyum-khan We're going to be closing OSPRs that have been 'waiting for author' for more than three weeks with no activity. If you're not sure why this is in status 'waiting for author' please ask. Please also feel free to reopen this PR if/when you're ready to update it.

@shaunagm shaunagm closed this Sep 20, 2016
@tasawernawaz tasawernawaz deleted the refactor/aq/schedule.js branch December 21, 2020 14:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc.
Projects
None yet