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

Problem Builder - Review for release on edx.org #119

Merged
merged 429 commits into from
Nov 1, 2016
Merged

Conversation

itsjeyd
Copy link
Member

@itsjeyd itsjeyd commented Aug 9, 2016

Desired Deployment Date: 2016-10-21

Main PR for making the latest version of problem-builder available on edx.org.

Sandbox

LMS: http://pr13641.sandbox.opencraft.hosting/
Studio: http://studio-pr13641.sandbox.opencraft.hosting/

Features

Step Builder XBlock

XBlock that replaces and extends assessment mode functionality.

Instead of having Problem Builder support two different modes ("standard" and "assessment"), we now have a dedicated XBlock for the functionality that each mode provides:

  • Problem Builder: "standard" mode
  • Step Builder: "assessment" mode

To ensure backward compatibility with existing Problem Builder instances operating in assessment mode, the code that implements this mode was not removed from the Problem Builder XBlock when Step Builder was first implemented. It is still part of the Problem Builder code base (but will be removed in the future). However, to start the process of deprecating assessment mode, Studio functionality for setting the mode on a Problem Builder block has been removed, which effectively means that newly created instances of Problem Builder do not support assessment mode.

Main features and follow-up changes are listed in the pull requests below.

Implementation (main features)

#62

  • Diff: f839d58
  • Branch: open-craft/mentoring-step-xblock
  • Ticket: OC-910

Introduces MentoringWithExplicitStepsBlock (Step Builder) and MentoringStepBlock (represents a single step in Step Builder), and adds support for editing them in Studio.

#63

  • Diff: e195051
  • Branch: open-craft/step-navigation
  • Ticket: OC-912

