From f6b6d2d3699047115498739e62710a855112c841 Mon Sep 17 00:00:00 2001 From: Jonathan Garcia Date: Mon, 2 Oct 2023 17:36:47 -0500 Subject: [PATCH] INT-19172: Fixes for grunt gherkin and data base schema validation --- amd/build/accessibility.min.js | 25 +- amd/build/accessibility.min.js.map | 2 +- amd/src/accessibility.js | 3 +- styles.css | 402 +++++++++--------- tests/behat/add_forum.feature | 2 +- ...anced_editor_pass_data_to_new_page.feature | 2 +- tests/behat/anon_posting.feature | 7 +- tests/behat/discussion_navigation.feature | 4 +- tests/behat/edit_post_student.feature | 2 +- tests/behat/forum_posts_summary.feature | 2 +- tests/behat/grading_settings.feature | 2 +- tests/behat/hsuforum_tags.feature | 2 +- tests/behat/inline_edit.feature | 1 - tests/behat/my_profile.feature | 3 +- tests/behat/post_to_multiple_groups.feature | 3 +- .../moodle-mod_hsuforum-livelog-min.js | 2 +- 16 files changed, 238 insertions(+), 226 deletions(-) diff --git a/amd/build/accessibility.min.js b/amd/build/accessibility.min.js index 276b2f54..a4da8125 100644 --- a/amd/build/accessibility.min.js +++ b/amd/build/accessibility.min.js @@ -1,2 +1,23 @@ -define ("mod_hsuforum/accessibility",["jquery"],function(a){return{init:function init(){a(".pinbutton.btn.btn-default").click(function(){a(this).attr("aria-pressed","true")});var b=a("a.hsuforum-toggle-bookmark, a.hsuforum-toggle-substantive");b.off("keypress").on("keypress",function(a){a.preventDefault();if(32===a.keyCode){a.target.click()}})}}}); -//# sourceMappingURL=accessibility.min.js.map +/** + * This file is part of Moodle - http://moodle.org/ + * + * Moodle is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Moodle is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Moodle. If not, see . + * + * @author Rafael Becerra rafael.becerrarodriguez@openlms.net + * @copyright Copyright (c) 2019 Open LMS (https://www.openlms.net) + * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later + */ +define("mod_hsuforum/accessibility",["jquery"],(function($){return{init:function(){$(".pinbutton.btn.btn-default").click((function(){$(this).attr("aria-pressed","true")})),$("a.hsuforum-toggle-bookmark, a.hsuforum-toggle-substantive").off("keypress").on("keypress",(function(e){e.preventDefault(),32===e.keyCode&&e.target.click()}))}}})); + +//# sourceMappingURL=accessibility.min.js.map \ No newline at end of file diff --git a/amd/build/accessibility.min.js.map b/amd/build/accessibility.min.js.map index 2b908f19..98317d7f 100644 --- a/amd/build/accessibility.min.js.map +++ b/amd/build/accessibility.min.js.map @@ -1 +1 @@ -{"version":3,"sources":["../src/accessibility.js"],"names":["define","$","init","click","attr","hsuforumThreadFlags","off","on","e","preventDefault","keyCode","target"],"mappings":"AAyBAA,OAAM,8BAAC,CAAC,QAAD,CAAD,CACF,SAASC,CAAT,CAAY,CACR,MAAO,CACHC,IAAI,CAAE,eAAW,CAGbD,CAAC,CAAC,4BAAD,CAAD,CAAgCE,KAAhC,CAAsC,UAAW,CAC7CF,CAAC,CAAC,IAAD,CAAD,CAAQG,IAAR,CAAa,cAAb,CAA6B,MAA7B,CACH,CAFD,EAKA,GAAIC,CAAAA,CAAmB,CAAGJ,CAAC,CAAC,2DAAD,CAA3B,CACAI,CAAmB,CAACC,GAApB,CAAwB,UAAxB,EAAoCC,EAApC,CAAuC,UAAvC,CAAmD,SAASC,CAAT,CAAY,CAC3DA,CAAC,CAACC,cAAF,GACA,GAAkB,EAAd,GAAAD,CAAC,CAACE,OAAN,CAAsB,CAClBF,CAAC,CAACG,MAAF,CAASR,KAAT,EACH,CACJ,CALD,CAMH,CAhBE,CAkBV,CApBC,CAAN","sourcesContent":["/**\n * This file is part of Moodle - http://moodle.org/\n *\n * Moodle is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * Moodle is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with Moodle. If not, see .\n *\n * @package mod_hsuforum\n * @author Rafael Becerra rafael.becerrarodriguez@openlms.net\n * @copyright Copyright (c) 2019 Open LMS (https://www.openlms.net)\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\n/**\n * JS code to assign attributes and expected behavior for elements in the Dom regarding accessibility.\n */\ndefine(['jquery'],\n function($) {\n return {\n init: function() {\n // Change pin button class on click to aria-pressed = \"true\".\n\n $('.pinbutton.btn.btn-default').click(function() {\n $(this).attr('aria-pressed', 'true');\n });\n\n // Add event handler to include space key as user's input to bookmark and substantive.\n var hsuforumThreadFlags = $('a.hsuforum-toggle-bookmark, a.hsuforum-toggle-substantive');\n hsuforumThreadFlags.off('keypress').on('keypress', function(e) {\n e.preventDefault();\n if (e.keyCode === 32) {\n e.target.click();\n }\n });\n }\n }\n }\n);\n"],"file":"accessibility.min.js"} \ No newline at end of file +{"version":3,"file":"accessibility.min.js","sources":["../src/accessibility.js"],"sourcesContent":["/**\n * This file is part of Moodle - http://moodle.org/\n *\n * Moodle is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * Moodle is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with Moodle. If not, see .\n *\n * @author Rafael Becerra rafael.becerrarodriguez@openlms.net\n * @copyright Copyright (c) 2019 Open LMS (https://www.openlms.net)\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\n/**\n * JS code to assign attributes and expected behavior for elements in the Dom regarding accessibility.\n */\ndefine(['jquery'],\n function($) {\n return {\n init: function() {\n // Change pin button class on click to aria-pressed = \"true\".\n\n $('.pinbutton.btn.btn-default').click(function() {\n $(this).attr('aria-pressed', 'true');\n });\n\n // Add event handler to include space key as user's input to bookmark and substantive.\n var hsuforumThreadFlags = $('a.hsuforum-toggle-bookmark, a.hsuforum-toggle-substantive');\n hsuforumThreadFlags.off('keypress').on('keypress', function(e) {\n e.preventDefault();\n if (e.keyCode === 32) {\n e.target.click();\n }\n });\n }\n };\n }\n);\n"],"names":["define","$","init","click","this","attr","off","on","e","preventDefault","keyCode","target"],"mappings":";;;;;;;;;;;;;;;;;;;;AAwBAA,oCAAO,CAAC,WACJ,SAASC,SACE,CACHC,KAAM,WAGFD,EAAE,8BAA8BE,OAAM,WAClCF,EAAEG,MAAMC,KAAK,eAAgB,WAIPJ,EAAE,6DACRK,IAAI,YAAYC,GAAG,YAAY,SAASC,GACxDA,EAAEC,iBACgB,KAAdD,EAAEE,SACFF,EAAEG,OAAOR"} \ No newline at end of file diff --git a/amd/src/accessibility.js b/amd/src/accessibility.js index 97b84635..a8980df1 100644 --- a/amd/src/accessibility.js +++ b/amd/src/accessibility.js @@ -14,7 +14,6 @@ * You should have received a copy of the GNU General Public License * along with Moodle. If not, see . * - * @package mod_hsuforum * @author Rafael Becerra rafael.becerrarodriguez@openlms.net * @copyright Copyright (c) 2019 Open LMS (https://www.openlms.net) * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later @@ -42,6 +41,6 @@ define(['jquery'], } }); } - } + }; } ); diff --git a/styles.css b/styles.css index 643ada54..ff02f3db 100644 --- a/styles.css +++ b/styles.css @@ -1,6 +1,6 @@ #page-local-joulegrader-view .indent { - border-bottom:1px solid #ccc; + border-bottom: 1px solid #ccc; } #page-local-joulegrader-view .hsuforum-post-pubdate:after { @@ -19,23 +19,26 @@ } /* export page print styles */ -#page-mod-hsuforum-route.pagelayout-embedded a[aria-pressed="false"]{ - display:none; +#page-mod-hsuforum-route.pagelayout-embedded a[aria-pressed="false"] { + display: none; } - -.hsuforum_postincontext_dialog .yui3-widget-hd { cursor: move; } +.hsuforum_postincontext_dialog .yui3-widget-hd { + cursor: move; +} /* Activity instance has a height set to 2em. This is madness, and we need to reset it or it causes lots of issues. */ .activity.modtype_hsuforum .activityinstance { - height:auto !important; + height: auto !important; /* stylelint-disable-line declaration-no-important */ } - -.path-mod-hsuforum #gradetype_warning.hidden { display: none; } -.path-mod-hsuforum #gradetype_warning { color: #660000; padding-left: 5px; } - - +.path-mod-hsuforum #gradetype_warning.hidden { + display: none; +} +.path-mod-hsuforum #gradetype_warning { + color: #600; + padding-left: 5px; +} /* Hide things in the main view */ .hsuforum-thread .hsuforum-footer-reply, @@ -53,7 +56,7 @@ .hsuforum-thread-article-expanded .hsuforum-thread-body, .forumtype-blog .hsuforum-thread-body, .forumtype-blog .hsuforum-thread-content, -.forumtype-blog .hsuforum-replycount-link{ +.forumtype-blog .hsuforum-replycount-link { display: block; } @@ -65,20 +68,20 @@ .forumtype-blog .hsuforum-thread-title, .forumtype-blog .hsuforum-thread-meta { - clear:both; - display:block; - width:100%; - float:none; + clear: both; + display: block; + width: 100%; + float: none; text-align: left; } /* Hide cancel button on forum reply in footer */ -.hsuforum-footer-reply .hsuforum-cancel{ - display:none; +.hsuforum-footer-reply .hsuforum-cancel { + display: none; } /* Hidden advanced editor */ .path-mod-hsuforum #hiddenadvancededitorcont div { - display:none; + display: none; } /* Hide post itself when doing inline editing */ @@ -91,13 +94,11 @@ } #page-mod-hsuforum-view #intro.generalbox { - border:0; - -webkit-box-shadow:none; - box-shadow:none; + border: 0; + -webkit-box-shadow: none; + box-shadow: none; } - - /* ------------------------- *ACC FORUM VIEW -------------------------*/ @@ -111,45 +112,42 @@ box-sizing: border-box; } - /* consistent padding */ .hsuforum-thread-figure, .hsuforum-thread-content, .hsuforum-thread-tools, .hsuforum-post-figure, .hsuforum-thread-body { - padding:0.33em 2.36%; + padding: 0.33em 2.36%; } /* bold text to be bold */ #page-mod-hsuforum-discuss strong, #page-mod-hsuforum-view strong { - font-weight:700; + font-weight: 700; } /* header issue in express */ -.hsuforum-thread-title h4{ - text-align:left; +.hsuforum-thread-title h4 { + text-align: left; } - /* all imgs responsive */ .hsuforum-thread img { - max-width:100%; - height:auto; + max-width: 100%; + height: auto; } - .hsuforum-thread-article, .hsuforum-reply, -.hsuforum-thread-replies{ - padding:0.5em 2.36%; +.hsuforum-thread-replies { + padding: 0.5em 2.36%; } -.hsuforum-post-content .posting{ - padding:1em 0; +.hsuforum-post-content .posting { + padding: 1em 0; } .hsuforum-post-content-hidden { - padding:1em 2.36%; + padding: 1em 2.36%; } #page-mod-hsuforum-search #searchform { @@ -160,7 +158,7 @@ display: block; } #page-mod-hsuforum-search .hsuforum-post:before { - display:none; + display: none; } /* FORUM HEADER */ @@ -174,213 +172,202 @@ } #page-mod-hsuforum-view #selectgroup label { - display:none; + display: none; } #newdiscussionform div, -#newdiscussionform input[type=submit]{ - margin-left:0; +#newdiscussionform input[type=submit] { + margin-left: 0; } /* THREAD AND POSTS */ .hsuforum-thread { - border-bottom:1px solid #ddd; - margin:0.5em 0; - padding:0.5em 2.36%; - background-color:white; + border-bottom: 1px solid #ddd; + margin: 0.5em 0; + padding: 0.5em 2.36%; + background-color: white; word-wrap: break-word; -webkit-hyphens: auto; - -moz-hyphens: auto; - hyphens: auto; + -moz-hyphens: auto; + hyphens: auto; } -#page-mod-hsuforum-discuss .hsuforum-thread{ - border-color:transparent; +#page-mod-hsuforum-discuss .hsuforum-thread { + border-color: transparent; } #page-mod-hsuforum-discuss .hsuforum-thread-author, #page-mod-hsuforum-discuss .hsuforum-thread-header { - width:100%; - padding:0.33em 2.34%; + width: 100%; + padding: 0.33em 2.34%; } - - /* THREAD AND POST TITLES */ -.hsuforum-thread-title >h4 { - margin:0; - padding-right:2.34%; +.hsuforum-thread-title > h4 { + margin: 0; + padding-right: 2.34%; } -#page-mod-hsuforum-view:not(.forumtype-blog) .hsuforum-thread-title > h4{ - font-size:1.3em; +#page-mod-hsuforum-view:not(.forumtype-blog) .hsuforum-thread-title > h4 { + font-size: 1.3em; } -.hsuforum-post-byline{ - font-size:1em; - font-weight:normal; - line-height:1.5; - font-family:'Roboto','Open sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; - margin-bottom:0; +.hsuforum-post-byline { + font-size: 1em; + font-weight: normal; + line-height: 1.5; + font-family: 'Roboto', 'Open sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; + margin-bottom: 0; } -.hsuforum-post-title{ - font-size:0.85em; - font-style:oblique; +.hsuforum-post-title { + font-size: 0.85em; + font-style: oblique; -webkit-transition: opacity .3s; transition: opacity .3s; - opacity:0.85; + opacity: 0.85; } .hsuforum-post-target:target .hsuforum-post-title, .hsuforum-post:hover .hsuforum-post-title { - opacity:0.85; + opacity: 0.85; } .hsuforum-thread-content { - clear:both; + clear: both; } - .hsuforum-thread-flags { - text-align:right; + text-align: right; } .hsuforum-thread-replies-list { - list-style:none; - margin:0; + list-style: none; + margin: 0; } -.hsuforum-thread-replies-meta{ - display:block; +.hsuforum-thread-replies-meta { + display: block; } -.hsuforum-replycount{ - font-size:small; +.hsuforum-replycount { + font-size: small; } /* POST LIST STYLES */ -.hsuforum-post{ - position:relative; - clear:both; +.hsuforum-post { + position: relative; + clear: both; } -.hsuforum-post:before{ +.hsuforum-post:before { content: attr(data-count); position: absolute; top: 3em; left: -4%; border-radius: 100%; background-color: #ddd; - color: #FFF; + color: #fff; text-align: center; height: 2em; width: 2em; line-height: 2; } -.hsuforum-post:hover:before{ +.hsuforum-post:hover:before { background-color: #333; -webkit-transition: all .3s; transition: all .3s; } /* for focus/target spacinging in themes with a fixed header */ -.hsuforum-post-wrapper{ - padding-top:3em; +.hsuforum-post-wrapper { + padding-top: 3em; } .hsuforum-parent-post-link { -border-radius: 50%; -background-color: orange; -display: inline-block; -width: 1.5em; -height:1.5em; -margin-right:2%; -text-align:center; -color: white !important; + border-radius: 50%; + background-color: orange; + display: inline-block; + width: 1.5em; + height: 1.5em; + margin-right: 2%; + text-align: center; + color: white !important; /* stylelint-disable-line declaration-no-important */ } /* user image secions */ .hsuforum-thread-author, -.hsuforum-post-figure{ - text-align:center; +.hsuforum-post-figure { + text-align: center; } .hsuforum-thread-author .userpicture, -.hsuforum-post-figure .userpicture{ - width:75px; - max-width:100%; - height:auto; - border-radius:50%; - margin:0 auto; - display:block; +.hsuforum-post-figure .userpicture { + width: 75px; + max-width: 100%; + height: auto; + border-radius: 50%; + margin: 0 auto; + display: block; } .hsuforum-thread-participants .userpicture, .hsuforum-thread-replies-meta .userpicture, -.hsuforum-post-byline .userpicture{ +.hsuforum-post-byline .userpicture { display: inline-block; width: 32px; max-width: 32px; height: auto; - margin:0.3em 1.18%; - border-radius:50%; + margin: 0.3em 1.18%; + border-radius: 50%; vertical-align: middle; } - - /* unread posts flag */ .hsuforum-unreadcount { - background-color: #FFA500; - color: #FFF !important; - display:inline-block; - text-align:center; - padding:0 2.36%; - margin:0.3em 1.18%; - font-size:small; - line-height:2; - border-radius:3px; + background-color: #ffa500; + color: #fff !important; /* stylelint-disable-line declaration-no-important */ + display: inline-block; + text-align: center; + padding: 0 2.36%; + margin: 0.3em 1.18%; + font-size: small; + line-height: 2; + border-radius: 3px; } .hsuforum-post .hsuforum-unreadcount { - display:inline-block; - + display: inline-block; } -.post-word-count{ - font-size:small; - text-align:right; - font-style:oblique; +.post-word-count { + font-size: small; + text-align: right; + font-style: oblique; } - .hsuforum-thread-content .attachments { margin-top: 1em; } -.hsuforum-tools{ - font-family:'Roboto','Open sans','Helvetica Neue', Helvetica, Arial, sans-serif; - font-weight:normal; - padding-bottom:1em; +.hsuforum-tools { + font-family: 'Roboto', 'Open sans', 'Helvetica Neue', Helvetica, Arial, sans-serif; + font-weight: normal; + padding-bottom: 1em; } -.hsuforum-tools .hsuforum-reply-link{ - margin-left:0; +.hsuforum-tools .hsuforum-reply-link { + margin-left: 0; } .hsuforum-tools a:not(.btn) { padding: 0 0.2em; } - - - - /* ------------------------- ACTIONS -------------------------*/ .hsuforum-toggle { - display:inline-block; - border-radius:0; - padding:0 0.2em; - color:white !important; - font-family:"Roboto",'Helvetica Neue', Helvetica, Arial, sans-serif; + display: inline-block; + border-radius: 0; + padding: 0 0.2em; + color: white !important; /* stylelint-disable-line declaration-no-important */ + font-family: "Roboto", 'Helvetica Neue', Helvetica, Arial, sans-serif; } .hsuforum-toggle .svg-icon { - fill:#ddd; + fill: #ddd; width: 1.3em; height: 1.3em; - display:inline-block; + display: inline-block; } .hsuforum-toggle:hover, @@ -390,13 +377,13 @@ ACTIONS transform: scale(1.06); -webkit-transition: -webkit-transform .3s; transition: transform .3s; - background-color:#eee; + background-color: #eee; } .hsuforum-toggle-subscribe[aria-pressed="false"] .svg-icon, .hsuforum-toggle-substantive[aria-pressed="false"] .svg-icon, .hsuforum-toggle-bookmark[aria-pressed="false"] .svg-icon { - fill: #6c757d; + fill: #6c757d; } .hsuforum-toggle-subscribe[aria-pressed="true"] .svg-icon { @@ -404,11 +391,11 @@ ACTIONS } .hsuforum-toggle-substantive[aria-pressed="true"] .svg-icon { - fill:#5fa9dd; + fill: #5fa9dd; } .hsuforum-toggle-bookmark[aria-pressed="true"] .svg-icon { - fill:#f05454; + fill: #f05454; } /* ------------------------- @@ -419,8 +406,7 @@ FUN WITH FORMS clear: both; } - -.hsuforum-form fieldset{ +.hsuforum-form fieldset { margin: 0 auto; } @@ -443,12 +429,12 @@ FUN WITH FORMS -moz-appearance: textfield-multiline; -webkit-appearance: textarea; border: 1px solid #999; - padding: 0.5em 0.5em 0em 0.5em; + padding: 0.5em 0.5em 0 0.5em; font-size: 99%; min-height: 8em; overflow: auto; resize: both; - background-color:white; + background-color: white; } .hsuforum-post-body input[type=file], @@ -467,7 +453,6 @@ FUN WITH FORMS color: #999; } - .hsuforum-form button { clear: both; } @@ -489,32 +474,31 @@ FUN WITH FORMS text-align: center; } -.editor_atto_content_wrap, #editor-target-container_tbl { +.editor_atto_content_wrap, +#editor-target-container_tbl { margin-bottom: 0.5em; } - /* ------------------------- MEDIA Qs -------------------------*/ @media all and (min-width: 35em) { - #page-mod-hsuforum-view .groupselector{ + #page-mod-hsuforum-view .groupselector { text-align: right; } /* GRID ME UP */ - .hsuforum-thread-author{ + .hsuforum-thread-author { width: 18%; margin-right: 5.6%; float: left; } - .hsuforum-thread-header, - .hsuforum-thread-title{ + .hsuforum-thread-title { float: left; width: 76.4%; } - .hsuforum-thread-meta{ + .hsuforum-thread-meta { float: right; width: 23.6%; text-align: right; @@ -531,19 +515,19 @@ FUN WITH FORMS width: 84.27%; } - .depth0 .hsuforum-reply-wrapper{ + .depth0 .hsuforum-reply-wrapper { margin-left: 15.73%; } - .hsuform-post-date{ + .hsuform-post-date { float: right; line-height: 3; } - .hsuforum-post-byline{ + .hsuforum-post-byline { display: inline; } - .hsuforum-postflagging{ + .hsuforum-postflagging { float: right; } @@ -578,21 +562,29 @@ FUN WITH FORMS #menudsortdirection + input { display: inline; } - .hsuforum-parent-post-link{ + .hsuforum-parent-post-link { float: left; } - - - - .hsuforum-post[data-depth] .hsuforum-post-wrapper{ margin-left: 31.45%;} /* max depth catch all */ + .hsuforum-post[data-depth] .hsuforum-post-wrapper { + margin-left: 31.45%; /* max depth catch all */ + } /* 5.24 */ - .hsuforum-post[data-depth="0"] .hsuforum-post-wrapper{ margin-left: 0%;} - .hsuforum-post[data-depth="1"] .hsuforum-post-wrapper{ margin-left: 15.73%;} - .hsuforum-post[data-depth="2"] .hsuforum-post-wrapper{ margin-left: 20.97%;} - .hsuforum-post[data-depth="3"] .hsuforum-post-wrapper{ margin-left: 26.21%;} - .hsuforum-post[data-depth="4"] .hsuforum-post-wrapper{ margin-left: 31.45%;} - /* .hsuforum-post[data-depth="5"] .hsuforum-post-wrapper{margin-left:36.69%;} */ + .hsuforum-post[data-depth="0"] .hsuforum-post-wrapper { + margin-left: 0; + } + .hsuforum-post[data-depth="1"] .hsuforum-post-wrapper { + margin-left: 15.73%; + } + .hsuforum-post[data-depth="2"] .hsuforum-post-wrapper { + margin-left: 20.97%; + } + .hsuforum-post[data-depth="3"] .hsuforum-post-wrapper { + margin-left: 26.21%; + } + .hsuforum-post[data-depth="4"] .hsuforum-post-wrapper { + margin-left: 31.45%; + } } @media all and (min-width: 62em) { @@ -620,9 +612,8 @@ FUN WITH FORMS min-width: 80%; } - /* recent activity on course page in snap themes */ - #region-main .snap-activity.modtype_hsuforum .snap-media-object{ + #region-main .snap-activity.modtype_hsuforum .snap-media-object { width: 50%; float: left; } @@ -632,7 +623,7 @@ FUN WITH FORMS } } -@media (max-width:53em) and (min-width:48em) { +@media (max-width: 53em) and (min-width: 48em) { .section .activity.hsuforum.modtype_hsuforum .activityinstance > a { display: block; } @@ -657,12 +648,12 @@ FUN WITH FORMS float: none; } - .hsuforum-post-figure{ + .hsuforum-post-figure { float: left; } .hsuforum-post-figure .userpicture { - max-width: 50px; + max-width: 50px; } .hsuform-post-date, @@ -670,12 +661,12 @@ FUN WITH FORMS text-align: right; } - .hsuforum-thread{ + .hsuforum-thread { padding: 1em 1.18%; margin: 0 2.36%; } - .hsuforum-post-byline{ + .hsuforum-post-byline { font-size: 0.9em; line-height: 1; } @@ -683,7 +674,6 @@ FUN WITH FORMS /* end media 45 */ - /* recent activity, recent posts output in non-Snap themes */ .editing .sitetopic .section .activity.modtype_hsuforum .activityinstance, .editing .course-content .section .activity.modtype_hsuforum .activityinstance { @@ -721,7 +711,7 @@ FUN WITH FORMS overflow: hidden; width: 240px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); - display: block !important; + display: block !important; /* stylelint-disable-line declaration-no-important */ } .modtype_hsuforum .snap-media-body p, @@ -738,13 +728,13 @@ FUN WITH FORMS #snap-course-footer-recent-activity .hsuforum-recent h5 { color: inherit; font-size: 1em; - line-height:1; + line-height: 1; margin: 0; } .modtype_hsuforum .snap-media-body h5 small, .block_recent_activity .snap-media-body h5 small { - opacity: 0.75; + opacity: 0.75; } .modtype_hsuforum .snap-media-meta, @@ -775,17 +765,19 @@ FUN WITH FORMS width: auto; } -.discussnavigation:after{ +.discussnavigation:after { content: ''; clear: both; line-height: 1px; } -.discussnavigation .navigateprevious, .discussnavigation .navigatenext { +.discussnavigation .navigateprevious, +.discussnavigation .navigatenext { width: 50%; } -.discussnavigation .navigateprevious div:first-child, .discussnavigation .navigatenext div:first-child{ +.discussnavigation .navigateprevious div:first-child, +.discussnavigation .navigatenext div:first-child { font-variant: small-caps; } @@ -836,24 +828,24 @@ FUN WITH FORMS .path-mod-hsuforum .hsuforum-post-target:target { -webkit-animation: target-fade 3s 1; - animation: target-fade 3s 1; + animation: target-fade 3s 1; } @-webkit-keyframes target-fade { 0% { - background-color: rgba(0,0,0,.1); + background-color: rgba(0, 0, 0, .1); } 100% { - background-color: rgba(0,0,0,0); + background-color: rgba(0, 0, 0, 0); } } @keyframes target-fade { 0% { - background-color: rgba(0,0,0,.1); + background-color: rgba(0, 0, 0, .1); } 100% { - background-color: rgba(0,0,0,0); + background-color: rgba(0, 0, 0, 0); } } @@ -881,10 +873,12 @@ FUN WITH FORMS margin: 0.5em 0; } -#page-mod-hsuforum-view img.mceIcon, #page-mod-hsuforum-discuss img.mceIcon { - padding: 0px; +#page-mod-hsuforum-view img.mceIcon, +#page-mod-hsuforum-discuss img.mceIcon { + padding: 0; } -#page-mod-hsuforum-view span.mceIcon, #page-mod-hsuforum-discuss span.mceIcon { +#page-mod-hsuforum-view span.mceIcon, +#page-mod-hsuforum-discuss span.mceIcon { padding: 7px; } @@ -896,7 +890,7 @@ the use of id^="" */ #page-mod-hsuforum-discuss div[id^="editor-target-container"] textarea, #page-mod-hsuforum-view iframe[id^="editor-target-container"], #page-mod-hsuforum-discuss iframe[id^="editor-target-container"] { - min-height: 8em !important; + min-height: 8em !important; /* stylelint-disable-line declaration-no-important */ } #page-mod-hsuforum-view .editor-attachments, @@ -930,7 +924,8 @@ the use of id^="" */ height: inherit; } -.section li.snap-activity.modtype_hsuforum .snap-asset-content .snap-asset-meta .hsuforum-recent .snap-media-object .snap-media-body h5 { +.section li.snap-activity.modtype_hsuforum .snap-asset-content .snap-asset-meta .hsuforum-recent +.snap-media-object .snap-media-body h5 { font-size: 1em; } @@ -959,7 +954,7 @@ the use of id^="" */ #page-mod-hsuforum-view .floating-label input:focus + label, #page-mod-hsuforum-view .floating-label textarea:focus + label { color: #6c757d; - opacity: 1 !important; + opacity: 1 !important; /* stylelint-disable-line declaration-no-important */ } /** Float the label on focus and when text is entered */ @@ -993,8 +988,8 @@ the use of id^="" */ } body:not(.theme_snap) li.modtype_hsuforum .activity-item .activity-basis > div { - display: block !important; - flex-direction: unset !important; + display: block !important; /* stylelint-disable-line declaration-no-important */ + flex-direction: unset !important; /* stylelint-disable-line declaration-no-important */ } body:not(.theme_snap) li.modtype_hsuforum .afterlink { @@ -1017,10 +1012,11 @@ body:not(.theme_snap) li.modtype_hsuforum .afterlink .hsuforum-recent .snap-medi float: left; } body:not(.theme_snap) li.modtype_hsuforum .afterlink .hsuforum-recent { - margin-left: 0px; + margin-left: 0; width: 100%; } - .activity.modtype_hsuforum .snap-media-body, .block_recent_activity .snap-media-body { + .activity.modtype_hsuforum .snap-media-body, + .block_recent_activity .snap-media-body { width: auto; } .hsuforum.modtype_hsuforum .snap-media-object { @@ -1043,7 +1039,7 @@ div.hsuforum-post-body > .hsuforum-post-byline > span { .hsuforum-thread-body .hsuforum-thread-replies ol.hsuforum-thread-replies-list li.hsuforum-post div.hsuforum-post-wrapper div.hsuforum-post-body h6.hsuforum-post-byline span.hsuforum-unreadcount { width: 5em; - margin-top: 0px; + margin-top: 0; } .hsuforum-thread-body .hsuforum-thread-replies ol.hsuforum-thread-replies-list li.hsuforum-post div.hsuforum-post-wrapper diff --git a/tests/behat/add_forum.feature b/tests/behat/add_forum.feature index f2d6f5b8..cb4c75f4 100644 --- a/tests/behat/add_forum.feature +++ b/tests/behat/add_forum.feature @@ -72,4 +72,4 @@ Feature: Add Open Forum activities and discussions | Grade Type | Manual | # This final step is only to verify that the user can select something after the Manual option is chosen for grade type. And I set the following fields to these values: - | Grade category | Uncategorised | \ No newline at end of file + | Grade category | Uncategorised | diff --git a/tests/behat/advanced_editor_pass_data_to_new_page.feature b/tests/behat/advanced_editor_pass_data_to_new_page.feature index 83a4b025..53818e39 100644 --- a/tests/behat/advanced_editor_pass_data_to_new_page.feature +++ b/tests/behat/advanced_editor_pass_data_to_new_page.feature @@ -70,4 +70,4 @@ Feature: Users see their typed information in the advanced editor view when clic And I wait until the page is ready And ".text_to_html br" "css_element" should exist And I should see "Your reply" - And I set the field with xpath "//*[@id='id_messageeditable']" to "This is a reply" \ No newline at end of file + And I set the field with xpath "//*[@id='id_messageeditable']" to "This is a reply" diff --git a/tests/behat/anon_posting.feature b/tests/behat/anon_posting.feature index 9b4b7ccb..ea5f32a7 100644 --- a/tests/behat/anon_posting.feature +++ b/tests/behat/anon_posting.feature @@ -25,7 +25,7 @@ Feature: Students can post anonymously or not if they choose | Subject | Forum post subject | | Message | This is the body | - @javascript + @javascript Scenario: Add forum post anonymously Given I follow "Forum post subject" And I follow "Reply" @@ -47,7 +47,7 @@ Feature: Students can post anonymously or not if they choose And I should see "Anon post body" And I should see "Anonymous User" - @javascript + @javascript Scenario: Add forum post non-anonymously Given I follow "Forum post subject" And I follow "Reply" @@ -70,7 +70,7 @@ Feature: Students can post anonymously or not if they choose And I should see "Non-anon post body" And I should see "Student 1" - @javascript + @javascript Scenario: Edit forum post from anon to non-anon Given I follow "Forum post subject" And I should not see "Non anonymously" @@ -86,4 +86,3 @@ Feature: Students can post anonymously or not if they choose Then I should see "Edited post subject" And I should see "Edited post body" And I should see "Non anonymously" - diff --git a/tests/behat/discussion_navigation.feature b/tests/behat/discussion_navigation.feature index 04cd8679..64614810 100644 --- a/tests/behat/discussion_navigation.feature +++ b/tests/behat/discussion_navigation.feature @@ -4,7 +4,7 @@ Feature: A user can navigate to previous and next discussions in Open Forums As a user I need to click on the previous discussion link -Background: + Background: Given the following "users" exist: | username | firstname | lastname | email | | teacher1 | Teacher | 1 | teacher1@example.com | @@ -73,7 +73,7 @@ Background: And I should see "Discussion 3" @javascript - Scenario: A user can navigate between discussions with visible groups + Scenario: A user can navigate between discussions with visible groups Given the following "activities" exist: | activity | name | intro | course | idnumber | groupmode | | hsuforum | Test forum name | intro text | C1 | hsuforum | 2 | diff --git a/tests/behat/edit_post_student.feature b/tests/behat/edit_post_student.feature index 24147834..a7ed2125 100644 --- a/tests/behat/edit_post_student.feature +++ b/tests/behat/edit_post_student.feature @@ -23,7 +23,7 @@ Feature: Students can edit or delete their Open Forum posts within a set time li | Subject | Forum post subject | | Message | This is the body | - @javascript + @javascript Scenario: Edit forum post Given I follow "Forum post subject" And I follow "Edit" diff --git a/tests/behat/forum_posts_summary.feature b/tests/behat/forum_posts_summary.feature index de9294f3..3d322faf 100644 --- a/tests/behat/forum_posts_summary.feature +++ b/tests/behat/forum_posts_summary.feature @@ -64,4 +64,4 @@ Feature: Recent forum posts summary And I am on "Course 1" course homepage Then "//div[contains(@class, 'hsuforum-recent')]//h5[contains(text(), 'Student 1')]" "xpath_element" should exist And I click on "//div[contains(@class, 'hsuforum-recent')]//a" "xpath_element" - Then "//div[contains(@class, 'hsuforum-thread-author')]//a[contains(text(), 'Student 1')]" "xpath_element" should exist \ No newline at end of file + Then "//div[contains(@class, 'hsuforum-thread-author')]//a[contains(text(), 'Student 1')]" "xpath_element" should exist diff --git a/tests/behat/grading_settings.feature b/tests/behat/grading_settings.feature index af6f500a..1e9bd6d1 100644 --- a/tests/behat/grading_settings.feature +++ b/tests/behat/grading_settings.feature @@ -69,4 +69,4 @@ Feature: While creating a new activity, the grade settings should remain in the And I should see "Grade category 1" And I should see "Test forum name" And "//h4[contains(text(), 'Grade category 1')]" "xpath_element" should exist - And "//a[contains(text(), 'Test forum name')]" "xpath_element" should exist \ No newline at end of file + And "//a[contains(text(), 'Test forum name')]" "xpath_element" should exist diff --git a/tests/behat/hsuforum_tags.feature b/tests/behat/hsuforum_tags.feature index 8174cb2e..5744f2fc 100644 --- a/tests/behat/hsuforum_tags.feature +++ b/tests/behat/hsuforum_tags.feature @@ -107,4 +107,4 @@ Feature: Open forum posts and new discussions handle tags correctly, in order to And I set the field "Tags" to "OT1" And I press "Post to forum" And I follow "Subject test" - And I should see "OT1" \ No newline at end of file + And I should see "OT1" diff --git a/tests/behat/inline_edit.feature b/tests/behat/inline_edit.feature index a10724ab..e8de4003 100644 --- a/tests/behat/inline_edit.feature +++ b/tests/behat/inline_edit.feature @@ -69,4 +69,3 @@ Feature: Teachers and students can add discussions inline | subject | message | | Test discussion 1 | Test discussion 1 description | And I should see "Your post was successfully added." - diff --git a/tests/behat/my_profile.feature b/tests/behat/my_profile.feature index 694c0d55..d91772bb 100644 --- a/tests/behat/my_profile.feature +++ b/tests/behat/my_profile.feature @@ -4,7 +4,7 @@ Feature: A user can see a link to their Open Forum posts in their profile As a user I need to click on the link in the profile page -Background: + Background: Given the following "users" exist: | username | firstname | lastname | email | | teacher1 | Teacher | 1 | teacher1@example.com | @@ -46,4 +46,3 @@ Background: Then I should see "Discussion 1" And I should see "Discussion 2" And I should see "Discussion 3" - diff --git a/tests/behat/post_to_multiple_groups.feature b/tests/behat/post_to_multiple_groups.feature index 3c403ccd..a25cf728 100644 --- a/tests/behat/post_to_multiple_groups.feature +++ b/tests/behat/post_to_multiple_groups.feature @@ -62,7 +62,6 @@ Feature: In Open Forums a user with access to multiple groups should be able to | hsuforum | Visible group forum | Test forum name | C1 | forum | 2 | | | hsuforum | Groupings forum | Test forum name | C2 | forum | 1 | G1 | - @javascript Scenario: Teacher is able to post a copy of a message to all groups in a separate group forum via ajax Given I log in as "teacher1" @@ -109,7 +108,7 @@ Feature: In Open Forums a user with access to multiple groups should be able to And I am on "Course 1" course homepage And I follow "Separate group forum" And I should see "Discussion 1" - + @javascript Scenario: Teacher is able to post a copy of a message to all groups in a visible group forum via ajax Given I log in as "teacher1" diff --git a/yui/build/moodle-mod_hsuforum-livelog/moodle-mod_hsuforum-livelog-min.js b/yui/build/moodle-mod_hsuforum-livelog/moodle-mod_hsuforum-livelog-min.js index 8705aae1..97139f1a 100644 --- a/yui/build/moodle-mod_hsuforum-livelog/moodle-mod_hsuforum-livelog-min.js +++ b/yui/build/moodle-mod_hsuforum-livelog/moodle-mod_hsuforum-livelog-min.js @@ -1 +1 @@ -YUI.add("moodle-mod_hsuforum-livelog",function(i,t){function a(){a.superclass.constructor.apply(this,arguments)}a.NAME=t,a.ATTRS={logBox:{value:i.Node.create("
"),readOnly:!0},classNames:{value:"accesshide",validator:i.Lang.isString},logTemplate:{value:"

