MDL-66893 mod_forum: update navigation bar in grader UI
This commit is contained in:
@@ -195,6 +195,7 @@ class icon_system_fontawesome extends icon_system_font {
|
||||
'core:i/assignroles' => 'fa-user-plus',
|
||||
'core:i/backup' => 'fa-file-zip-o',
|
||||
'core:i/badge' => 'fa-shield',
|
||||
'core:i/breadcrumbdivider' => 'fa-angle-right',
|
||||
'core:i/calc' => 'fa-calculator',
|
||||
'core:i/calendar' => 'fa-calendar',
|
||||
'core:i/calendareventdescription' => 'fa-align-left',
|
||||
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
define ("mod_forum/grades/grader",["exports","./grader/selectors","mod_forum/repository","core/templates","../local/grades/grader","core/notification","core_course/repository"],function(a,b,c,d,e,f,g){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.registerLaunchListeners=void 0;b=i(b);c=h(c);d=h(d);e=i(e);f=h(f);g=h(g);function h(a){return a&&a.__esModule?a:{default:a}}function i(a){if(a&&a.__esModule){return a}else{var b={};if(null!=a){for(var c in a){if(Object.prototype.hasOwnProperty.call(a,c)){var d=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(a,c):{};if(d.get||d.set){Object.defineProperty(b,c,d)}else{b[c]=a[c]}}}}b.default=a;return b}}function j(a,b,c,d,e,f,g){try{var h=a[f](g),i=h.value}catch(a){c(a);return}if(h.done){b(i)}else{Promise.resolve(i).then(d,e)}}function k(a){return function(){var b=this,c=arguments;return new Promise(function(d,e){var h=a.apply(b,c);function f(a){j(h,d,e,f,g,"next",a)}function g(a){j(h,d,e,f,g,"throw",a)}f(void 0)})}}var l={contentRegion:"mod_forum/grades/grader/discussion/posts"},m=function(a){return function(b){return c.default.getDiscussionByUserID(b,a).then(function(a){a.discussions=a.discussions.map(p);return d.default.render(l.contentRegion,a)}).catch(f.default.exception)}},n=function(a){return k(regeneratorRuntime.mark(function b(){var c;return regeneratorRuntime.wrap(function(b){while(1){switch(b.prev=b.next){case 0:b.next=2;return g.default.getUsersFromCourseModuleID(a);case 2:c=b.sent;return b.abrupt("return",c.users);case 4:case"end":return b.stop();}}},b)}))},o=function(a){return a.closest(b.gradableItem)},p=function(a){var b=new Map;a.posts.parentposts.forEach(function(a){return b.set(a.id,a)});var c=a.posts.userposts.map(function(a){a.subject=null;a.readonly=!0;a.starter=!a.parentid;a.parent=b.get(a.parentid);a.html.rating=null;return a});return{id:a.id,name:a.name,posts:c}},q=function(){var a=k(regeneratorRuntime.mark(function a(b){var c,d;return regeneratorRuntime.wrap(function(a){while(1){switch(a.prev=a.next){case 0:c=b.dataset;a.next=3;return e.getGradingPanelFunctions("mod_forum",c.contextid,c.gradingComponent,c.gradingComponentSubtype,c.gradableItemtype);case 3:d=a.sent;a.next=6;return e.launch(n(c.cmid),m(c.cmid),d.getter,d.setter,{groupid:c.groupid,initialUserId:c.initialuserid,moduleName:c.name});case 6:case"end":return a.stop();}}},a)}));return function(){return a.apply(this,arguments)}}();a.registerLaunchListeners=function registerLaunchListeners(){document.addEventListener("click",function(){var a=k(regeneratorRuntime.mark(function a(c){var d;return regeneratorRuntime.wrap(function(a){while(1){switch(a.prev=a.next){case 0:if(!c.target.matches(b.launch)){a.next=17;break}d=o(c.target);if(d){a.next=4;break}throw Error("Unable to find a gradable item");case 4:if(!d.matches(b.gradableItems.wholeForum)){a.next=16;break}c.preventDefault();a.prev=6;a.next=9;return q(d);case 9:a.next=14;break;case 11:a.prev=11;a.t0=a["catch"](6);f.default.exception(a.t0);case 14:a.next=17;break;case 16:throw Error("Unable to find a valid gradable item");case 17:case"end":return a.stop();}}},a,null,[[6,11]])}));return function(){return a.apply(this,arguments)}}())}});
|
||||
define ("mod_forum/grades/grader",["exports","./grader/selectors","mod_forum/repository","core/templates","../local/grades/grader","core/notification","core_course/repository","core/url"],function(a,b,c,d,e,f,g,h){"use strict";Object.defineProperty(a,"__esModule",{value:!0});a.registerLaunchListeners=void 0;b=j(b);c=i(c);d=i(d);e=j(e);f=i(f);g=i(g);function i(a){return a&&a.__esModule?a:{default:a}}function j(a){if(a&&a.__esModule){return a}else{var b={};if(null!=a){for(var c in a){if(Object.prototype.hasOwnProperty.call(a,c)){var d=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(a,c):{};if(d.get||d.set){Object.defineProperty(b,c,d)}else{b[c]=a[c]}}}}b.default=a;return b}}function k(a,b,c,d,e,f,g){try{var h=a[f](g),i=h.value}catch(a){c(a);return}if(h.done){b(i)}else{Promise.resolve(i).then(d,e)}}function l(a){return function(){var b=this,c=arguments;return new Promise(function(d,e){var h=a.apply(b,c);function f(a){k(h,d,e,f,g,"next",a)}function g(a){k(h,d,e,f,g,"throw",a)}f(void 0)})}}var m={contentRegion:"mod_forum/grades/grader/discussion/posts"},n=function(a){return function(b){return c.default.getDiscussionByUserID(b,a).then(function(a){a.discussions=a.discussions.map(q);return d.default.render(m.contentRegion,a)}).catch(f.default.exception)}},o=function(a){return l(regeneratorRuntime.mark(function b(){var c;return regeneratorRuntime.wrap(function(b){while(1){switch(b.prev=b.next){case 0:b.next=2;return g.default.getUsersFromCourseModuleID(a);case 2:c=b.sent;return b.abrupt("return",c.users);case 4:case"end":return b.stop();}}},b)}))},p=function(a){return a.closest(b.gradableItem)},q=function(a){var b=new Map;a.posts.parentposts.forEach(function(a){return b.set(a.id,a)});var c=a.posts.userposts.map(function(a){a.subject=null;a.readonly=!0;a.starter=!a.parentid;a.parent=b.get(a.parentid);a.html.rating=null;return a});return{id:a.id,name:a.name,posts:c}},r=function(){var a=l(regeneratorRuntime.mark(function a(b){var c,d;return regeneratorRuntime.wrap(function(a){while(1){switch(a.prev=a.next){case 0:c=b.dataset;a.next=3;return e.getGradingPanelFunctions("mod_forum",c.contextid,c.gradingComponent,c.gradingComponentSubtype,c.gradableItemtype);case 3:d=a.sent;a.next=6;return e.launch(o(c.cmid),n(c.cmid),d.getter,d.setter,{groupid:c.groupid,initialUserId:c.initialuserid,moduleName:c.name,courseName:c.courseName,courseUrl:(0,h.relativeUrl)("/course/view.php",{id:c.courseId})});case 6:case"end":return a.stop();}}},a)}));return function(){return a.apply(this,arguments)}}();a.registerLaunchListeners=function registerLaunchListeners(){document.addEventListener("click",function(){var a=l(regeneratorRuntime.mark(function a(c){var d;return regeneratorRuntime.wrap(function(a){while(1){switch(a.prev=a.next){case 0:if(!c.target.matches(b.launch)){a.next=17;break}d=p(c.target);if(d){a.next=4;break}throw Error("Unable to find a gradable item");case 4:if(!d.matches(b.gradableItems.wholeForum)){a.next=16;break}c.preventDefault();a.prev=6;a.next=9;return r(d);case 9:a.next=14;break;case 11:a.prev=11;a.t0=a["catch"](6);f.default.exception(a.t0);case 14:a.next=17;break;case 16:throw Error("Unable to find a valid gradable item");case 17:case"end":return a.stop();}}},a,null,[[6,11]])}));return function(){return a.apply(this,arguments)}}())}});
|
||||
//# sourceMappingURL=grader.min.js.map
|
||||
|
||||
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -27,6 +27,7 @@ import Templates from 'core/templates';
|
||||
import * as Grader from '../local/grades/grader';
|
||||
import Notification from 'core/notification';
|
||||
import CourseRepository from 'core_course/repository';
|
||||
import {relativeUrl} from 'core/url';
|
||||
|
||||
const templateNames = {
|
||||
contentRegion: 'mod_forum/grades/grader/discussion/posts',
|
||||
@@ -120,7 +121,9 @@ const launchWholeForumGrading = async(rootNode) => {
|
||||
{
|
||||
groupid: data.groupid,
|
||||
initialUserId: data.initialuserid,
|
||||
moduleName: data.name
|
||||
moduleName: data.name,
|
||||
courseName: data.courseName,
|
||||
courseUrl: relativeUrl('/course/view.php', {id: data.courseId})
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
@@ -185,7 +185,7 @@ const displayGradingError = async(root, user, err) => {
|
||||
* @param {Function} setGradeForUser A function to set the grade for a specific user
|
||||
*/
|
||||
export const launch = async(getListOfUsers, getContentForUser, getGradeForUser, setGradeForUser, {
|
||||
initialUserId = null, moduleName
|
||||
initialUserId = null, moduleName, courseName, courseUrl
|
||||
} = {}) => {
|
||||
|
||||
// We need all of these functions to be executed in series, if one step runs before another the interface
|
||||
@@ -198,6 +198,8 @@ export const launch = async(getListOfUsers, getContentForUser, getGradeForUser,
|
||||
createFullScreenWindow({fullscreen: false, showLoader: false}),
|
||||
Templates.renderForPromise(templateNames.grader.app, {
|
||||
moduleName,
|
||||
courseName,
|
||||
courseUrl,
|
||||
drawer: {show: true}
|
||||
}),
|
||||
getListOfUsers(),
|
||||
|
||||
@@ -101,6 +101,7 @@ $string['clicktounsubscribe'] = 'You are subscribed to this discussion. Click to
|
||||
$string['clicktosubscribe'] = 'You are not subscribed to this discussion. Click to subscribe.';
|
||||
$string['clicktounfavourite'] = 'You have starred this discussion. Click to unstar.';
|
||||
$string['clicktofavourite'] = 'You have not starred this discussion. Click to star.';
|
||||
$string['close'] = 'Close';
|
||||
$string['completiondiscussions'] = 'Student must create discussions:';
|
||||
$string['completiondiscussionsdesc'] = 'Student must create at least {$a} discussion(s)';
|
||||
$string['completiondiscussionsgroup'] = 'Require discussions';
|
||||
@@ -333,6 +334,7 @@ $string['generalforum'] = 'Standard forum for general use';
|
||||
$string['generalforums'] = 'General forums';
|
||||
$string['gradeitem:forum'] = 'Forum';
|
||||
$string['hiddenforumpost'] = 'Hidden forum post';
|
||||
$string['hidegraderpanel'] = 'Hide grader panel';
|
||||
$string['hidepreviousrepliescount'] = 'Hide previous replies ({$a})';
|
||||
$string['indicator:cognitivedepth'] = 'Forum cognitive';
|
||||
$string['indicator:cognitivedepth_help'] = 'This indicator is based on the cognitive depth reached by the student in a Forum activity.';
|
||||
@@ -628,6 +630,7 @@ $string['seeallposts'] = 'See all posts made by this user';
|
||||
$string['settings'] = 'Settings';
|
||||
$string['shortpost'] = 'Short post';
|
||||
$string['showingcountoftotaldiscussions'] = 'Showing {$a->count} of {$a->total} discussions';
|
||||
$string['showgraderpanel'] = 'Show grader panel';
|
||||
$string['showpreviousrepliescount'] = 'Show previous replies ({$a})';
|
||||
$string['showsubscribers'] = 'Show/edit current subscribers';
|
||||
$string['singleforum'] = 'A single simple discussion';
|
||||
@@ -671,6 +674,7 @@ $string['timedhidden'] = 'Timed status: Hidden from students';
|
||||
$string['timedposts'] = 'Timed posts';
|
||||
$string['timedvisible'] = 'Timed status: Visible to all users';
|
||||
$string['timestartenderror'] = 'Display end date cannot be earlier than the start date';
|
||||
$string['togglefullscreen'] = 'Toggle full screen';
|
||||
$string['togglesettingsdrawer'] = 'Toggle settings drawer';
|
||||
$string['trackforum'] = 'Track unread posts';
|
||||
$string['trackreadposts_header'] = 'Forum tracking';
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 585 B |
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="23px" height="24px" viewBox="0 0 23 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 59.1 (86144) - https://sketch.com -->
|
||||
<title>Group 3</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<g id="Grading" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="Grading-Copy-4" transform="translate(-1072.000000, -21.000000)">
|
||||
<g id="Group-3" transform="translate(1072.000000, 21.500000)">
|
||||
<g id="left-arrow" transform="translate(0.000000, 6.795455)" fill="#000000" fill-rule="nonzero">
|
||||
<path d="M9.86688101,3.53622875 L9.8832003,3.5397986 L2.88749446,3.5397986 L5.08668884,1.33575942 C5.19437916,1.2281541 5.25345159,1.08238544 5.25345159,0.929392092 C5.25345159,0.776398744 5.19437916,0.631650037 5.08668884,0.523789727 L4.74449372,0.181424612 C4.6368884,0.0738192905 4.49349963,0.0143218773 4.34059128,0.0143218773 C4.18759793,0.0143218773 4.04412417,0.0733943089 3.93651885,0.18099963 L0.166677753,3.95050074 C0.0586474501,4.05853104 -0.000424981523,4.20242979 -2.27716707e-06,4.35550813 C-0.000424981523,4.50943644 0.0586474501,4.65342018 0.166677753,4.76128049 L3.93651885,8.53112158 C4.04412417,8.63864191 4.18751293,8.69779933 4.34059128,8.69779933 C4.49349963,8.69779933 4.6368884,8.63855691 4.74449372,8.53112158 L5.08668884,8.18875647 C5.19437916,8.08132114 5.25345159,7.93784738 5.25345159,7.78485403 C5.25345159,7.63194568 5.19437916,7.49603659 5.08668884,7.38851626 L2.86267554,5.17215262 L9.87470067,5.17215262 C10.189782,5.17215262 10.4545455,4.90058943 10.4545455,4.58567812 L10.4545455,4.10145418 C10.4545455,3.78654287 10.1819623,3.53622875 9.86688101,3.53622875 Z" id="Path"></path>
|
||||
</g>
|
||||
<g id="left-arrow" transform="translate(17.772727, 11.151515) rotate(180.000000) translate(-17.772727, -11.151515) translate(12.545455, 6.795455)" fill="#000000" fill-rule="nonzero">
|
||||
<path d="M9.86688101,3.53622875 L9.8832003,3.5397986 L2.88749446,3.5397986 L5.08668884,1.33575942 C5.19437916,1.2281541 5.25345159,1.08238544 5.25345159,0.929392092 C5.25345159,0.776398744 5.19437916,0.631650037 5.08668884,0.523789727 L4.74449372,0.181424612 C4.6368884,0.0738192905 4.49349963,0.0143218773 4.34059128,0.0143218773 C4.18759793,0.0143218773 4.04412417,0.0733943089 3.93651885,0.18099963 L0.166677753,3.95050074 C0.0586474501,4.05853104 -0.000424981523,4.20242979 -2.27716707e-06,4.35550813 C-0.000424981523,4.50943644 0.0586474501,4.65342018 0.166677753,4.76128049 L3.93651885,8.53112158 C4.04412417,8.63864191 4.18751293,8.69779933 4.34059128,8.69779933 C4.49349963,8.69779933 4.6368884,8.63855691 4.74449372,8.53112158 L5.08668884,8.18875647 C5.19437916,8.08132114 5.25345159,7.93784738 5.25345159,7.78485403 C5.25345159,7.63194568 5.19437916,7.49603659 5.08668884,7.38851626 L2.86267554,5.17215262 L9.87470067,5.17215262 C10.189782,5.17215262 10.4545455,4.90058943 10.4545455,4.58567812 L10.4545455,4.10145418 C10.4545455,3.78654287 10.1819623,3.53622875 9.86688101,3.53622875 Z" id="Path"></path>
|
||||
</g>
|
||||
<g id="Group-2" transform="translate(0.522727, 0.000000)" stroke="#000000" stroke-linecap="square" stroke-width="2">
|
||||
<path d="M0.522727273,0.522727273 L21.4318182,0.522727273 M0.522727273,0.522727273 L0.522727273,3.13636364 M21.4318182,0.522727273 L21.4318182,3.13636364" id="Combined-Shape"></path>
|
||||
</g>
|
||||
<g id="Group-2" transform="translate(11.500000, 21.431818) scale(1, -1) translate(-11.500000, -21.431818) translate(0.522727, 19.863636)" stroke="#000000" stroke-linecap="square" stroke-width="2">
|
||||
<path d="M0.522727273,0.522727273 L21.4318182,0.522727273 M0.522727273,0.522727273 L0.522727273,3.13636364 M21.4318182,0.522727273 L21.4318182,3.13636364" id="Combined-Shape"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 595 B |
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 59.1 (86144) - https://sketch.com -->
|
||||
<title>show</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<g id="Grading" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="Grading-Copy-4" transform="translate(-1070.000000, -21.000000)" fill="#000000" fill-rule="nonzero">
|
||||
<g id="show" transform="translate(1082.000000, 33.000000) rotate(180.000000) translate(-1082.000000, -33.000000) translate(1070.000000, 21.000000)">
|
||||
<path d="M3.75,13.7454044 L7.96875,13.7454044 L7.96875,15.6204044 L3.75,15.6204044 L3.75,13.7454044 Z M3.75,11.8760807 L7.96875,11.8760807 L7.96875,10.0010807 L3.75,10.0010807 L3.75,11.8760807 Z M3.75,6.39170569 L3.75,8.26670569 L7.96875,8.26670569 L7.96875,6.39170569 L3.75,6.39170569 Z M3.75,19.2297794 L7.96875,19.2297794 L7.96875,17.3547794 L3.75,17.3547794 L3.75,19.2297794 Z M24,2.8125 L24,21.1875 C24,22.7384033 22.7384033,24 21.1875,24 L2.8125,24 C1.26159666,24 0,22.7384033 0,21.1875 L0,2.8125 C0,1.26159666 1.26159666,0 2.8125,0 L21.1875,0 C22.7384033,0 24,1.26159666 24,2.8125 Z M2.8125,22.125 L9.84375,22.125 L9.84375,1.875 L2.8125,1.875 C2.29559325,1.875 1.875,2.29559325 1.875,2.8125 L1.875,21.1875 C1.875,21.7044068 2.29559325,22.125 2.8125,22.125 Z M22.125,2.8125 C22.125,2.29559325 21.7044067,1.875 21.1875,1.875 L11.71875,1.875 L11.71875,10.921875 L16.7678833,10.921875 L14.6116333,8.765625 L15.9375,7.43975831 L20.3571167,11.859375 L15.9375,16.2789917 L14.6116333,14.953125 L16.7678833,12.796875 L11.71875,12.796875 L11.71875,22.125 L21.1875,22.125 C21.7044067,22.125 22.125,21.7044068 22.125,21.1875 L22.125,2.8125 Z" id="Shape" transform="translate(12.000000, 12.000000) scale(-1, 1) translate(-12.000000, -12.000000) "></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.9 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 612 B |
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 59.1 (86144) - https://sketch.com -->
|
||||
<title>show</title>
|
||||
<desc>Created with Sketch.</desc>
|
||||
<g id="Grading" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="Grading-Copy-4" transform="translate(-1028.000000, -21.000000)" fill="#000000" fill-rule="nonzero">
|
||||
<g id="show" transform="translate(1040.000000, 33.000000) rotate(180.000000) translate(-1040.000000, -33.000000) translate(1028.000000, 21.000000)">
|
||||
<path d="M3.75,13.7454044 L7.96875,13.7454044 L7.96875,15.6204044 L3.75,15.6204044 L3.75,13.7454044 Z M3.75,11.8760807 L7.96875,11.8760807 L7.96875,10.0010807 L3.75,10.0010807 L3.75,11.8760807 Z M3.75,6.39170569 L3.75,8.26670569 L7.96875,8.26670569 L7.96875,6.39170569 L3.75,6.39170569 Z M3.75,19.2297794 L7.96875,19.2297794 L7.96875,17.3547794 L3.75,17.3547794 L3.75,19.2297794 Z M24,2.8125 L24,21.1875 C24,22.7384033 22.7384033,24 21.1875,24 L2.8125,24 C1.26159666,24 0,22.7384033 0,21.1875 L0,2.8125 C0,1.26159666 1.26159666,0 2.8125,0 L21.1875,0 C22.7384033,0 24,1.26159666 24,2.8125 Z M2.8125,22.125 L9.84375,22.125 L9.84375,1.875 L2.8125,1.875 C2.29559325,1.875 1.875,2.29559325 1.875,2.8125 L1.875,21.1875 C1.875,21.7044068 2.29559325,22.125 2.8125,22.125 Z M22.125,2.8125 C22.125,2.29559325 21.7044067,1.875 21.1875,1.875 L11.71875,1.875 L11.71875,10.921875 L16.7678833,10.921875 L14.6116333,8.765625 L15.9375,7.43975831 L20.3571167,11.859375 L15.9375,16.2789917 L14.6116333,14.953125 L16.7678833,12.796875 L11.71875,12.796875 L11.71875,22.125 L21.1875,22.125 C21.7044067,22.125 22.125,21.7044068 22.125,21.1875 L22.125,2.8125 Z" id="Shape"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
@@ -33,6 +33,8 @@
|
||||
}}data-contextid="{{contextid}}" {{!
|
||||
}}data-cmid="{{cmid}}" {{!
|
||||
}}data-name="{{name}}" {{!
|
||||
}}data-course-id="{{courseid}}" {{!
|
||||
}}data-course-name="{{coursename}}" {{!
|
||||
}}data-group="{{groupid}}" {{!
|
||||
}}data-grading-component="{{gradingcomponent}}" {{!
|
||||
}}data-grading-component-subtype="{{gradingcomponentsubtype}}" {{!
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
}
|
||||
}}
|
||||
<div
|
||||
id="grader-container-{{uniqid}}"
|
||||
class="d-flex flex-column h-100 unified-grader"
|
||||
data-region="unified-grader"
|
||||
{{#userid}}data-first-userid="{{.}}"{{/userid}}
|
||||
@@ -47,3 +48,27 @@
|
||||
{{> mod_forum/local/grades/local/grader/content }}
|
||||
</div>
|
||||
</div>
|
||||
{{#js}}
|
||||
require(['jquery', 'core/drawer'], function($, Drawer) {
|
||||
var root = $('#grader-container-{{uniqid}}');
|
||||
var drawer = root.find('[data-region="right-hand-drawer"]');
|
||||
var expandButtons = root.find('[data-action="expand-grading-drawer"]');
|
||||
var collapseButtons = root.find('[data-action="collapse-grading-drawer"]');
|
||||
|
||||
expandButtons.click(function() {
|
||||
collapseButtons.removeClass('active');
|
||||
expandButtons.addClass('active');
|
||||
collapseButtons.attr('aria-expanded', true);
|
||||
expandButtons.attr('aria-expanded', true);
|
||||
Drawer.show(drawer);
|
||||
});
|
||||
|
||||
collapseButtons.click(function() {
|
||||
expandButtons.removeClass('active');
|
||||
collapseButtons.addClass('active');
|
||||
collapseButtons.attr('aria-expanded', false);
|
||||
expandButtons.attr('aria-expanded', false);
|
||||
Drawer.hide(drawer);
|
||||
});
|
||||
});
|
||||
{{/js}}
|
||||
|
||||
@@ -34,27 +34,78 @@
|
||||
"moduleName": "Chef the Forum"
|
||||
}
|
||||
}}
|
||||
<div class="grader-grading_navigation col-sm-12">
|
||||
<div class="row">
|
||||
<div class="col-sm-12 col-md-8 py-3">
|
||||
<div class="d-block">
|
||||
<h6 class="d-inline btn px-0 font-weight-bold text-muted mb-0">{{moduleName}}</h6>
|
||||
<h6 class="d-inline btn px-0 font-weight-bold text-muted mb-0"> > </h6>
|
||||
<h6 class="d-inline btn px-0 font-weight-bold mb-0">{{#str}}grading, forum{{/str}}</h6>
|
||||
<nav id="nav-container-{{uniqid}}" class="grader-grading_navigation navbar">
|
||||
<div class="d-none d-sm-flex align-items-center">
|
||||
<a href="{{{courseUrl}}}" class="btn btn-link px-2 colour-inherit">
|
||||
<h5 class="d-inline px-0 mb-0">{{courseName}}</h5>
|
||||
</a>
|
||||
<span class="text-muted icon-no-margin">{{#pix}} i/breadcrumbdivider, core {{/pix}}</span>
|
||||
<button class="btn btn-link px-2 colour-inherit" data-action="closegrader">
|
||||
<h5 class="d-inline px-0 mb-0">{{moduleName}}</h5>
|
||||
</button>
|
||||
<span class="text-muted icon-no-margin">{{#pix}} i/breadcrumbdivider, core {{/pix}}</span>
|
||||
<h5 class="d-inline px-2 mb-0 font-weight-bold">{{#str}}grading, forum{{/str}}</h5>
|
||||
</div>
|
||||
|
||||
<div class="ml-auto">
|
||||
<button
|
||||
class="btn btn-icon icon-no-margin drawer-button mr-1 active"
|
||||
data-action="expand-grading-drawer"
|
||||
aria-controls="grading-drawer"
|
||||
aria-expanded="true"
|
||||
type="button"
|
||||
title="{{#str}} showgraderpanel, mod_forum {{/str}}"
|
||||
>
|
||||
<span class="dir-ltr-hide" aria-hidden="true">{{#pix}} show-grader-panel-rtl, mod_forum, {{#str}} showgraderpanel, mod_forum {{/str}} {{/pix}}</span>
|
||||
<span class="dir-rtl-hide" aria-hidden="true">{{#pix}} show-grader-panel, mod_forum, {{#str}} showgraderpanel, mod_forum {{/str}} {{/pix}}</span>
|
||||
</button>
|
||||
<button
|
||||
class="btn btn-icon icon-no-margin drawer-button mr-1"
|
||||
aria-label="Open or close grader panel"
|
||||
data-action="collapse-grading-drawer"
|
||||
aria-controls="grading-drawer"
|
||||
aria-expanded="true"
|
||||
type="button"
|
||||
title="{{#str}} hidegraderpanel, mod_forum {{/str}}"
|
||||
>
|
||||
<span aria-hidden="true">{{#pix}} hide-grader-panel, mod_forum, {{#str}} hidegraderpanel, mod_forum {{/str}} {{/pix}}</span>
|
||||
</button>
|
||||
<button
|
||||
class="btn btn-primary font-weight-bold ml-2 px-4"
|
||||
data-action="savegrade"
|
||||
>
|
||||
{{#str}} save {{/str}}
|
||||
</button>
|
||||
<button
|
||||
class="btn btn-secondary font-weight-bold ml-2 px-4"
|
||||
aria-label="{{#str}} closegrader, mod_forum {{/str}}"
|
||||
data-action="closegrader"
|
||||
type="button"
|
||||
>
|
||||
{{#str}} close, mod_forum {{/str}}
|
||||
</button>
|
||||
<div class="btn-group">
|
||||
<button
|
||||
class="btn btn-icon text-muted icon-no-margin icon-size-3 ml-2"
|
||||
type="button"
|
||||
id="grader-actions-menu-{{uniqid}}"
|
||||
data-toggle="dropdown"
|
||||
aria-haspopup="true"
|
||||
aria-expanded="false"
|
||||
aria-label="{{#str}} actionsforgraderinterface, mod_forum {{/str}}"
|
||||
>
|
||||
{{#pix}} i/menu, core {{/pix}}
|
||||
</button>
|
||||
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="grader-actions-menu-{{uniqid}}">
|
||||
<button
|
||||
class="dropdown-item"
|
||||
type="button"
|
||||
data-action="togglefullscreen"
|
||||
type="button"
|
||||
>
|
||||
{{#str}} togglefullscreen, mod_forum {{/str}}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-sm-12 col-md-4 py-3">
|
||||
|
||||
<a href="#" class="btn fa fa-arrows-alt float-right" aria-label="Toggle fullscreen" data-action="togglefullscreen"></a>
|
||||
|
||||
<a href="#" class="btn btn-secondary float-right" aria-label="Close grade interface" data-action="closegrader">Close</a>
|
||||
|
||||
<a href="#" role="button" class="btn btn-primary float-right" aria-label="Save and quit" data-action="savegrade">Save</a>
|
||||
|
||||
<!--TODO Manipulate grader panel see also Grading panel-->
|
||||
<a href="#" role="button" class="btn fa fa-check-circle float-right" aria-label="Open or close grader panel" data-action="expandgrader"></a>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
@@ -115,6 +115,8 @@ if ($capabilitymanager->can_grade($USER)) {
|
||||
'contextid' => $forum->get_context()->id,
|
||||
'cmid' => $cmid,
|
||||
'name' => $forum->get_name(),
|
||||
'courseid' => $course->id,
|
||||
'coursename' => $course->shortname,
|
||||
'groupid' => $groupid,
|
||||
'gradingcomponent' => $forumgradeitem->get_grading_component_name(),
|
||||
'gradingcomponentsubtype' => $forumgradeitem->get_grading_component_subtype(),
|
||||
|
||||
@@ -431,6 +431,7 @@ $grading-icon-button-size: 36px !default;
|
||||
$grading-search-button-padding-left: calc(#{map-get($spacers, 2)} + 8px) !default;
|
||||
$grading-search-input-padding-left: calc(#{map-get($spacers, 2)} + #{map-get($spacers, 2)} + #{$grading-icon-button-size - ($input-border-width * 2)}) !default; /* stylelint-disable-line max-line-length */
|
||||
$grading-search-input-padding-right: calc(#{map-get($spacers, 2)} + #{$grading-icon-button-size}) !default;
|
||||
$grading-nav-bar-active-drawer-button-bottom: calc(#{map-get($spacers, 2) * -1} - 1px) !default;
|
||||
|
||||
@keyframes expandSearchButton {
|
||||
from {
|
||||
@@ -477,6 +478,11 @@ $grading-search-input-padding-right: calc(#{map-get($spacers, 2)} + #{$grading-i
|
||||
}
|
||||
|
||||
.path-mod-forum .unified-grader {
|
||||
.navbar {
|
||||
max-height: none;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.grader-grading-panel {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
@@ -684,6 +690,26 @@ $grading-search-input-padding-right: calc(#{map-get($spacers, 2)} + #{$grading-i
|
||||
.grader-grading-panel.hidden + .grader-module-content {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.drawer-button {
|
||||
position: relative;
|
||||
|
||||
&.active::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
bottom: $grading-nav-bar-active-drawer-button-bottom;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 3px;
|
||||
background-color: map-get($theme-colors, 'primary');
|
||||
}
|
||||
|
||||
.icon {
|
||||
font-size: 20px;
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@include media-breakpoint-down(xs) {
|
||||
|
||||
@@ -16477,6 +16477,10 @@ select {
|
||||
border-radius: 18px;
|
||||
background-color: #e9ecef; } }
|
||||
|
||||
.path-mod-forum .unified-grader .navbar {
|
||||
max-height: none;
|
||||
z-index: 1; }
|
||||
|
||||
.path-mod-forum .unified-grader .grader-grading-panel {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
@@ -16618,6 +16622,21 @@ select {
|
||||
.path-mod-forum .unified-grader .grader-grading-panel.hidden + .grader-module-content {
|
||||
margin-right: 0; }
|
||||
|
||||
.path-mod-forum .unified-grader .drawer-button {
|
||||
position: relative; }
|
||||
.path-mod-forum .unified-grader .drawer-button.active::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
bottom: calc(-0.5rem - 1px);
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 3px;
|
||||
background-color: #1177d1; }
|
||||
.path-mod-forum .unified-grader .drawer-button .icon {
|
||||
font-size: 20px;
|
||||
height: 20px;
|
||||
width: 20px; }
|
||||
|
||||
@media (max-width: 575.98px) {
|
||||
.path-mod-forum .unified-grader .grader-grading-panel {
|
||||
width: 100%; } }
|
||||
|
||||
@@ -16749,6 +16749,10 @@ select {
|
||||
border-radius: 18px;
|
||||
background-color: #e9ecef; } }
|
||||
|
||||
.path-mod-forum .unified-grader .navbar {
|
||||
max-height: none;
|
||||
z-index: 1; }
|
||||
|
||||
.path-mod-forum .unified-grader .grader-grading-panel {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
@@ -16890,6 +16894,21 @@ select {
|
||||
.path-mod-forum .unified-grader .grader-grading-panel.hidden + .grader-module-content {
|
||||
margin-right: 0; }
|
||||
|
||||
.path-mod-forum .unified-grader .drawer-button {
|
||||
position: relative; }
|
||||
.path-mod-forum .unified-grader .drawer-button.active::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
bottom: calc(-0.5rem - 1px);
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 3px;
|
||||
background-color: #1177d1; }
|
||||
.path-mod-forum .unified-grader .drawer-button .icon {
|
||||
font-size: 20px;
|
||||
height: 20px;
|
||||
width: 20px; }
|
||||
|
||||
@media (max-width: 575.98px) {
|
||||
.path-mod-forum .unified-grader .grader-grading-panel {
|
||||
width: 100%; } }
|
||||
|
||||
Reference in New Issue
Block a user