diff --git a/blocks/badges/tests/behat/block_badges_course.feature b/blocks/badges/tests/behat/block_badges_course.feature index 75942ff5e6d..3f16fa421e0 100644 --- a/blocks/badges/tests/behat/block_badges_course.feature +++ b/blocks/badges/tests/behat/block_badges_course.feature @@ -17,7 +17,7 @@ Feature: Enable Block Badges in a course And I log in as "teacher1" And I follow "Course 1" # Issue badge 1 of 2 - And I navigate to "Add a new badge" node in "Badges" + And I navigate to "Add a new badge" node in "Course administration > Badges" And I set the following fields to these values: | id_name | Badge 1 | | id_description | Badge 1 | @@ -34,7 +34,7 @@ Feature: Enable Block Badges in a course And I set the field "potentialrecipients[]" to "Teacher 1 (teacher1@example.com)" And I press "Award badge" # Issue Badge 2 of 2 - And I navigate to "Add a new badge" node in "Badges" + And I navigate to "Add a new badge" node in "Course administration > Badges" And I set the following fields to these values: | id_name | Badge 2 | | id_description | Badge 2 | diff --git a/blocks/badges/tests/behat/block_badges_dashboard.feature b/blocks/badges/tests/behat/block_badges_dashboard.feature index 6bc3d1ffb66..7a39ed12405 100644 --- a/blocks/badges/tests/behat/block_badges_dashboard.feature +++ b/blocks/badges/tests/behat/block_badges_dashboard.feature @@ -17,7 +17,7 @@ Feature: Enable Block Badges on the dashboard and view awarded badges And I log in as "teacher1" And I follow "Course 1" # Issue badge 1 of 2 - And I navigate to "Add a new badge" node in "Badges" + And I navigate to "Add a new badge" node in "Course administration > Badges" And I set the following fields to these values: | id_name | Badge 1 | | id_description | Badge 1 | diff --git a/blocks/badges/tests/behat/block_badges_frontpage.feature b/blocks/badges/tests/behat/block_badges_frontpage.feature index 8b403578e64..c6b0425861e 100644 --- a/blocks/badges/tests/behat/block_badges_frontpage.feature +++ b/blocks/badges/tests/behat/block_badges_frontpage.feature @@ -22,7 +22,7 @@ Feature: Enable Block Badges on the frontpage and view awarded badges And I log in as "teacher1" And I follow "Course 1" # Issue badge 1 of 2 - And I navigate to "Add a new badge" node in "Badges" + And I navigate to "Add a new badge" node in "Course administration > Badges" And I set the following fields to these values: | id_name | Badge 1 | | id_description | Badge 1 | diff --git a/blocks/completionstatus/tests/behat/block_completionstatus_manual_other.feature b/blocks/completionstatus/tests/behat/block_completionstatus_manual_other.feature index eb859d0b09e..532950d6b14 100644 --- a/blocks/completionstatus/tests/behat/block_completionstatus_manual_other.feature +++ b/blocks/completionstatus/tests/behat/block_completionstatus_manual_other.feature @@ -37,7 +37,7 @@ Feature: Enable Block Completion in a course using manual completion by others And I log out And I log in as "teacher1" And I follow "Course 1" - And I navigate to "Course completion" node in "Reports" + And I navigate to "Course completion" node in "Course administration > Reports" And I follow "Click to mark user complete" # Running completion task just after clicking sometimes fail, as record # should be created before the task runs. @@ -74,7 +74,7 @@ Feature: Enable Block Completion in a course using manual completion by others And I log out And I log in as "teacher1" And I follow "Course 1" - And I navigate to "Course completion" node in "Reports" + And I navigate to "Course completion" node in "Course administration > Reports" And I follow "Click to mark user complete" And I log out And I log in as "student1" @@ -88,7 +88,7 @@ Feature: Enable Block Completion in a course using manual completion by others And I log out And I log in as "teacher2" And I follow "Course 1" - And I navigate to "Course completion" node in "Reports" + And I navigate to "Course completion" node in "Course administration > Reports" And I follow "Click to mark user complete" # Running completion task just after clicking sometimes fail, as record # should be created before the task runs. diff --git a/blocks/course_overview/tests/behat/block_course_overview.feature b/blocks/course_overview/tests/behat/block_course_overview.feature index bb86bdbdbe2..90b8c364d85 100644 --- a/blocks/course_overview/tests/behat/block_course_overview.feature +++ b/blocks/course_overview/tests/behat/block_course_overview.feature @@ -153,7 +153,7 @@ Feature: View the course overview block on the dashboard and test it's functiona And I click on "Enable" "link" in the "Course meta link" "table_row" And I am on site homepage And I follow "Course 2" - And I navigate to "Enrolment methods" node in "Users" + And I navigate to "Enrolment methods" node in "Course administration > Users" And I add "Course meta link" enrolment method with: | Link course | C1 | And I log out diff --git a/grade/grading/form/rubric/tests/behat/behat_gradingform_rubric.php b/grade/grading/form/rubric/tests/behat/behat_gradingform_rubric.php index 4c31b281608..6f23158b75a 100644 --- a/grade/grading/form/rubric/tests/behat/behat_gradingform_rubric.php +++ b/grade/grading/form/rubric/tests/behat/behat_gradingform_rubric.php @@ -309,9 +309,10 @@ class behat_gradingform_rubric extends behat_base { $levelnode = $this->find('xpath', $selectedlevelxpath); // Using in_array() as there are only a few elements. - if (!in_array('checked', explode(' ', $levelnode->getAttribute('class')))) { + if (!$levelnode->hasClass('checked')) { + $levelnodexpath = $selectedlevelxpath . "//div[contains(concat(' ', normalize-space(@class), ' '), ' score ')]"; $this->execute('behat_general::i_click_on_in_the', - array($selectedlevelxpath, "xpath_element", $this->escape($name), "table_row") + array($levelnodexpath, "xpath_element", $this->escape($name), "table_row") ); } diff --git a/mod/assign/amd/build/grading_panel.min.js b/mod/assign/amd/build/grading_panel.min.js index a1453fe898a..3bd700c25ed 100644 --- a/mod/assign/amd/build/grading_panel.min.js +++ b/mod/assign/amd/build/grading_panel.min.js @@ -1 +1 @@ -define(["jquery","core/notification","core/templates","core/fragment","core/ajax","core/str","mod_assign/grading_form_change_checker","mod_assign/grading_events"],function(a,b,c,d,e,f,g,h){var i=function(b){this._regionSelector=b,this._region=a(b),this._userCache=[],this.registerEventListeners()};return i.prototype._regionSelector=null,i.prototype._lastUserId=0,i.prototype._lastAttemptNumber=-1,i.prototype._region=null,i.prototype._niceReplaceNodeContents=function(b,d,e){var f=a.Deferred();return b.fadeOut("fast",function(){c.replaceNodeContents(b,d,e),b.fadeIn("fast",function(){f.resolve()})}),f.promise()},i.prototype._saveFormState=function(){"undefined"!=typeof window.tinyMCE&&window.tinyMCE.triggerSave();var b=a('[data-region="grading-actions-form"] [name="sendstudentnotifications"]').val();a('.gradeform [name="sendstudentnotifications"]').val(b)},i.prototype._submitForm=function(c,d){var f=a(this._region.find("form.gradeform"));a('[data-region="overlay"]').show(),f.trigger("save-form-state");var g=f.serialize(),h=this._region.attr("data-assignmentid");e.call([{methodname:"mod_assign_submit_grading_form",args:{assignmentid:h,userid:this._lastUserId,jsonformdata:JSON.stringify(g)},done:this._handleFormSubmissionResponse.bind(this,g,d),fail:b.exception}])},i.prototype._handleFormSubmissionResponse=function(c,d,e){"undefined"==typeof d&&(d=this._lastUserId),e.length?a(document).trigger("reset",[this._lastUserId,c]):(f.get_strings([{key:"changessaved",component:"core"},{key:"gradechangessaveddetail",component:"mod_assign"}]).done(function(a){b.alert(a[0],a[1])}).fail(b.exception),d==this._lastUserId?a(document).trigger("reset",d):a(document).trigger("user-changed",d)),a('[data-region="overlay"]').hide()},i.prototype._resetForm=function(b,c,d){var e=a.Event("custom");"undefined"==typeof c&&(c=this._lastUserId),this._lastUserId=0,this._refreshGradingPanel(e,c,d)},i.prototype._chooseAttempt=function(c){var d=a(c.target),e=d.data("submissions"),g=a(document.getElementById(e)),h=g.clone(),i=h.wrap(a("
")).html();f.get_strings([{key:"viewadifferentattempt",component:"mod_assign"},{key:"view",component:"core"},{key:"cancel",component:"core"}]).done(function(c){b.confirm(c[0],i,c[1],c[2],function(){var b=a("input:radio[name='select-attemptnumber']:checked").val();this._refreshGradingPanel(null,this._lastUserId,"",b)}.bind(this))}.bind(this)).fail(b.exception)},i.prototype._addPopoutButtons=function(d){var e=a(d);c.render("mod_assign/popout_button",{}).done(function(a){var b=e.find('[data-fieldtype="filemanager"],[data-fieldtype="editor"],[data-fieldtype="grading"]').closest(".fitem");b.addClass("has-popout").find(".fitemtitle label").parent().append(a),e.on("click",'[data-region="popout-button"]',this._togglePopout.bind(this))}.bind(this)).fail(b.exception)},i.prototype._togglePopout=function(b){b.preventDefault();var c=a(b.target).closest(".fitem");c.hasClass("popout")?a(".popout").removeClass("popout"):(a(".popout").removeClass("popout"),c.addClass("popout"),c.addClass("moodle-has-zindex"))},i.prototype._refreshGradingPanel=function(e,f,h,i){var j=this._region.attr("data-contextid");"undefined"==typeof h&&(h=""),"undefined"==typeof i&&(i=-1),this._lastUserId==f&&this._lastAttemptNumber==i&&""===h||(this._lastUserId=f,this._lastAttemptNumber=i,a(document).trigger("start-loading-user"),window.M.util.js_pending("mod-assign-loading-user"),c.render("mod_assign/loading",{}).done(function(c,e){this._niceReplaceNodeContents(this._region,c,e).done(function(){if(f>0){this._region.show();var c={userid:f,attemptnumber:i,jsonformdata:JSON.stringify(h)};d.loadFragment("mod_assign","gradingpanel",j,c).done(function(c,d){this._niceReplaceNodeContents(this._region,c,d).done(function(){g.saveFormState('[data-region="grade-panel"] .gradeform'),a(document).on("editor-content-restored",function(){g.saveFormState('[data-region="grade-panel"] .gradeform')}),a('[data-region="attempt-chooser"]').on("click",this._chooseAttempt.bind(this)),this._addPopoutButtons('[data-region="grade-panel"] .gradeform'),a(document).trigger("finish-loading-user"),window.M.util.js_complete("mod-assign-loading-user")}.bind(this)).fail(b.exception)}.bind(this)).fail(b.exception)}else{this._region.hide();var e=a('[data-region="review-panel"]');e.length&&this._niceReplaceNodeContents(e,"",""),a(document).trigger("finish-loading-user"),window.M.util.js_complete("mod-assign-loading-user")}}.bind(this))}.bind(this)).fail(b.exception))},i.prototype.getPanelElement=function(){return a('[data-region="grade-panel"]')},i.prototype.collapsePanel=function(){this.getPanelElement().addClass("collapsed")},i.prototype.expandPanel=function(){this.getPanelElement().removeClass("collapsed")},i.prototype.registerEventListeners=function(){var b=a(document);b.on("user-changed",this._refreshGradingPanel.bind(this)),b.on("save-changes",this._submitForm.bind(this)),b.on("reset",this._resetForm.bind(this)),b.on("save-form-state",this._saveFormState.bind(this)),b.on(h.COLLAPSE_GRADE_PANEL,function(){this.collapsePanel()}.bind(this)),b.on(h.COLLAPSE_REVIEW_PANEL,function(){this.expandPanel()}.bind(this)),b.on(h.EXPAND_GRADE_PANEL,function(){this.expandPanel()}.bind(this))},i}); \ No newline at end of file +define(["jquery","core/notification","core/templates","core/fragment","core/ajax","core/str","mod_assign/grading_form_change_checker","mod_assign/grading_events"],function(a,b,c,d,e,f,g,h){var i=function(b){this._regionSelector=b,this._region=a(b),this._userCache=[],this.registerEventListeners()};return i.prototype._regionSelector=null,i.prototype._lastUserId=0,i.prototype._lastAttemptNumber=-1,i.prototype._region=null,i.prototype._niceReplaceNodeContents=function(b,d,e){var f=a.Deferred();return b.fadeOut("fast",function(){c.replaceNodeContents(b,d,e),b.fadeIn("fast",function(){f.resolve()})}),f.promise()},i.prototype._saveFormState=function(){"undefined"!=typeof window.tinyMCE&&window.tinyMCE.triggerSave();var b=a('[data-region="grading-actions-form"] [name="sendstudentnotifications"]').val();a('.gradeform [name="sendstudentnotifications"]').val(b)},i.prototype._submitForm=function(c,d){var f=a(this._region.find("form.gradeform"));a('[data-region="overlay"]').show(),f.trigger("save-form-state");var g=f.serialize(),h=this._region.attr("data-assignmentid");e.call([{methodname:"mod_assign_submit_grading_form",args:{assignmentid:h,userid:this._lastUserId,jsonformdata:JSON.stringify(g)},done:this._handleFormSubmissionResponse.bind(this,g,d),fail:b.exception}])},i.prototype._handleFormSubmissionResponse=function(c,d,e){"undefined"==typeof d&&(d=this._lastUserId),e.length?a(document).trigger("reset",[this._lastUserId,c]):(f.get_strings([{key:"changessaved",component:"core"},{key:"gradechangessaveddetail",component:"mod_assign"}]).done(function(a){b.alert(a[0],a[1])}).fail(b.exception),d==this._lastUserId?a(document).trigger("reset",d):a(document).trigger("user-changed",d)),a('[data-region="overlay"]').hide()},i.prototype._resetForm=function(b,c,d){var e=a.Event("custom");"undefined"==typeof c&&(c=this._lastUserId),this._lastUserId=0,this._refreshGradingPanel(e,c,d)},i.prototype._chooseAttempt=function(c){var d=a(c.target),e=d.data("submissions"),g=a(document.getElementById(e)),h=g.clone(),i=h.wrap(a("")).html();f.get_strings([{key:"viewadifferentattempt",component:"mod_assign"},{key:"view",component:"core"},{key:"cancel",component:"core"}]).done(function(c){b.confirm(c[0],i,c[1],c[2],function(){var b=a("input:radio[name='select-attemptnumber']:checked").val();this._refreshGradingPanel(null,this._lastUserId,"",b)}.bind(this))}.bind(this)).fail(b.exception)},i.prototype._addPopoutButtons=function(d){var e=a(d);c.render("mod_assign/popout_button",{}).done(function(a){var b=e.find('[data-fieldtype="filemanager"],[data-fieldtype="editor"],[data-fieldtype="grading"]').closest(".fitem");b.addClass("has-popout").find("label").parent().append(a),e.on("click",'[data-region="popout-button"]',this._togglePopout.bind(this))}.bind(this)).fail(b.exception)},i.prototype._togglePopout=function(b){b.preventDefault();var c=a(b.target).closest(".fitem");c.hasClass("popout")?a(".popout").removeClass("popout"):(a(".popout").removeClass("popout"),c.addClass("popout"),c.addClass("moodle-has-zindex"))},i.prototype._refreshGradingPanel=function(e,f,h,i){var j=this._region.attr("data-contextid");"undefined"==typeof h&&(h=""),"undefined"==typeof i&&(i=-1),this._lastUserId==f&&this._lastAttemptNumber==i&&""===h||(this._lastUserId=f,this._lastAttemptNumber=i,a(document).trigger("start-loading-user"),window.M.util.js_pending("mod-assign-loading-user"),c.render("mod_assign/loading",{}).done(function(c,e){this._niceReplaceNodeContents(this._region,c,e).done(function(){if(f>0){this._region.show();var c={userid:f,attemptnumber:i,jsonformdata:JSON.stringify(h)};d.loadFragment("mod_assign","gradingpanel",j,c).done(function(c,d){this._niceReplaceNodeContents(this._region,c,d).done(function(){g.saveFormState('[data-region="grade-panel"] .gradeform'),a(document).on("editor-content-restored",function(){g.saveFormState('[data-region="grade-panel"] .gradeform')}),a('[data-region="attempt-chooser"]').on("click",this._chooseAttempt.bind(this)),this._addPopoutButtons('[data-region="grade-panel"] .gradeform'),a(document).trigger("finish-loading-user"),window.M.util.js_complete("mod-assign-loading-user")}.bind(this)).fail(b.exception)}.bind(this)).fail(b.exception)}else{this._region.hide();var e=a('[data-region="review-panel"]');e.length&&this._niceReplaceNodeContents(e,"",""),a(document).trigger("finish-loading-user"),window.M.util.js_complete("mod-assign-loading-user")}}.bind(this))}.bind(this)).fail(b.exception))},i.prototype.getPanelElement=function(){return a('[data-region="grade-panel"]')},i.prototype.collapsePanel=function(){this.getPanelElement().addClass("collapsed")},i.prototype.expandPanel=function(){this.getPanelElement().removeClass("collapsed")},i.prototype.registerEventListeners=function(){var b=a(document);b.on("user-changed",this._refreshGradingPanel.bind(this)),b.on("save-changes",this._submitForm.bind(this)),b.on("reset",this._resetForm.bind(this)),b.on("save-form-state",this._saveFormState.bind(this)),b.on(h.COLLAPSE_GRADE_PANEL,function(){this.collapsePanel()}.bind(this)),b.on(h.COLLAPSE_REVIEW_PANEL,function(){this.expandPanel()}.bind(this)),b.on(h.EXPAND_GRADE_PANEL,function(){this.expandPanel()}.bind(this))},i}); \ No newline at end of file diff --git a/mod/assign/amd/src/grading_panel.js b/mod/assign/amd/src/grading_panel.js index 1f03e649847..4f380b814e4 100644 --- a/mod/assign/amd/src/grading_panel.js +++ b/mod/assign/amd/src/grading_panel.js @@ -218,7 +218,7 @@ define(['jquery', 'core/notification', 'core/templates', 'core/fragment', templates.render('mod_assign/popout_button', {}).done(function(html) { var parents = region.find('[data-fieldtype="filemanager"],[data-fieldtype="editor"],[data-fieldtype="grading"]') .closest('.fitem'); - parents.addClass('has-popout').find('.fitemtitle label').parent().append(html); + parents.addClass('has-popout').find('label').parent().append(html); region.on('click', '[data-region="popout-button"]', this._togglePopout.bind(this)); }.bind(this)).fail(notification.exception); diff --git a/mod/lesson/tests/behat/lesson_course_reset.feature b/mod/lesson/tests/behat/lesson_course_reset.feature index ec9937dc272..b2691092372 100644 --- a/mod/lesson/tests/behat/lesson_course_reset.feature +++ b/mod/lesson/tests/behat/lesson_course_reset.feature @@ -58,7 +58,7 @@ Feature: Lesson reset And I log in as "teacher1" And I follow "Course 1" And I follow "Test lesson name" - And I navigate to "Overview" node in "Reports" + And I navigate to "Overview" node in "Lesson administration > Reports" And I should see "Sam1 Student1" And I navigate to "Reset" node in "Course administration" And I set the following fields to these values: @@ -67,7 +67,7 @@ Feature: Lesson reset And I press "Continue" And I follow "Course 1" And I follow "Test lesson name" - And I navigate to "Overview" node in "Reports" + And I navigate to "Overview" node in "Lesson administration > Reports" Then I should see "No attempts have been made on this lesson" Scenario: Use course reset to remove user overrides. diff --git a/theme/boost/scss/moodle/core.scss b/theme/boost/scss/moodle/core.scss index e31c3141734..5dc02c1cbbe 100644 --- a/theme/boost/scss/moodle/core.scss +++ b/theme/boost/scss/moodle/core.scss @@ -1233,6 +1233,12 @@ body#page-lib-editor-tinymce-plugins-moodlemedia-preview { border: 1px solid #ccc; } +// Show is a bootstrap 2 class - but we use it for modals. We don't want to enable it everywhere because they removed +// it for a reason (conflicts with jquery .show()). +.modal.show { + display: block; +} + .moodle-dialogue-base .moodle-dialogue-wrap.moodle-dialogue-content { @extend .modal-content; }