Make 'next' button text customizable in Mentoring Steps. - #74
Conversation
There was a problem hiding this comment.
@Kelketek When testing your changes I found that if there are multiple Mentoring Step blocks, setting different "Next step" labels doesn't work the way it's supposed to: The label doesn't change from step to step; it's always set to the next-button-label of the first step on the page.
One way of addressing this would be to add a function to MentoringStepBlock (in step.js) that returns the label of the current step, something like:
getStepLabel: function() {
return $('.sb-step', element).data('next-button-label');
}... and then update via:
var step = steps[activeStep];
nextDOM.attr('value', step.getStepLabel());Also, I think you'll need to update the label not just from updateDisplay but also from jumpToReview (this is called from reviewNextStep, which acts as a click handler for nextDOM while reviewing individual steps). To test this (I didn't), set max_attempts and extended_feedback on the Step Builder block and complete the block in the LMS until you have no attempts left, then use one of the links to jump back to a specific question/step.
6b251b6 to
0a306f3
Compare
There was a problem hiding this comment.
@Kelketek Nit: I think it would be good to rename this to something a little less generic, like updateNextLabel or even updateNextButtonLabel.
0a306f3 to
16d2def
Compare
16d2def to
43436a9
Compare
|
@Kelketek Looks good, 👍 once the tests pass. |
Make 'next' button text customizable in Mentoring Steps.
@itsjeyd Ready for your review.
You should be able to test this by:
Heads up @e-kolpakov , this should be coming down the pipe soon, and needs to be included in the release.