Skip to content

Presentation updates - #16

Merged
e-kolpakov merged 1 commit into
edx-releasefrom
presentation-updates
Apr 24, 2015
Merged

Presentation updates#16
e-kolpakov merged 1 commit into
edx-releasefrom
presentation-updates

Conversation

@e-kolpakov

Copy link
Copy Markdown
Contributor

JIRA Ticket: https://openedx.atlassian.net/browse/OSPR-543
Details: See JIRA ticket
Sandbox: LMS, CMS
Merge deadline: Friday 24th (in time for upcoming release)

Testing instructions:

  1. Set up a couple of mentoring XBlocks
    2, Set up Dashboard block to draw data from those blocks
  2. Set custom value for "Label for average value"
  3. Set "Display numeric values" to False
  4. Set some "Questions to be hidden" (see help string). Note that only questions are counted toward question index, e.g. if Mentoring contains freeform answer and MCQ, MCQ index would be 1, not 2.
  5. Configure visual representation according to help string.
  6. Publish
  7. Go to LMS, provide answers for mentoring blocks
  8. Navigate to dashboard block

Observe the following:

  • Visual progress image is horizontally centered.
  • Average values have custom label specified at step 3
  • Numeric values are not displayed, only color codes are available
  • Questions configured to be excluded are excluded and not participate in average calculations.

Comment thread problem_builder/dashboard.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.

You ought to add in some validation here, in case someone puts in data in an unreadable format (for example swaps [] for the { } or something).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

eg maybe,

try:
    hide_questions = self.exclude_questions.get(mentoring_block.url_name, [])
except Exception:
    # log exception & what self.exclude_questions is

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.

+1

@sarina

sarina commented Apr 22, 2015

Copy link
Copy Markdown

I see you have two travis builds running on this repo (you have both the push job and the pr job enabled). You can pretty easily fix this:

We noticed within the last couple of days that some Travis-run repos are starting two jobs for a pull request. (One job labeled "continuous-integration/travis-ci/pr" and another labeled "continuous-integration/travis-ci/push").

If this is happening to you, you will need the following stanza in your .travis.yml:

branches:
    only:
      - master

Example fix here

@sarina

sarina commented Apr 22, 2015

Copy link
Copy Markdown

@e-kolpakov this seems reasonable. Do you have a sandbox where I can look at this?

@bradenmacdonald

Copy link
Copy Markdown
Member

@sarina We are actually deliberately running two Travis builds on this repo. One build is just for this branch (the push build), and one tests the result of the merge (the pr build). In addition, we found that the "fix" you mention above seems to sometimes prevent builds when PRs are opened against non-master branches.

Edit: another advantage of leaving the "push" build enabled for other branches is that you can get build results before you open a PR, and then when you do open the PR, it will show any intermediate commit builds that it ran during development.

@sarina

sarina commented Apr 22, 2015

Copy link
Copy Markdown

@bradenmacdonald ok, as long as you're fine with it. It was annoying on my repos, but I'm not doing lots of fancy stuff and didn't want to annoy Travis.

Comment thread problem_builder/dashboard.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.

Put a period and space after the ) here. It is currently appearing as "has number 1)Examples: "

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.

Also, I'd suggest you rephrase: "Optional rules to exclude specific questions both from displaying in dashboard and from the calculated average. Rules must start with the url_name of a mentoring block, followed by list of question numbers to exclude (the first question being number 1). Must be in JSON format. Examples: ..."

@bradenmacdonald

Copy link
Copy Markdown
Member

@e-kolpakov I forgot to mention this earlier, but the current way that one sets "Questions to be hidden" using JSON is not very user-friendly.

If you have the time and are feeling ambitious: you could modify this XBlock so that its author_view is almost the same as the normal student_view but author_view includes a [x] Hide checkbox next to each question row. You could also make the "Average" row labels into text inputs in the author_view. The only tricky thing is you need to use new JavaScript to call a handler method whenever it wants to save changes. I'm not sure if that approach goes against Studio UX design goals, but it sure would be easier to use! (I've been wanting to do something similar for choices in Problem Builder, but haven't had the chance yet)

@e-kolpakov

Copy link
Copy Markdown
Contributor Author

@bradenmacdonald Making "Questions to be hidden" is a good suggestion, but this task is due tomorrow and I'm not feeling ambitious :) So please add this to backlog as an improvement.

@e-kolpakov

Copy link
Copy Markdown
Contributor Author

@sarina sandbox: not yet, I'll spin it up when I have time (probably in a matter of one hour from now)

UPD: sandbox provisioned, link added to PR description

@e-kolpakov

Copy link
Copy Markdown
Contributor Author

@sarina just a reminder, it would be great if this could be merged today, in time for upcoming release.

@sarina

sarina commented Apr 24, 2015

Copy link
Copy Markdown

Sure thing. Is there a sandbox available to take a look at it?

On Fri, Apr 24, 2015 at 3:27 AM, Eugeny Kolpakov notifications@github.com
wrote:

@sarina https://github.com/sarina just a reminder, it would be great if
this could be merged today, in time for upcoming release.


Reply to this email directly or view it on GitHub
#16 (comment)
.

@antoviaque

Copy link
Copy Markdown
Member

@sarina Yup, you have the links in the PR description above - it took me some time to find them too : )

Comment thread problem_builder/dashboard.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.

Typo: "dissplayed"

@sarina

sarina commented Apr 24, 2015

Copy link
Copy Markdown

@e-kolpakov 👍 to merge once the typo is addressed.

I do want @cptvitamin to take a look at this block, even if it's after it's merged. He will be back from vacation next week. Could you please keep the sandboxes up until he's gotten a chance to review?

* Horizontally centering visual progress
* Ability to override "Average" label
* Added ability to hide numbers in dashboard
* Ability to exclude specific questions from dashboard
* Slightly improved a11y (aka accessibility)
@e-kolpakov
e-kolpakov force-pushed the presentation-updates branch from 1088ec6 to 0cf055d Compare April 24, 2015 14:16
@e-kolpakov

Copy link
Copy Markdown
Contributor Author

@sarina there's one feature left not implemented: the ability to set up average labels per mentoring (now it's one setting for dashboard). Since this already get thumbs up and release is quite close, I'll merge this PR when the build turns green, and implement that in a follow up PR (probably today, Monday for sure).

e-kolpakov added a commit that referenced this pull request Apr 24, 2015
@e-kolpakov
e-kolpakov merged commit b3cab3a into edx-release Apr 24, 2015
@sarina

sarina commented Apr 24, 2015

Copy link
Copy Markdown

@e-kolpakov you're going to keep the sandbox running yes?

@e-kolpakov

Copy link
Copy Markdown
Contributor Author

@sarina yes, once it's not needed it is just freed to be used later, but not shutdown/disabled/etc.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

@e-kolpakov I've never seen anyone try to use aria-label on a td element, and I don't blame you for trying since the spec says it is allowed. However, I wanted to perform a quick implementation test for using aria-label on a td element and I found that only Voiceover will read the aria-label, and only if there is an explicit value in the td element, and it reads both. If the cell is empty, it ignores the aria-label. Testing in NVDA and JAWS revealed that only explicit td values are read. aria-labels are ignored.

I recommend using off-screen text (class=sr) inside the table cells in this use case.

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.

5 participants