MDL-36323 usability: New icon names to assign and switch roles
authorFrederic Massart <fred@moodle.com>
Tue, 13 Nov 2012 08:48:50 +0000 (16:48 +0800)
committerFrederic Massart <fred@moodle.com>
Wed, 14 Nov 2012 06:07:40 +0000 (14:07 +0800)
course/lib.php
lib/blocklib.php
lib/enrollib.php
lib/navigationlib.php
pix/i/assignroles.png [moved from pix/i/roles.png with 100% similarity]
pix/i/assignroles.svg [moved from pix/i/roles.svg with 100% similarity]
pix/i/switchrole.png [moved from pix/i/rolesm.png with 100% similarity]
pix/i/switchrole.svg [moved from pix/i/rolesm.svg with 100% similarity]
pix/t/assignroles.png [new file with mode: 0644]
pix/t/assignroles.svg [new file with mode: 0644]
theme/upgrade.txt

index dab4668..c3a4165 100644 (file)
@@ -3315,7 +3315,7 @@ function make_editing_buttons(stdClass $mod, $absolute_ignored = true, $movesele
     if (has_capability('moodle/role:assign', $modcontext)){
         $actions[] = new action_link(
             new moodle_url('/'.$CFG->admin.'/roles/assign.php', array('contextid' => $modcontext->id)),
-            new pix_icon('i/roles', $str->assign, 'moodle', array('class' => 'iconsmall', 'title' => '')),
+            new pix_icon('t/assignroles', $str->assign, 'moodle', array('class' => 'iconsmall', 'title' => '')),
             null,
             array('class' => 'editing_assign', 'title' => $str->assign)
         );
index c28c919..e566933 100644 (file)
@@ -1067,7 +1067,7 @@ class block_manager {
 
             $controls[] = array('url' => $CFG->wwwroot . '/' . $CFG->admin .
                     '/roles/assign.php?contextid=' . $block->context->id . '&returnurl=' . urlencode($return),
-                    'icon' => 'i/roles', 'caption' => get_string('assignroles', 'role'), 'class' => 'editing_roles');
+                    'icon' => 't/assignroles', 'caption' => get_string('assignroles', 'role'), 'class' => 'editing_roles');
         }
 
         return $controls;
index 4691f09..835a07a 100644 (file)
@@ -444,7 +444,7 @@ function enrol_add_course_navigation(navigation_node $coursenode, $course) {
         if ($course->id == SITEID or (!empty($CFG->adminsassignrolesincourse) and is_siteadmin())) {
             if (has_capability('moodle/role:assign', $coursecontext)) {
                 $url = new moodle_url('/admin/roles/assign.php', array('contextid'=>$coursecontext->id));
-                $permissionsnode->add(get_string('assignedroles', 'role'), $url, navigation_node::TYPE_SETTING, null, 'roles', new pix_icon('i/rolesm', ''));
+                $permissionsnode->add(get_string('assignedroles', 'role'), $url, navigation_node::TYPE_SETTING, null, 'roles', new pix_icon('i/assignroles', ''));
             }
         }
         // Check role permissions
@@ -459,7 +459,7 @@ function enrol_add_course_navigation(navigation_node $coursenode, $course) {
         //TODO, create some new UI for role assignments at course level
         if (has_capability('moodle/role:assign', $coursecontext)) {
             $url = new moodle_url('/enrol/otherusers.php', array('id'=>$course->id));
-            $usersnode->add(get_string('notenrolledusers', 'enrol'), $url, navigation_node::TYPE_SETTING, null, 'otherusers', new pix_icon('i/rolesm', ''));
+            $usersnode->add(get_string('notenrolledusers', 'enrol'), $url, navigation_node::TYPE_SETTING, null, 'otherusers', new pix_icon('i/assignroles', ''));
         }
     }
 
index 5ff2d4b..0fd2496 100644 (file)
@@ -3597,7 +3597,7 @@ class settings_navigation extends navigation_node {
             $returnurl->param('sesskey', sesskey());
             foreach ($roles as $key => $name) {
                 $url = new moodle_url('/course/switchrole.php', array('id'=>$course->id,'sesskey'=>sesskey(), 'switchrole'=>$key, 'returnurl'=>$returnurl->out(false)));
-                $switchroles->add($name, $url, self::TYPE_SETTING, null, $key, new pix_icon('i/rolesm', ''));
+                $switchroles->add($name, $url, self::TYPE_SETTING, null, $key, new pix_icon('i/switchrole', ''));
             }
         }
         // Return we are done
@@ -4064,7 +4064,7 @@ class settings_navigation extends navigation_node {
         // Assign local roles
         if (has_capability('moodle/role:assign', $this->context)) {
             $assignurl = new moodle_url('/'.$CFG->admin.'/roles/assign.php', array('contextid'=>$this->context->id));
-            $categorynode->add(get_string('assignroles', 'role'), $assignurl, self::TYPE_SETTING, null, 'roles', new pix_icon('i/rolesm', ''));
+            $categorynode->add(get_string('assignroles', 'role'), $assignurl, self::TYPE_SETTING, null, 'roles', new pix_icon('i/assignroles', ''));
         }
 
         // Override roles
similarity index 100%
rename from pix/i/roles.png
rename to pix/i/assignroles.png
similarity index 100%
rename from pix/i/roles.svg
rename to pix/i/assignroles.svg
similarity index 100%
rename from pix/i/rolesm.png
rename to pix/i/switchrole.png
similarity index 100%
rename from pix/i/rolesm.svg
rename to pix/i/switchrole.svg
diff --git a/pix/t/assignroles.png b/pix/t/assignroles.png
new file mode 100644 (file)
index 0000000..1005da4
Binary files /dev/null and b/pix/t/assignroles.png differ
diff --git a/pix/t/assignroles.svg b/pix/t/assignroles.svg
new file mode 100644 (file)
index 0000000..f4cc25a
--- /dev/null
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>\r
+<!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In  -->\r
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [\r
+       <!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">\r
+]>\r
+<svg version="1.1"\r
+        xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"\r
+        x="0px" y="0px" width="12px" height="12px" viewBox="0 0 12 12" style="overflow:visible;enable-background:new 0 0 12 12;"\r
+        xml:space="preserve">\r
+<defs>\r
+</defs>\r
+<path style="fill:#999999;" d="M11.9,9.3L8.3,7.5C7.8,7.3,7.7,6.7,8,6.3c0,0,0.9-1.1,0.9-2.5C8.9,1.7,7.6,0,6,0\r
+       C4.4,0,3.1,1.7,3.1,3.8C3.1,5.2,4,6.3,4,6.3c0.3,0.4,0.2,1-0.3,1.3L0.1,9.4c0,0-0.1,0-0.1,0.1V12h4.9L5,11.4l0.5-2L4.9,8.8L5.7,8\r
+       h0.5l0.8,0.9L6.5,9.5l0.5,2L7.1,12H12V9.3C12,9.3,11.9,9.3,11.9,9.3z"/>\r
+</svg>\r
index e85a6e4..ce15db2 100644 (file)
@@ -6,12 +6,16 @@ information provided here is intended especially for theme designer.
 required changes:
 * output course and course content header/footer that may be returned by course format (see MDL-36048)
 
+deprecation:
+* i/roles: Use t/assignroles instead
+
 optional changes:
 * new optional boolean parameter $withlinks for public function login_info() in lib/outputrenderers.php (MDL-31365)
 * new layout option "nologinlinks" and new page layout "secure" e.g. for safebrowser and securewindow (MDL-31365)
 * new class 'iconlarge' for 24x24 icons.
-* new icons i/export and i/import. Previously export and import actions used i/backup and i/restore.
-* new icon i/rolesm (stands for 'roles medium') is 16x16 instead of 12x12 for i/roles
+* new icons i/export and i/import (sized 16x16). Previously export and import actions used i/backup and i/restore.
+* new icon i/assignroles (sized 16x16), to prevent the use of i/roles which is 12x12.
+* new icon i/switchrole (sized 16x16), was previously using i/roles. Now is a copy of the new i/assignroles icon.
 
 === 2.3 ===