",validator:i.Lang.isString},ariaLive:{value:"polite",validator:i.Lang.isString},ariaRelevant:{value:"additions text",validator:i.Lang.isString},ariaAtomic:{value:"false",validator:i.Lang.isString}},i.extend(a,i.Widget,{renderUI:function(){this.get("contentBox").append(this.get("logBox")),this._updateAttributes()},bindUI:function(){this.after(["ariaLiveChange","ariaRelevantChange","ariaAtomicChange","classNamesChange"],this._updateAttributes,this)},logText:function(t){var e=i.Node.create(this.get("logTemplate"));e.set("text",t),this.logNode(e)},logNode:function(t){this.get("logBox").append(t),this.fire("logAdded",{},t)},_updateAttributes:function(){this.get("logBox").setAttribute("role","log").setAttribute("class",this.get("classNames")).setAttribute("aria-relevant",this.get("ariaRelevant")).setAttribute("aria-atomic",this.get("ariaAtomic")).setAttribute("aria-live",this.get("ariaLive"))}}),M.mod_hsuforum=M.mod_hsuforum||{},M.mod_hsuforum.LiveLog=a,M.mod_hsuforum.init_livelog=function(t){var e=new a(t);return e.render(),e}},"@VERSION@",{requires:["widget"]}); \ No newline at end of file +YUI.add("moodle-mod_hsuforum-livelog",function(i,t){function e(){e.superclass.constructor.apply(this,arguments)}e.NAME=t,e.ATTRS={logBox:{value:i.Node.create("
"),readOnly:!0},classNames:{value:"accesshide",validator:i.Lang.isString},logTemplate:{value:"