(Follows up on #62)

Adds step navigation and submission functionality to Step Builder.

#65

(Follows up on #63)

Introduces ReviewStep block for Step Builder.

A Step Builder instance only allows a single ReviewStep block. The ReviewStep block enables assessment functionality for Step Builder:

  • Shows grade as a percentage
  • Shows count of correct/partially correct/incorrect answers
  • Allows for extended feedback:
  • Shows which questions were answered correctly/partially correctly/incorrectly, and allows learners to jump to step that a question belongs to (enabling learners to review answers to individual questions)
  • Shows customizable "on-assessment-review" assessment message (or generic "You have used all attempts" message)
  • Shows "Try again" button if there are still some unused attempts available
  • Shows number of attempts remaining (if number of attempts is limited)
  • Shows review messages ("tips") for questions that were not answered correctly

#66

  • Diff: fa5d5e5
  • Branch: open-craft/review-step-messages
  • Ticket: OC-913

(Follows up on #65)

Refines support for customizable assessment messages for Review Step blocks.

  • Complete - shown if all answers correct (and some attempts remaining)
  • Incomplete - shown if one or more answers are incorrect or partially correct (and some attempts remaining)
  • Review - shown when user ran out of attempts

Takes first step towards deprecating assessment functionality of Problem Builder by removing the ability to change the mode of Problem Builder blocks to assessment mode.

Includes a couple of additional fixes:

  • Sequence navigation tooltips do not display Step Builder descendants anymore.
  • Step Builder sends a "grade" event when user completes an attempt (submits the last step).

#74

  • Diff: c6e6060
  • Branch: open-craft/custom_next_text
  • Ticket: OC-997

Introduces customizable label for button that takes learner to the next step in Step Builder.

#76

Adds support for steps that don't contain any questions to Step Builder

#73

Adds support for video blocks and thumbnails to Step Builder

#84

  • Diff: 127c50d
  • Branch: open-craft/instruction-message
  • Ticket: OC-1019

Adds support for displaying step-level feedback to Step Builder. Step-level feedback is displayed in a modal window.

#89

  • Diff: ff271b2
  • Branch: open-craft/step-builder-reviews-refactor
  • Ticket: OC-998

Simplifies Review Step code; splits different parts of review screen into XBlocks that are more flexible and re-orderable; makes the Step Builder block preview/work in Studio as students would see it in the LMS

#93

  • Diff: 1db52e8
  • Branch: open-craft/explain-review-links
  • Ticket: OC-1225

Adds message explaining how to use review links to the "Score Summary" block that can be added to the "Review Step" of a Step Builder exercise

Implementation (follow-up)

#68 (fixes)

Follows up on #65 and #66.

  • Makes sure Review Step block can be removed and re-added to Step Builder, and different types of message children can be removed and re-added to Review Step block.
  • Disables navigation between units while completing Step Builder blocks (Apros only)

#69 (fix)

  • Diff: 5c07c47
  • Branch: open-craft/ext-feedback-links-polish-oc-986
  • Ticket: OC-986

(Follows up on #65)

Fixes appearance of links for jumping to individual steps from Review Step block.

#79 (fix)

  • Diff: 1326a0c
  • Branch: open-craft/fix-review-messages
  • Ticket: OC-988

Updates requirements to pull in fix from this PR: openedx-unsupported/xblock-utils#29

#81

Make behavior of MCQs consistent with behavior of MRQs regarding feedback (display question-level feedback first; switch to per-choice feedback when clicking feedback icon next to choice)

#85 (fixes)

  • Diff: 9f96727
  • Branch: open-craft/qa-bug-fixes-oc-998
  • Ticket: OC-998

Fixes a number of issues from client QA for Step Builder

  • Makes sure Step Builder grades show up in progress reports
  • Makes sure selected choices for MCQs and MRQs are shown/hidden consistently
  • Adds support for images in question-level feedback for MCQs/MRQs
  • Disables "Submit" button right away when clicked (instead of leaving it enabled until results come back)

#88 (fix)

Fixes JS error causing Step Builder to freeze/crash if it doesn't contain a Review Step block

#90 (fixes)

Fixes additional issues from client QA (for Step Builder and Problem Builder):

  • Makes sure child blocks within Step Builder are reorderable in Studio
  • Makes sure Mentoring v2 blocks in legacy assessment mode don't break when tested in Studio
  • Fixes layout issues in MCKIN-3626

Adds support for moving messages below the "Try Again" button in Review Step blocks.

#91

  • Diff: cc0c234
  • Branch: open-craft/competing-evidence-qa
  • Ticket: OC-1067

Implements additional fixes and improvements from client QA for Step Builder

  • Scroll to top when navigating to next step (or loading page)
  • Remove ticks and tick labels from plot axes
  • Fix video previews (video was too small on initial load)
  • Add footer to Problem Builder and Step Builder (LMS theme)

#99 (fix)

Fixes performance issue affecting Step Builder blocks with many steps (makes sure click on "Next" button does not add additional rendering step)

#111 (fix)

  • Diff: 8b4fd30
  • Branch: open-craft/fix-inconsistent-feedback
  • Ticket: OC-1492

Makes sure choice-level feedback for MCQs behaves consistently when returning to MCQ in Step Builder (feedback should always be visible)

#115 (fix)

  • Diff: 313837a
  • Branch: open-craft/jbzdak/oc-1441/detach-html-elements
  • Ticket: OC-1441

Makes sure video playback stops when navigating to next step in Step Builder

## Plot XBlock

This new feature was added using the pull requests below.

#77

Introduces new Plot XBlock that can be used to visualize answers to pairs of rating questions in Step Builder

#82

(Follows up on #77)

Introduces new Plot Overlay XBlock which allows course authors to define additional data points for learners to compare their own results to when viewing a Plot.

#86

(Follows up on #77 and #78)

  • Makes sure that plots can access data from slider blocks.
  • Makes the process for obtaining references to rating and slider blocks consistent in Studio.

#87 (fix)

  • Diff: 38fc29e
  • Branch: open-craft/plot-tooltips-everywhere
  • Ticket: OC-1020

Makes sure tooltips for plot points work across different browsers

#91

  • Diff: cc0c234
  • Branch: open-craft/competing-evidence-qa
  • Ticket: OC-1067

Implements additional fixes and improvements from client QA for Step Builder

  • Scroll to top when navigating to next step (or loading page)
  • Remove ticks and tick labels from plot axes
  • Fix video previews (video was too small on initial load)
  • Add footer to Problem Builder and Step Builder (LMS theme)
## Ranged Value Slider XBlock

This feature was implemented using the pull requests below.

#78

Introduces new Ranged Value Slider XBlock:

This block is a variation of the Rating question type. It functions as a (horizontal) slider that allows learners to select arbitrary values from a predefined range (0-100).

Endpoints of the range are customizable, i.e., course authors can assign arbitrary labels to the highest and lowest possible values.

Both Problem Builder and Step Builder support this XBlock.

#86

(Follows up on #77 and #78)

  • Makes sure that plots can access data from slider blocks.
  • Makes the process for obtaining references to rating and slider blocks consistent in Studio.
## Question-level and choice-level feedback

These features already existed, but their behavior has been modified and extended in the following pull requests.

#81

Make behavior of MCQs consistent with behavior of MRQs regarding feedback (display question-level feedback first; switch to per-choice feedback when clicking feedback icon next to choice)

#102

  • Diff: d754b29
  • Branch: open-craft/hide-previous-answer
  • Ticket: OC-1386

Introduces instance-wide option to hide previous answers (and feedback) for MCQs in Problem Builder.

When this option is enabled, students still receive per-question feedback after providing answers to MCQs and submitting the containing block, but that feedback is not visible when they return to the block, and all choices for a given MCQ are unchecked.

#101

  • Diff: 91f77e2
  • Branch: open-craft/jbzdak/show-popup-always-on-mcq
  • Ticket: OC-1387

Changes behavior of MCQs to show choice-level tips right away when clicking "Submit" in Problem Builder (instead of waiting for the user to click the icon displayed next to a choice)

#104

Introduces an instance-wide option to hide global feedback and results (correct/incorrect) icons for Long Answer blocks in Problem Builder.

When this option is enabled (and there are some attempts left), students still receive global and per-question feedback after providing answers and submitting the containing block, but that feedback is not visible when they return to the block.

#105 (fix)

Restores functionality for showing choice-level feedback on click for MCQs in Problem Builder

#110 (fixes)

Follows up on #104 and #102

  • Makes sure "Submit" button is enabled when returning to unit containing Problem Builder block with Long Answer component (regardless of whether Problem Builder block is configured to hide feedback)
  • Makes MRQ behavior more consistent with the way MCQs behave when pb_mcq_hide_previous_answer option is enabled

#116 (fix)

Follows up on #110

Makes sure question-level feedback for MRQs is hidden on return if Problem Builder instance is configured to hide previous answers.

## Assessment mode improvements

Assessment mode was enhanced with the following pull requests.

#60

  • Diff: 947c75f
  • Branch: open-craft/extended-feedback-question-message-fix
  • Ticket: OC-887

Adds ability to bring question-level feedback message back by clicking checkmark icon (assessment mode)

#61

  • Diff: 6af171b
  • Branch: open-craft/assessment-targeted-review
  • Ticket: OC-888

Allow content authors to set an optional "review message" on each MCQ/MRQ/Rating question.

The review messages are shown in assessment mode when the student is reviewing their grade before being allowed to try again. This means that the review screen now includes a list of topics to review, based on which questions the student got wrong.

If the student got all the questions right or has no attempts remaining, the new review section is not shown.

#64 (fix)

  • Diff: be0c46a
  • Branch: open-craft/feedback-jump-to-id
  • Ticket: OC-888

Follows up on #61.

Makes sure "jump_to_id" URLs in (review) messages are rewritten to yield working links

#67 (fix)

  • Diff: 3e8040b
  • Branch: open-craft/fix-review-tips
  • Ticket: OC-969

Fixes regression where last question of a mentoring block in assessment mode can't be submitted if:

  • Question is an MCQ/MRQ
  • Mentoring block has no "Assessment Review" message component
  • Answer to submit is incorrect

#90 (fixes)

Fixes additional issues from client QA (for Step Builder and Problem Builder):

  • Makes sure child blocks within Step Builder are reorderable in Studio
  • Makes sure Mentoring v2 blocks in legacy assessment mode don't break when tested in Studio
  • Fixes layout issues in MCKIN-3626

Adds support for moving messages below the "Try Again" button in Review Step blocks.

#122 (fix)

  • Diff: 88450ee
  • Branch: open-craft/jill/message-assessment-review
  • Ticket: OC-1852

Fixes issues related to the Message (Assessment Review) and Message (Review) components:

  • Removes the ability for Studio users to add Message (Assessment Review) components to Problem Builder units, unless the legacy "assessment mode" is enabled.
  • Studio users may still add Message (Review) components to Step Builder Questionnaire components, and to legacy "assessment mode" Problem Builder Questionnaire components, but not to new Problem Builder units.
  • Fixes the style issues these buttons to accommodate varied text lengths.
## Dashboard XBlock improvements

The existing Self-Assessment Summary Dashboard XBlock was enhanced with the following pull requests.

#71 (fix)

  • Diff: 1cb40ca
  • Branch: open-craft/fix-sub_api-load-issue-oc-1003
  • Ticket: OC-1003

Fixes issue keeping Dashboard XBlock from loading (circular dependency)

#107 (fix)

  • Diff: e01af34
  • Branch: open-craft/omar/report-download
  • Ticket: OC-1456

Fixes report image download for Dashboard XBlock

Changes already in edx-release (via #106)

#109

  • Diff: 082edaa
  • Branch: open-craft/omar/dashboard-image
  • Ticket: OC-1456

Follows up on #107

Updates image link in tests

#108

  • Diff: 1c49b87
  • Branch: open-craft/omar/dashboard-docs
  • Ticket: OC-1456

Adds instructions for enabling Dashboard XBlock in Studio

## Instructor Tool XBlock improvements

The existing Instructor Tool XBlock was enhanced with the following pull requests.

#47

  • Diff: 7da902e
  • Branch: open-craft/dropdown-pagination
  • Ticket: OC-783

Follows up on #45.

Instructor Tool:

  • Dropdown menu for constraining the set of exported answers to a specific block in the course outline (previous version of instructor tool required entering ID of block for which to export answers manually)
  • Moving pagination logic to the server to avoid transferring a potentially large number of results at once

#50

  • Diff: a9f7743
  • Branch: open-craft/instructor-tool-unit-tests
  • Ticket: OC-856

Follows up on #47. Extends unit test coverage for the Instructor Tool block.

#57

  • Diff: cd2304e
  • Branch: open-craft/instructor-tool-multiple-usernames
  • Ticket: OC-881

Extends existing functionality of the instructor tool by allowing users to enter multiple usernames to search for answers from multiple users simultaneously.

## Table XBlock improvements

The existing Table XBlock was enhanced with the following pull requests.

#49

Follow-up to #43, which introduced functionality for

  • sharing Table blocks with other students
  • downloading data from Table blocks

Implements various UI fixes related to functionality introduced in the previous PR.

#59 (fix)

  • Diff: 9af13c3
  • Branch: open-craft/fix-invalid-links-in-tables
  • Ticket: OC-899

Makes sure links to course units that are part of table column headers are expanded correctly inside the LMS.

## Dogwood compatibility

Dogwood compatibility was improved with the following pull requests, including a version bump to 2.5.0.

#94

  • Diff: cecdbaf
  • Branch: open-craft/django-migrations (Tag: v2.0.0)
  • Ticket: OC-1282

Adds Django 1.8 migrations to Problem Builder.

This PR was opened against the edx-release branch, and the changes it introduces were brought into master via #95 (along with additional migrations for models not present in the edx-release branch).

#95

Adds Django 1.8 migrations to Problem Builder.

Extended version of #94 (adds additional migrations; updates xblock-utils version in requirements.txt)

#98

  • Diff: 7dca877
  • Branch: open-craft/bump_master_version (Tag: v2.5.0)
  • Ticket: OC-1282

Version bump to v2.5.0 for master

## Mentoring v1 Problem Builder migration (fixes)

These fixes were applied to the Problem Builder Mentoring feature.

#48 (fix)

Fixes JS bug when HTML block is followed by an answer block. Bug was related to Mentoring v1 Problem Builder migration.

#51 (fix)

  • Diff: 21fc19e
  • Branch: open-craft/fix-hgse-upgrade-ii
  • Ticket: OC-805

Adds option for specifying that question titles should not be shown, to work around the fact that they were getting added to questions that didn't have them before (because they were created using a version of xblock-mentoring that didn't offer question titles as an option). Bug was related to Mentoring v1 Problem Builder migration.

#52 (fixes)

Implements fixes for two more migration-related issues:

  • Ensure appropriate content for LMS unit selector tooltips
  • Ensure that answers and answer recaps referencing an answer in the same subsection are kept up-to-date
## Miscellaneous fixes and improvements

The following pull requests describe other miscellaneous fixes and improvements.

#53 (fix)

  • Diff: fa85907
  • Branch: open-craft/hgse-lms-theme-fix
  • Ticket: OC-839

Fixes Problem Builder's LMS theme on HGSE instance

#54 (fix)

  • Diff: 859df41
  • Branch: open-craft/fix-attribute-error-in-lms
  • Ticket: OC-844

Handle situations in which self.runtime.get_block returns None gracefully (display error message instead of replacing whole subsection with 500 error)

#58

  • Diff: d500a62
  • Branch: open-craft/assessment-cleanup
  • Ticket: OC-538

Clean up: Have MentoringBlock.get_message return message itself (not a template of it).

#80 (fix)

Makes sure Problem Builder blocks appear on a student's "Progress" page, even if a learner has not yet submitted a grade.

#92

  • Diff: 67d7563
  • Branch: open-craft/headandshoulders
  • Ticket: OC-807

Fixes for flaky tests

#103

  • Diff: ce3a087
  • Branch: open-craft/ensure-default-theme
  • Ticket: OC-1386

Follows up on #102

Ensures default theme is used by Problem Builder and Step Builder if theme has not been customized

#120 (fix)

  • Diff: 1ba7126
  • Branch: update-xblock-utils
  • Ticket: OC-1819 (follow-up PR)

New version includes fixes from openedx-unsupported/xblock-utils#38 and openedx-unsupported/xblock-utils#39.

Also fixes an issue affecting dependency installation for CircleCI builds for problem-builder. See the commit message of 51277a3 for details.

#121 (fix)

  • Diff: efe6f23
  • Branch: open-craft/haikuginger/nested-xblock-refactor
  • Ticket: OC-1853

Refactors Problem Builder (MentoringBlock) to subclass
StudioContainerWithNestedXBlocksMixin from xblock-utils, which is now the
standardized way of dealing with nested XBlocks.

Allows children of Problem Builder blocks to be reordered in Studio.

#124 (fix)

In some cases it is possible that the anonymous student_id of a submission can't be reversed to the original user. In this case, the function user_by_anonymous_id() returns None, resulting in a crash when building reports.

This change fixes the crash by returning student_id instead of the actual user name in case it cannot be reconstructed.

#125 (fix)

Improves the accessibility of the Problem Builder, Step Builder, and their related XBlocks.

  • Moves the choice-label elements inside of their <label> tags.
  • Wraps long-answer and slider question text in a <label> tag.
  • Uses <th> instead of <td> elements inside <thead>, for the instructor tool and plot preview tables.
  • Links the feedback, and choice-tip text with the choice labels via aria-describedby.
  • Wraps the choice-result feedback icons inside the <label> elements, to match CAPA a11y design.
  • Adds translated, aria-labels for the "correct answer/choice" checkmark and "incorrect answer/choice" X.
  • Adds the 'aria-live="polite"' attribute to the divs whose content changes dynamically.
  • Removes block-level children from <fieldset><legend>
# Issues

The following known issues will be fixed as part of subsequent PRs. However, if any of them are showstoppers, we may instead decide to remove the affected feature(s) from this PR.

  • i18n
    • Need to update translation files (repo currently uses django.po/django.mo instead of text.po/text.mo)
    • Some strings not marked for translation
  • a11y
    • Need to investigate whether there are any a11y issues concerning plots
  • Misc issues
    • Should remove "old mongo" workarounds
    • Copyright years in source files need updating
    • Copyright years in copyright footer need updating

Low priority issues

These issues have been identified and deemed "low priority", and may be fixed in subsequent PRs.

  • Video playback continues when navigating to next step in the LMS
  • "Min. Allowed Characters" for Long Answer blocks: Defaults to 0, but Python and JS code seems to enforce a minimum of 1 character
  • Studio previews of Rating questions don't include footer with "ID for referencing this rating block" when Rating question is first added (need to navigate away from Mentoring Step and come back to see it); this is not the case for Slider blocks

The full list of merged PRs is given below.

  • 432c1b9 Merge pull request #125 from jill/a11y-fixes
  • 484131c Merge pull request #124 from smarnach/anonymous-id
  • efe6f23 Merge pull request #121 from open-craft/haikuginger/nested-xblock-refactor
  • 88450ee Merge pull request #122 from open-craft/jill/message-assessment-review
  • d6ffe52 Merge pull request #123 from open-craft/merge-edx-release
  • 1ba7126 Merge pull request #120 from open-craft/update-xblock-utils
  • 527671f Merge pull request #116 from open-craft/hide-mrq-feedback
  • [313837a](https://github.com/open-cr
    aft/problem-builder/pull/119/commits/313837a) Merge pull request #115 from open-craft/jbzdak/oc-1441/detach-html-elements
  • ff61a46 Merge pull request #110 from open-craft/freetext-submit
  • 8b4fd30 Merge pull request #111 from open-craft/fix-inconsistent-feedback
  • 1c49b87 Merge pull request #108 from open-craft/omar/dashboard-docs
  • 082edaa Merge pull request #109 from open-craft/omar/dashboard-image
  • e01af34 Merge pull request #107 from open-craft/omar/report-download
  • 594f1f2 Merge pull request #105 from open-craft/fix-choice-tips
  • 3a9ded9 Merge pull request #104 from open-craft/hide-feedback
  • 91f77e2 Merge pull request #101 from open-craft/jbzdak/show-popup-always-on-mcq
  • ce3a087 Merge pull request #103 from open-craft/ensure-default-theme
  • d754b29 Merge pull request #102 from open-craft/hide-previous-answer
  • f16b9ec Merge pull request #99 from open-craft/performance_fix
  • 7dca877 Merge pull request #98 from open-craft/bump_master_version (Tag: v2.5.0)
  • b3d2449 Merge pull request #95 from open-craft/django-migrations
  • cecdbaf Merge pull request #94 from open-craft/django-migrations (Tag: v2.0.0)
  • 1db52e8 Merge pull request #93 from open-craft/explain-review-links
  • 67d7563 Merge pull request #92 from open-craft/headandshoulders
  • cc0c234 Merge pull request #91 from open-craft/competing-evidence-qa
  • 37d5d42 Merge pull request #90 from open-craft/qa-fixes
  • ff271b2 Merge pull request #89 from open-craft/step-builder-reviews-refactor
  • 5b75184 Merge pull request #88 from open-craft/fix-no-review-step
  • 38fc29e Merge pull request #87 from open-craft/plot-tooltips-everywhere
  • 9f96727 Merge pull request #85 from open-craft/qa-bug-fixes-oc-998
  • 127c50d Merge pull request #84 from open-craft/instruction-message
  • dd14454 Merge pull request #81 from open-craft/mcq_messages
  • 7cd071d Merge pull request #86 from open-craft/scale-plot-interop
  • addea00 Merge pull request #82 from open-craft/plot-overlays
  • 90b2ecd Merge pull request #80 from open-craft/pb-max-score-fix
  • f236deb Merge pull request #78 from open-craft/slider-block
  • 015fe14 Merge pull request #77 from open-craft/sb-plot-block
  • 8d8a8f9 Merge pull request #73 from open-craft/nested-steps
  • 2105c1b Merge pull request #76 from open-craft/empty_step
  • 1326a0c Merge pull request #79 from open-craft/fix-review-messages
  • c6e6060 Merge pull request #74 from open-craft/custom_next_text
  • 1cb40ca Merge pull request #71 from open-craft/fix-sub_api-load-issue-oc-1003
  • 5c07c47 Merge pull request #69 from open-craft/ext-feedback-links-polish-oc-986
  • 8e36431 Merge pull request #68 from open-craft/assessments-qa
  • 3e8040b Merge pull request #67 from open-craft/fix-review-tips
  • fa5d5e5 Merge pull request #66 from open-craft/review-step-messages
  • dde3c4c Merge pull request #65 from open-craft/review-step
  • be0c46a Merge pull request #64 from open-craft/feedback-jump-to-id
  • e195051 Merge pull request #63 from open-craft/step-navigation
  • f839d58 Merge pull request #62 from open-craft/mentoring-step-xblock
  • 6af171b Merge pull request #61 from open-craft/assessment-targeted-review
  • 947c75f Merge pull request #60 from open-craft/extended-feedback-question-message-fix
  • 9af13c3 Merge pull request #59 from open-craft/fix-invalid-links-in-tables
  • d500a62 Merge pull request #58 from open-craft/assessment-cleanup
  • cd2304e Merge pull request #57 from open-craft/instructor-tool-multiple-usernames
  • a9f7743 Merge pull request #50 from open-craft/instructor-tool-unit-tests
  • 859df41 Merge pull request #54 from open-craft/fix-attribute-error-in-lms
  • fa85907 Merge pull request #53 from open-craft/hgse-lms-theme-fix
  • e87453b Merge pull request #52 from open-craft/hgse-fixes-iii
  • 21fc19e Merge pull request #51 from open-craft/fix-hgse-upgrade-ii
  • 80f90e3 Merge pull request #48 from open-craft/hgse-bugs-ii
  • 1da02fe Merge pull request #49 from open-craft/download-table
  • 7da902e Merge pull request #47 from open-craft/dropdown-pagination

bradenmacdonald and others added 30 commits July 27, 2015 16:15
Add an extra selector to fix CSS rule ambiguity
previous PR (#47).

The new tests check if:

- preferred block attrs are used when building block tree for current course
- block tree excludes pb-choice blocks
- blocks are correctly marked as (in)eligible
- new-style keys are handled correctly
- student_view passes calls rendering method with correct template args
- author_view and studio_view show appropriate messages
…ames

Instructor Tool: Support searching for answers from multiple users
Simplify get_message: Return message instead of template
Fix: Translate links in table column headers
…sage-fix

Making question checkmark display question-level feedback + tests
New version of mentoring block that supports explicit steps
…buttons in Problem Builder only if (deprecated) assessment mode is enabled.

* Always shows the "on-assessment-review-question" button in Step Builder Questionnaire problems.
* Fixes button styles to prevent long button names from overflowing the buttons.
Remove "Message (Assessment Review)" from Problem Builder in Studio
@pomegranited pomegranited changed the title WIP: Problem Builder - Review for release on edx.org Problem Builder - Review for release on edx.org Oct 4, 2016
@gsong
Copy link

gsong commented Oct 6, 2016

@pomegranited Are all the commits/changed files in the PR truly all for this specific PR, or have some been merged in from elsewhere? If so, can you rebase as to make the review process easier?

@pomegranited
Copy link
Member

@gsong Yes, unfortunately, this truly is the commits for this PR. edX runs off the edx-release branch, and there's been a significant number of features added to master.

@antoviaque can you confirm?

@antoviaque
Copy link
Member

@gsong @pomegranited Yes - if you look at the requirements on edx-platform, you'll see that it's using v2.0.4 https://github.com/edx/edx-platform/blob/af841336c7e39d634c238cd8a11c5a3a661aa9e2/requirements/edx/edx-private.txt#L11 - which was based on master, during the last update last year: v2.0.4...master

Note that the main requirement for Davidson is to have the Instructor Tool XBlock, which wasn't in v2.0.4; if some of the other changes are too big, we can always look at deactivating some of the new blocks this is adding. We will need to keep the timeline and time budget small, so don't hesitate.

…their related XBlocks.

* Moves the choice-label <input> elements inside of their <label> tags.
* Wraps long-answer and slider question text in a <label> tag.
* Uses <th> instead of <td> elements inside <thead>, for the instructor tool and plot preview tables.
* Links the feedback, and choice-tip text with the choice labels via aria-describedby.
* Wraps the choice-result feedback icons inside the label elements, to match CAPA a11y design.
* Adds translated, aria-visible labels for the "correct answer/choice" checkmark and "incorrect answer/choice" X.
* Adds the 'aria-live="polite"' attribute to the divs whose content changes dynamically.
* Removes block-level children from <legend>, placing the h3.question-title outside the <fieldset>.
* Fixes tests broken by above commits
* Adds tests for new aria-label attributes..
Copy link

@dianakhuang dianakhuang left a comment

Choose a reason for hiding this comment

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

Overall, I think most of this looks reasonable, but the instructor tool raised some performance and security concerns.

Also, I called out a few of the smaller issues I noticed in the templates.

</select>
{% endif %}
<button class="mentoring-share-button">
<i class="fa fa-share-alt"></i> Share

Choose a reason for hiding this comment

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

This string isn't being translated.

Copy link
Member

Choose a reason for hiding this comment

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

Oo.. thank you for catching all of these! Fixed with 8d096b6.

<div class="share-errors"></div>
</div>
<div class="share-action-buttons">
<button class="do-share-button">Share</button>

Choose a reason for hiding this comment

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

This also isn't being translated.

Copy link
Member

Choose a reason for hiding this comment

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

Fixed with 8d096b6.

</p>
<p>
You can change the user you're currently displaying using the drop-down selector above.
{% endblocktrans %}

Choose a reason for hiding this comment

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

We generally avoid including HTML in our translation strings. I think it makes sense for these two paragraphs to be different blocktrans blocks.

Copy link
Member

Choose a reason for hiding this comment

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

Ah, good point, thank you!. Fixed with 8d096b6.

{% if course_name %}{% trans "Course" %}: {{course_name}}<br>{% endif %}
{% trans "Date" %}: {% now "DATE_FORMAT" %}<br>
</div>
REPORT_GOES_HERE

Choose a reason for hiding this comment

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

I don't think this should be getting translated, but I'm not sure why this is here? Wouldn't it make sense to put in some more user-friendly placeholder text here?

Copy link
Member

Choose a reason for hiding this comment

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

This string is replaced by review_blocks.js with the table that's already been rendered to the page, and then delivered as an encoded dataURI so that students can download the report.

I agree it isn't the prettiest mechanism, but the string itself never gets seen.

</div>
</div>

<div class="review-link"><a href="#">Review final grade</a></div>

Choose a reason for hiding this comment

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

This string hasn't been translated.

Copy link
Member

Choose a reason for hiding this comment

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

Fixed with 8d096b6.

<input type="button" class="input-main" value="Submit" disabled="disabled" />
<input type="button" class="input-next" value="Next Step" disabled="disabled" />
<input type="button" class="input-review" value="Review grade" disabled="disabled" />
<input type="button" class="input-try-again" value="Try again" disabled="disabled" />

Choose a reason for hiding this comment

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

Several of these buttons haven't been translated.

Copy link
Member

Choose a reason for hiding this comment

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

Fixed with 8d096b6.

</div>
<div class="review-link"><a href="#">Review final grade</a></div>

Choose a reason for hiding this comment

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

This string hasn't been translated.

Copy link
Member

Choose a reason for hiding this comment

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

Fixed with 8d096b6.

<p class="review-tips-intro">{% trans "You might consider reviewing the following items before your next assessment attempt:" %}</p>
<ul class="review-tips-list">
{% for tip in tips %}
<li>{{tip|safe}}</li>

Choose a reason for hiding this comment

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

There's also a display of tips above that aren't marking the tips as safe. I would fall on the side of removing the safe filter here as well.

Copy link
Member

Choose a reason for hiding this comment

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

Because our tips editor is the TinyMCE WYSIWYG editor, all our tips are likely to contain some HTML, so we need to keep this |safe filter on to prevent the HTML from being escaped.

The tips above in mentoring_assessment_templates.html are also implicitly displayed without html escaping, as they're using Javascript templates to display the tip text.

You can see an example of editing a tip in the Studio Sandbox course, and the results in the LMS under:

def _build_course_tree(self):
"""
Return flat tree of blocks belonging to this block's parent course.
"""

Choose a reason for hiding this comment

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

There are some concerns about the performance of this code, because reconstructing the course tree is expensive. It won't hold up the merging of this PR, but it's something to think about if/when this block gains greater adoption.

One thing to consider is using the course blocks API in the future for things like this.

Copy link
Member

Choose a reason for hiding this comment

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

Definitely something to consider, especially if we could hit the Course Blocks API from the client side, so that authentication was already taken care of.

Copy link

Choose a reason for hiding this comment

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

I'd like to echo @dianakhuang's concerns on this. In addition to the performance implications, there's a real chance that future API changes could cause this sort of "climb to the root and crawl the whole course tree" behavior to break, because we can't realistically support it in a performant way. The Course Blocks API will be much faster for large courses, and is an API we're supporting for these kinds of broad cross-course content queries.

I understand that the contents of this PR are time-sensitive, and the short term risk of performance issues are low, so I'm not going to block this PR over this issue. However, I would like some plan for followup work to remove the course crawling behavior. That might mean hitting the endpoint on the client side, exposing Course Blocks API as a runtime service to XBlocks, or reworking the feature so that the course crawl is no longer necessary.

Can we please get that work scheduled?

Copy link
Member

Choose a reason for hiding this comment

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

Absolutely, @ormsbee, thank you for raising this! I'll create a ticket and keep you posted.

Copy link
Member

Choose a reason for hiding this comment

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

@ormsbee I'm working on this issue now, by hitting the Course Blocks API from the client, and it's looking good. @bradenmacdonald says this is something he's wanted to clean up for a while!

I should have something ready for upstream review early next week.

Copy link

@ormsbee ormsbee Nov 4, 2016

Choose a reason for hiding this comment

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

Awesome, thank you so much!

BTW, we just had a discussion yesterday where it came up that T&L is planning to add the course blocks API as an XBlock runtime service to help power pluggable navigation efforts:

https://openedx.atlassian.net/wiki/display/TNL/UIBlocks+for+Course+Outline

That being said, I think your approach with hitting Course Blocks API from the client-side is the right one in this case, since it won't adversely affect the XBlock server side rendering for large sequences. I just didn't want you folks to be surprised when the course blocks runtime service pops up.

Take care!

block_types = data.get('block_types', None)
usernames = data.get('usernames', None)
root_block_id = data.get('root_block_id', None)
match_string = data.get('match_string', None)

Choose a reason for hiding this comment

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

Per @ormsbee, there's a security concern here in that there's the possibility that a staff user could craft a request that gets back the answers for any student in any course. All the CCX coaches now have staff access so we have to be especially careful about this sort of thing.

Copy link
Member

Choose a reason for hiding this comment

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

@dianakhuang CC @ormsbee

That's a valid concern and good to be aware of. I believe this code is safe, but please let me know if my assessment is incorrect?

The blocks returned are fetched via modulestore.get_items(), using the modulestore identified by the current runtime's course_id. See the call to tasks.export_data(), and the export_data task itself.

@pomegranited
Copy link
Member

Thank you for your review, @dianakhuang! I've fixed the missing translations, and have addressed your other concerns inline. Please let me know if my responses are insufficient, or if there's anything else that needs fixing before this can be merged?

I've also updated the sandbox to use the latest changeset.

@dianakhuang
Copy link

It looks good! Thanks for the changes and the responses. 👍

@pomegranited
Copy link
Member

Thanks, @dianakhuang!

@gsong Do I need any other approvals before merging this? Thank you!

@gsong
Copy link

gsong commented Nov 1, 2016

@pomegranited Good to go!

@pomegranited
Copy link
Member

Thank you, @dianakhuang and @gsong ! Merging now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.