MDL-66893 mod_forum: update navigation bar in grader UI
authorRyan Wyllie <ryan@ryanwyllie.com>
Tue, 5 Nov 2019 05:24:20 +0000 (13:24 +0800)
committerRyan Wyllie <ryan@ryanwyllie.com>
Thu, 7 Nov 2019 06:53:37 +0000 (14:53 +0800)
21 files changed:
lib/classes/output/icon_system_fontawesome.php
mod/forum/amd/build/grades/grader.min.js
mod/forum/amd/build/grades/grader.min.js.map
mod/forum/amd/build/local/grades/grader.min.js
mod/forum/amd/build/local/grades/grader.min.js.map
mod/forum/amd/src/grades/grader.js
mod/forum/amd/src/local/grades/grader.js
mod/forum/lang/en/forum.php
mod/forum/pix/hide-grader-panel.png [new file with mode: 0644]
mod/forum/pix/hide-grader-panel.svg [new file with mode: 0644]
mod/forum/pix/show-grader-panel-rtl.png [new file with mode: 0644]
mod/forum/pix/show-grader-panel-rtl.svg [new file with mode: 0644]
mod/forum/pix/show-grader-panel.png [new file with mode: 0644]
mod/forum/pix/show-grader-panel.svg [new file with mode: 0644]
mod/forum/templates/grades/grade_button.mustache
mod/forum/templates/local/grades/grader.mustache
mod/forum/templates/local/grades/local/grader/navigation.mustache
mod/forum/view.php
theme/boost/scss/moodle/modules.scss
theme/boost/style/moodle.css
theme/classic/style/moodle.css

index 0b3978a..661f0bc 100644 (file)
@@ -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',
index 0d1a46f..9cd1d41 100644 (file)
Binary files a/mod/forum/amd/build/grades/grader.min.js and b/mod/forum/amd/build/grades/grader.min.js differ
index 459670e..eae5dd0 100644 (file)
Binary files a/mod/forum/amd/build/grades/grader.min.js.map and b/mod/forum/amd/build/grades/grader.min.js.map differ
index 5198ca3..ee4215d 100644 (file)
Binary files a/mod/forum/amd/build/local/grades/grader.min.js and b/mod/forum/amd/build/local/grades/grader.min.js differ
index a109798..6562aa8 100644 (file)
Binary files a/mod/forum/amd/build/local/grades/grader.min.js.map and b/mod/forum/amd/build/local/grades/grader.min.js.map differ
index 61b151b..78520fc 100644 (file)
@@ -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})
         }
     );
 };
index b347fec..caf4712 100644 (file)
@@ -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(),
index e829ae3..f63ad22 100644 (file)
@@ -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';
diff --git a/mod/forum/pix/hide-grader-panel.png b/mod/forum/pix/hide-grader-panel.png
new file mode 100644 (file)
index 0000000..e5b0906
Binary files /dev/null and b/mod/forum/pix/hide-grader-panel.png differ
diff --git a/mod/forum/pix/hide-grader-panel.svg b/mod/forum/pix/hide-grader-panel.svg
new file mode 100644 (file)
index 0000000..aad52e6
--- /dev/null
@@ -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>
\ No newline at end of file
diff --git a/mod/forum/pix/show-grader-panel-rtl.png b/mod/forum/pix/show-grader-panel-rtl.png
new file mode 100644 (file)
index 0000000..a66b994
Binary files /dev/null and b/mod/forum/pix/show-grader-panel-rtl.png differ
diff --git a/mod/forum/pix/show-grader-panel-rtl.svg b/mod/forum/pix/show-grader-panel-rtl.svg
new file mode 100644 (file)
index 0000000..e941c03
--- /dev/null
@@ -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>
\ No newline at end of file
diff --git a/mod/forum/pix/show-grader-panel.png b/mod/forum/pix/show-grader-panel.png
new file mode 100644 (file)
index 0000000..a9e4f3f
Binary files /dev/null and b/mod/forum/pix/show-grader-panel.png differ
diff --git a/mod/forum/pix/show-grader-panel.svg b/mod/forum/pix/show-grader-panel.svg
new file mode 100644 (file)
index 0000000..c05da7c
--- /dev/null
@@ -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>
\ No newline at end of file
index d03c3c2..e20bf7f 100644 (file)
@@ -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}}" {{!
index 18c23ea..7f81561 100644 (file)
@@ -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}}
         {{> 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}}
index e4c4330..8313ee7 100644 (file)
         "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>
-            </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>
+<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>
-</div>
+</nav>
index d769b7f..aa8b6e7 100644 (file)
@@ -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(),
index ca5c6db..7d99de2 100644 (file)
@@ -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) {
index fea9394..f18e492 100644 (file)
@@ -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%; } }
index eca9f72..92da122 100644 (file)
@@ -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%; } }