",validator:i.Lang.isString},ariaLive:{value:"polite",validator:i.Lang.isString},ariaRelevant:{value:"additions text",validator:i.Lang.isString},ariaAtomic:{value:"false",validator:i.Lang.isString}},i.extend(e,i.Widget,{renderUI:function(){this.get("contentBox").append(this.get("logBox")),this._updateAttributes()},bindUI:function(){this.after(["ariaLiveChange","ariaRelevantChange","ariaAtomicChange","classNamesChange"],this._updateAttributes,this)},logText:function(t){var e=i.Node.create(this.get("logTemplate"));e.set("text",t),this.logNode(e)},logNode:function(t){this.get("logBox").append(t),this.fire("logAdded",{},t)},_updateAttributes:function(){this.get("logBox").setAttribute("role","log").setAttribute("class",this.get("classNames")).setAttribute("aria-relevant",this.get("ariaRelevant")).setAttribute("aria-atomic",this.get("ariaAtomic")).setAttribute("aria-live",this.get("ariaLive"))}}),M.mod_hsuforum=M.mod_hsuforum||{},M.mod_hsuforum.LiveLog=e,M.mod_hsuforum.init_livelog=function(t){t=new e(t);return t.render(),t}},"@VERSION@",{requires:["widget"]}); \ No newline at end of file