mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 13:02:07 +02:00
MDL-71457 theme_boost: activity icon styling
This commit is contained in:
parent
5958c0df0c
commit
f2ddd23ec1
@ -6,6 +6,7 @@
|
||||
/* Made specific to win over .block.list_block .unlist > li > .column. */
|
||||
width: 100%;
|
||||
display: table;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.block_site_main_menu li .buttons a img {
|
||||
|
@ -57,6 +57,9 @@ class content_item {
|
||||
/** @var string $componentname the name of the component from which this content item originates. */
|
||||
private $componentname;
|
||||
|
||||
/** @var string $purpose the purpose type of this component. */
|
||||
private $purpose;
|
||||
|
||||
/**
|
||||
* The content_item constructor.
|
||||
*
|
||||
@ -68,9 +71,10 @@ class content_item {
|
||||
* @param string $help The description of the item.
|
||||
* @param int $archetype the archetype for the content item (see MOD_ARCHETYPE_X definitions in lib/moodlelib.php).
|
||||
* @param string $componentname the name of the component/plugin with which this content item is associated.
|
||||
* @param string $purpose the purpose type of this component.
|
||||
*/
|
||||
public function __construct(int $id, string $name, title $title, \moodle_url $link, string $icon, string $help,
|
||||
int $archetype, string $componentname) {
|
||||
int $archetype, string $componentname, string $purpose) {
|
||||
$this->id = $id;
|
||||
$this->name = $name;
|
||||
$this->title = $title;
|
||||
@ -79,6 +83,7 @@ class content_item {
|
||||
$this->help = $help;
|
||||
$this->archetype = $archetype;
|
||||
$this->componentname = $componentname;
|
||||
$this->purpose = $purpose;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -151,4 +156,13 @@ class content_item {
|
||||
public function get_icon(): string {
|
||||
return $this->icon;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get purpose for this item.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function get_purpose(): string {
|
||||
return $this->purpose;
|
||||
}
|
||||
}
|
||||
|
@ -68,6 +68,7 @@ class course_content_item_exporter extends exporter {
|
||||
'help' => ['type' => PARAM_RAW, 'description' => 'Html description / help for the content item'],
|
||||
'archetype' => ['type' => PARAM_RAW, 'description' => 'The archetype of the module exposing the content item'],
|
||||
'componentname' => ['type' => PARAM_TEXT, 'description' => 'The name of the component exposing the content item'],
|
||||
'purpose' => ['type' => PARAM_TEXT, 'description' => 'The purpose of the component exposing the content item'],
|
||||
];
|
||||
}
|
||||
|
||||
@ -136,7 +137,8 @@ class course_content_item_exporter extends exporter {
|
||||
'componentname' => $this->contentitem->get_component_name(),
|
||||
'favourite' => $favourite,
|
||||
'legacyitem' => ($this->contentitem->get_id() == -1),
|
||||
'recommended' => $recommended
|
||||
'recommended' => $recommended,
|
||||
'purpose' => $this->contentitem->get_purpose()
|
||||
];
|
||||
|
||||
return $properties;
|
||||
|
@ -94,9 +94,9 @@ class content_item_readonly_repository implements content_item_readonly_reposito
|
||||
// modname:link, i.e. lti:http://etc...
|
||||
// We need to grab the module name out to create the componentname.
|
||||
$modname = (strpos($item->name, ':') !== false) ? explode(':', $item->name)[0] : $item->name;
|
||||
|
||||
$purpose = plugin_supports('mod', $modname, FEATURE_MOD_PURPOSE, MOD_PURPOSE_OTHER);
|
||||
return new content_item($item->id, $item->name, $item->title, $item->link, $item->icon, $item->help ?? '',
|
||||
$item->archetype, 'mod_' . $modname);
|
||||
$item->archetype, 'mod_' . $modname, $purpose);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -202,16 +202,18 @@ class content_item_readonly_repository implements content_item_readonly_reposito
|
||||
// If the module chooses to implement the hook, this may be thrown away.
|
||||
$help = $this->get_core_module_help_string($mod->name);
|
||||
$archetype = plugin_supports('mod', $mod->name, FEATURE_MOD_ARCHETYPE, MOD_ARCHETYPE_OTHER);
|
||||
$purpose = plugin_supports('mod', $mod->name, FEATURE_MOD_PURPOSE, MOD_PURPOSE_OTHER);
|
||||
|
||||
$contentitem = new content_item(
|
||||
$mod->id,
|
||||
$mod->name,
|
||||
new lang_string_title("modulename", $mod->name),
|
||||
new \moodle_url(''), // No course scope, so just an empty link.
|
||||
$OUTPUT->pix_icon('icon', '', $mod->name, ['class' => 'icon']),
|
||||
$OUTPUT->pix_icon('icon', '', $mod->name, ['class' => 'icon activityicon']),
|
||||
$help,
|
||||
$archetype,
|
||||
'mod_' . $mod->name
|
||||
'mod_' . $mod->name,
|
||||
$purpose,
|
||||
);
|
||||
|
||||
$modcontentitemreference = clone($contentitem);
|
||||
@ -265,16 +267,18 @@ class content_item_readonly_repository implements content_item_readonly_reposito
|
||||
// If the module chooses to implement the hook, this may be thrown away.
|
||||
$help = $this->get_core_module_help_string($mod->name);
|
||||
$archetype = plugin_supports('mod', $mod->name, FEATURE_MOD_ARCHETYPE, MOD_ARCHETYPE_OTHER);
|
||||
$purpose = plugin_supports('mod', $mod->name, FEATURE_MOD_PURPOSE, MOD_PURPOSE_OTHER);
|
||||
|
||||
$contentitem = new content_item(
|
||||
$mod->id,
|
||||
$mod->name,
|
||||
new lang_string_title("modulename", $mod->name),
|
||||
new \moodle_url($urlbase, ['add' => $mod->name]),
|
||||
$OUTPUT->pix_icon('icon', '', $mod->name, ['class' => 'icon']),
|
||||
$OUTPUT->pix_icon('icon', '', $mod->name, ['class' => 'icon activityicon']),
|
||||
$help,
|
||||
$archetype,
|
||||
'mod_' . $mod->name
|
||||
'mod_' . $mod->name,
|
||||
$purpose,
|
||||
);
|
||||
|
||||
// Legacy vs new hooks.
|
||||
|
@ -110,6 +110,7 @@ class title implements renderable, templatable {
|
||||
'pluginname' => get_string('pluginname', 'mod_' . $mod->modname),
|
||||
'linkclasses' => $displayoptions['linkclasses'],
|
||||
'textclasses' => $displayoptions['textclasses'],
|
||||
'purpose' => plugin_supports('mod', $mod->modname, FEATURE_MOD_PURPOSE, MOD_PURPOSE_OTHER),
|
||||
];
|
||||
|
||||
// File type after name, for alphabetic lists (screen reader).
|
||||
|
@ -29,13 +29,15 @@
|
||||
"pluginname": "File",
|
||||
"altname": "PDF file",
|
||||
"linkclasses": "",
|
||||
"textclasses": ""
|
||||
"textclasses": "",
|
||||
"purpose": "content",
|
||||
"modname": "resource"
|
||||
}
|
||||
}}
|
||||
{{#url}}
|
||||
<div class="activity-instance d-flex flex-column">
|
||||
<div class="activitytitle media {{textclasses}} modtype_{{modname}} position-relative align-self-start">
|
||||
<div class="activityiconcontainer courseicon align-self-start mr-3">
|
||||
<div class="activityiconcontainer {{purpose}} courseicon align-self-start mr-3">
|
||||
<img src="{{{icon}}}" class="activityicon " alt="{{{modname}}} icon">
|
||||
</div>
|
||||
<div class="media-body align-self-center">
|
||||
|
@ -710,9 +710,13 @@ class core_course_renderer extends plugin_renderer_base {
|
||||
$onclick = htmlspecialchars_decode($mod->onclick, ENT_QUOTES);
|
||||
|
||||
// Display link itself.
|
||||
$activitylink = html_writer::empty_tag('img', array('src' => $mod->get_icon_url(),
|
||||
'class' => 'iconlarge activityicon', 'alt' => '', 'role' => 'presentation', 'aria-hidden' => 'true')) .
|
||||
html_writer::tag('span', $instancename . $altname, array('class' => 'instancename'));
|
||||
$instancename = html_writer::tag('span', $instancename . $altname, ['class' => 'instancename ml-1']);
|
||||
|
||||
$imageicon = html_writer::empty_tag('img', ['src' => $mod->get_icon_url(),
|
||||
'class' => 'activityicon', 'alt' => '', 'role' => 'presentation', 'aria-hidden' => 'true']);
|
||||
$imageicon = html_writer::tag('span', $imageicon, ['class' => 'activityiconcontainer courseicon']);
|
||||
$activitylink = $imageicon . $instancename;
|
||||
|
||||
if ($mod->uservisible) {
|
||||
$output .= html_writer::link($url, $activitylink, array('class' => 'aalink' . $linkclasses, 'onclick' => $onclick));
|
||||
} else {
|
||||
|
@ -26,13 +26,14 @@
|
||||
"urls": {
|
||||
"addoption": "http://addoptionurl.com"
|
||||
},
|
||||
"icon": "<img class='icon' src='http://urltooptionicon'>"
|
||||
"icon": "<img class='icon' src='http://urltooptionicon'>",
|
||||
"purpose": "content"
|
||||
}
|
||||
}}
|
||||
<div role="menuitem" tabindex="-1" aria-label="{{title}}" class="option border-0 card m-1 bg-white" data-region="chooser-option-container" data-internal="{{name}}" data-modname="{{componentname}}_{{link}}">
|
||||
<div class="optioninfo card-body d-flex flex-column text-center p-1" data-region="chooser-option-info-container">
|
||||
<a class="d-flex flex-column justify-content-between flex-fill" href="{{link}}" title="{{#str}} addnew, moodle, {{title}} {{/str}}" tabindex="-1" data-action="add-chooser-option">
|
||||
<div class="optionicon mt-2 mb-1 icon-size-5 icon-no-margin">
|
||||
<div class="optionicon mt-2 mb-1 mx-auto icon-no-margin modicon_{{name}} activityiconcontainer {{purpose}}">
|
||||
{{{icon}}}
|
||||
</div>
|
||||
<div class="optionname clamp-2">{{title}}</div>
|
||||
|
@ -47,7 +47,8 @@ class content_item_test extends \advanced_testcase {
|
||||
$this->resetAfterTest();
|
||||
|
||||
$contentitem = new content_item(22, 'Item name', new lang_string_title('modulename', 'mod_assign'),
|
||||
new \moodle_url('mod_edit.php'), '<img src="test">', 'Description of the module', MOD_ARCHETYPE_RESOURCE, 'mod_page');
|
||||
new \moodle_url('mod_edit.php'), '<img src="test">', 'Description of the module', MOD_ARCHETYPE_RESOURCE, 'mod_page',
|
||||
MOD_PURPOSE_CONTENT);
|
||||
|
||||
$this->assertEquals(22, $contentitem->get_id());
|
||||
$this->assertEquals('Item name', $contentitem->get_name());
|
||||
@ -57,6 +58,7 @@ class content_item_test extends \advanced_testcase {
|
||||
$this->assertEquals('Description of the module', $contentitem->get_help());
|
||||
$this->assertEquals(MOD_ARCHETYPE_RESOURCE, $contentitem->get_archetype());
|
||||
$this->assertEquals('mod_page', $contentitem->get_component_name());
|
||||
$this->assertEquals('content', $contentitem->get_purpose());
|
||||
}
|
||||
|
||||
/**
|
||||
@ -66,7 +68,8 @@ class content_item_test extends \advanced_testcase {
|
||||
$this->resetAfterTest();
|
||||
|
||||
$contentitem = new content_item(22, 'Item name', new string_title('My custom string'),
|
||||
new \moodle_url('mod_edit.php'), '<img src="test">', 'Description of the module', MOD_ARCHETYPE_RESOURCE, 'mod_page');
|
||||
new \moodle_url('mod_edit.php'), '<img src="test">', 'Description of the module', MOD_ARCHETYPE_RESOURCE, 'mod_page',
|
||||
MOD_PURPOSE_CONTENT);
|
||||
|
||||
$this->assertEquals('My custom string', $contentitem->get_title()->get_value());
|
||||
}
|
||||
|
@ -92,7 +92,8 @@ class exporters_content_item_test extends \advanced_testcase {
|
||||
'* First point
|
||||
* Another point',
|
||||
MOD_ARCHETYPE_OTHER,
|
||||
'core_test'
|
||||
'core_test',
|
||||
MOD_PURPOSE_CONTENT
|
||||
);
|
||||
|
||||
$ciexporter = new course_content_item_exporter($contentitem, ['context' => \context_course::instance($course->id)]);
|
||||
|
@ -2,7 +2,17 @@ This files describes API changes in /course/*,
|
||||
information provided here is intended especially for developers.
|
||||
|
||||
=== 4.0 ===
|
||||
|
||||
* All activity icons have been replaced with black monochrome icons. The background
|
||||
colour for these icons is defined using a new 'FEATURE_MOD_PURPOSE' support variable in the module lib.php file
|
||||
Available purpose types are:
|
||||
- MOD_PURPOSE_COMMUNICATION
|
||||
- MOD_PURPOSE_ASSESSMENT
|
||||
- MOD_PURPOSE_COLLABORATION
|
||||
- MOD_PURPOSE_CONTENT
|
||||
- MOD_PURPOSE_ADMINISTRATION
|
||||
- MOD_PURPOSE_INTERFACE
|
||||
- MOD_PURPOSE_OTHER
|
||||
The colours for these types are defined in theme/boost/scss/moodle/variables.scss
|
||||
* The format_base is now deprecated. Use core_courseformat\base instead.
|
||||
* The new course output components deprecate many renderer methods from course
|
||||
renderer and course format renderer:
|
||||
|
@ -460,6 +460,23 @@ define('MOD_ARCHETYPE_ASSIGNMENT', 2);
|
||||
/** System (not user-addable) module archetype */
|
||||
define('MOD_ARCHETYPE_SYSTEM', 3);
|
||||
|
||||
/** Type of module */
|
||||
define('FEATURE_MOD_PURPOSE', 'mod_purpose');
|
||||
/** Module purpose administration */
|
||||
define('MOD_PURPOSE_ADMINISTRATION', 'administration');
|
||||
/** Module purpose assessment */
|
||||
define('MOD_PURPOSE_ASSESSMENT', 'assessment');
|
||||
/** Module purpose communication */
|
||||
define('MOD_PURPOSE_COLLABORATION', 'collaboration');
|
||||
/** Module purpose communication */
|
||||
define('MOD_PURPOSE_COMMUNICATION', 'communication');
|
||||
/** Module purpose content */
|
||||
define('MOD_PURPOSE_CONTENT', 'content');
|
||||
/** Module purpose interface */
|
||||
define('MOD_PURPOSE_INTERFACE', 'interface');
|
||||
/** Module purpose other */
|
||||
define('MOD_PURPOSE_OTHER', 'other');
|
||||
|
||||
/**
|
||||
* Security token used for allowing access
|
||||
* from external application such as web services.
|
||||
|
@ -364,7 +364,7 @@ function assign_update_events($assign, $override = null) {
|
||||
* Return the list if Moodle features this module supports
|
||||
*
|
||||
* @param string $feature FEATURE_xx constant for requested feature
|
||||
* @return mixed True if module supports feature, null if doesn't know
|
||||
* @return mixed True if module supports feature, false if not, null if doesn't know or string for the module purpose.
|
||||
*/
|
||||
function assign_supports($feature) {
|
||||
switch($feature) {
|
||||
@ -392,6 +392,8 @@ function assign_supports($feature) {
|
||||
return true;
|
||||
case FEATURE_COMMENT:
|
||||
return true;
|
||||
case FEATURE_MOD_PURPOSE:
|
||||
return MOD_PURPOSE_ASSESSMENT;
|
||||
|
||||
default:
|
||||
return null;
|
||||
|
@ -83,11 +83,12 @@ function assignment_delete_instance($id){
|
||||
|
||||
/**
|
||||
* @param string $feature FEATURE_xx constant for requested feature
|
||||
* @return mixed True if module supports feature, null if doesn't know
|
||||
* @return mixed True if module supports feature, false if not, null if doesn't know or string for the module purpose.
|
||||
*/
|
||||
function assignment_supports($feature) {
|
||||
switch($feature) {
|
||||
case FEATURE_BACKUP_MOODLE2: return true;
|
||||
case FEATURE_MOD_PURPOSE: return MOD_PURPOSE_ASSESSMENT;
|
||||
|
||||
default: return null;
|
||||
}
|
||||
|
@ -301,7 +301,7 @@ function book_get_post_actions() {
|
||||
* Supported features
|
||||
*
|
||||
* @param string $feature FEATURE_xx constant for requested feature
|
||||
* @return mixed True if module supports feature, false if not, null if doesn't know
|
||||
* @return mixed True if module supports feature, false if not, null if doesn't know or string for the module purpose.
|
||||
*/
|
||||
function book_supports($feature) {
|
||||
switch($feature) {
|
||||
@ -314,6 +314,7 @@ function book_supports($feature) {
|
||||
case FEATURE_GRADE_OUTCOMES: return false;
|
||||
case FEATURE_BACKUP_MOODLE2: return true;
|
||||
case FEATURE_SHOW_DESCRIPTION: return true;
|
||||
case FEATURE_MOD_PURPOSE: return MOD_PURPOSE_CONTENT;
|
||||
|
||||
default: return null;
|
||||
}
|
||||
|
@ -1244,7 +1244,7 @@ function chat_reset_userdata($data) {
|
||||
|
||||
/**
|
||||
* @param string $feature FEATURE_xx constant for requested feature
|
||||
* @return mixed True if module supports feature, null if doesn't know
|
||||
* @return mixed True if module supports feature, false if not, null if doesn't know or string for the module purpose.
|
||||
*/
|
||||
function chat_supports($feature) {
|
||||
switch($feature) {
|
||||
@ -1264,6 +1264,8 @@ function chat_supports($feature) {
|
||||
return true;
|
||||
case FEATURE_SHOW_DESCRIPTION:
|
||||
return true;
|
||||
case FEATURE_MOD_PURPOSE:
|
||||
return MOD_PURPOSE_COMMUNICATION;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
@ -836,7 +836,7 @@ function choice_get_response_data($choice, $cm, $groupmode, $onlyactive) {
|
||||
* @uses FEATURE_GRADE_HAS_GRADE
|
||||
* @uses FEATURE_GRADE_OUTCOMES
|
||||
* @param string $feature FEATURE_xx constant for requested feature
|
||||
* @return mixed True if module supports feature, null if doesn't know
|
||||
* @return mixed True if module supports feature, false if not, null if doesn't know or string for the module purpose.
|
||||
*/
|
||||
function choice_supports($feature) {
|
||||
switch($feature) {
|
||||
@ -849,6 +849,7 @@ function choice_supports($feature) {
|
||||
case FEATURE_GRADE_OUTCOMES: return false;
|
||||
case FEATURE_BACKUP_MOODLE2: return true;
|
||||
case FEATURE_SHOW_DESCRIPTION: return true;
|
||||
case FEATURE_MOD_PURPOSE: return MOD_PURPOSE_COMMUNICATION;
|
||||
|
||||
default: return null;
|
||||
}
|
||||
|
@ -3029,7 +3029,7 @@ function data_get_extra_capabilities() {
|
||||
|
||||
/**
|
||||
* @param string $feature FEATURE_xx constant for requested feature
|
||||
* @return mixed True if module supports feature, null if doesn't know
|
||||
* @return mixed True if module supports feature, false if not, null if doesn't know or string for the module purpose.
|
||||
*/
|
||||
function data_supports($feature) {
|
||||
switch($feature) {
|
||||
@ -3044,6 +3044,7 @@ function data_supports($feature) {
|
||||
case FEATURE_BACKUP_MOODLE2: return true;
|
||||
case FEATURE_SHOW_DESCRIPTION: return true;
|
||||
case FEATURE_COMMENT: return true;
|
||||
case FEATURE_MOD_PURPOSE: return MOD_PURPOSE_COLLABORATION;
|
||||
|
||||
default: return null;
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ require_once(__DIR__ . '/deprecatedlib.php');
|
||||
* @uses FEATURE_GRADE_HAS_GRADE
|
||||
* @uses FEATURE_GRADE_OUTCOMES
|
||||
* @param string $feature FEATURE_xx constant for requested feature
|
||||
* @return mixed True if module supports feature, null if doesn't know
|
||||
* @return mixed True if module supports feature, false if not, null if doesn't know or string for the module purpose.
|
||||
*/
|
||||
function feedback_supports($feature) {
|
||||
switch($feature) {
|
||||
@ -65,6 +65,7 @@ function feedback_supports($feature) {
|
||||
case FEATURE_GRADE_OUTCOMES: return false;
|
||||
case FEATURE_BACKUP_MOODLE2: return true;
|
||||
case FEATURE_SHOW_DESCRIPTION: return true;
|
||||
case FEATURE_MOD_PURPOSE: return MOD_PURPOSE_COMMUNICATION;
|
||||
|
||||
default: return null;
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ define('FOLDER_DISPLAY_INLINE', 1);
|
||||
/**
|
||||
* List of features supported in Folder module
|
||||
* @param string $feature FEATURE_xx constant for requested feature
|
||||
* @return mixed True if module supports feature, false if not, null if doesn't know
|
||||
* @return mixed True if module supports feature, false if not, null if doesn't know or string for the module purpose.
|
||||
*/
|
||||
function folder_supports($feature) {
|
||||
switch($feature) {
|
||||
@ -46,6 +46,7 @@ function folder_supports($feature) {
|
||||
case FEATURE_GRADE_OUTCOMES: return false;
|
||||
case FEATURE_BACKUP_MOODLE2: return true;
|
||||
case FEATURE_SHOW_DESCRIPTION: return true;
|
||||
case FEATURE_MOD_PURPOSE: return MOD_PURPOSE_CONTENT;
|
||||
|
||||
default: return null;
|
||||
}
|
||||
|
@ -354,7 +354,7 @@ function forum_delete_instance($id) {
|
||||
* @uses FEATURE_GRADE_HAS_GRADE
|
||||
* @uses FEATURE_GRADE_OUTCOMES
|
||||
* @param string $feature
|
||||
* @return mixed True if yes (some features may use other values)
|
||||
* @return mixed True if module supports feature, false if not, null if doesn't know or string for the module purpose.
|
||||
*/
|
||||
function forum_supports($feature) {
|
||||
switch($feature) {
|
||||
@ -370,6 +370,7 @@ function forum_supports($feature) {
|
||||
case FEATURE_SHOW_DESCRIPTION: return true;
|
||||
case FEATURE_PLAGIARISM: return true;
|
||||
case FEATURE_ADVANCED_GRADING: return true;
|
||||
case FEATURE_MOD_PURPOSE: return MOD_PURPOSE_COLLABORATION;
|
||||
|
||||
default: return null;
|
||||
}
|
||||
|
@ -3079,7 +3079,7 @@ function glossary_get_extra_capabilities() {
|
||||
|
||||
/**
|
||||
* @param string $feature FEATURE_xx constant for requested feature
|
||||
* @return mixed True if module supports feature, null if doesn't know
|
||||
* @return mixed True if module supports feature, false if not, null if doesn't know or string for the module purpose.
|
||||
*/
|
||||
function glossary_supports($feature) {
|
||||
switch($feature) {
|
||||
@ -3094,6 +3094,7 @@ function glossary_supports($feature) {
|
||||
case FEATURE_BACKUP_MOODLE2: return true;
|
||||
case FEATURE_SHOW_DESCRIPTION: return true;
|
||||
case FEATURE_COMMENT: return true;
|
||||
case FEATURE_MOD_PURPOSE: return MOD_PURPOSE_COLLABORATION;
|
||||
|
||||
default: return null;
|
||||
}
|
||||
|
@ -41,9 +41,9 @@ use mod_h5pactivity\local\grader;
|
||||
* @uses FEATURE_GRADE_OUTCOMES
|
||||
* @uses FEATURE_BACKUP_MOODLE2
|
||||
* @param string $feature FEATURE_xx constant for requested feature
|
||||
* @return mixed True if module supports feature, false if not, null if doesn't know
|
||||
* @return mixed True if module supports feature, false if not, null if doesn't know or string for the module purpose.
|
||||
*/
|
||||
function h5pactivity_supports(string $feature): ?bool {
|
||||
function h5pactivity_supports(string $feature) {
|
||||
switch($feature) {
|
||||
case FEATURE_GROUPS:
|
||||
return true;
|
||||
@ -63,6 +63,8 @@ function h5pactivity_supports(string $feature): ?bool {
|
||||
return true;
|
||||
case FEATURE_BACKUP_MOODLE2:
|
||||
return true;
|
||||
case FEATURE_MOD_PURPOSE:
|
||||
return MOD_PURPOSE_CONTENT;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ defined('MOODLE_INTERNAL') || die();
|
||||
/**
|
||||
* List of features supported in IMS CP module
|
||||
* @param string $feature FEATURE_xx constant for requested feature
|
||||
* @return mixed True if module supports feature, false if not, null if doesn't know
|
||||
* @return mixed True if module supports feature, false if not, null if doesn't know or string for the module purpose.
|
||||
*/
|
||||
function imscp_supports($feature) {
|
||||
switch($feature) {
|
||||
@ -40,6 +40,7 @@ function imscp_supports($feature) {
|
||||
case FEATURE_GRADE_OUTCOMES: return false;
|
||||
case FEATURE_BACKUP_MOODLE2: return true;
|
||||
case FEATURE_SHOW_DESCRIPTION: return true;
|
||||
case FEATURE_MOD_PURPOSE: return MOD_PURPOSE_CONTENT;
|
||||
|
||||
default: return null;
|
||||
}
|
||||
|
@ -172,7 +172,7 @@ function label_reset_userdata($data) {
|
||||
* @uses FEATURE_GRADE_HAS_GRADE
|
||||
* @uses FEATURE_GRADE_OUTCOMES
|
||||
* @param string $feature FEATURE_xx constant for requested feature
|
||||
* @return bool|null True if module supports feature, false if not, null if doesn't know
|
||||
* @return mixed True if module supports feature, false if not, null if doesn't know or string for the module purpose.
|
||||
*/
|
||||
function label_supports($feature) {
|
||||
switch($feature) {
|
||||
@ -186,6 +186,7 @@ function label_supports($feature) {
|
||||
case FEATURE_MOD_ARCHETYPE: return MOD_ARCHETYPE_RESOURCE;
|
||||
case FEATURE_BACKUP_MOODLE2: return true;
|
||||
case FEATURE_NO_VIEW_LINK: return true;
|
||||
case FEATURE_MOD_PURPOSE: return MOD_PURPOSE_CONTENT;
|
||||
|
||||
default: return null;
|
||||
}
|
||||
|
@ -981,7 +981,7 @@ function lesson_reset_userdata($data) {
|
||||
* @uses FEATURE_GRADE_HAS_GRADE
|
||||
* @uses FEATURE_GRADE_OUTCOMES
|
||||
* @param string $feature FEATURE_xx constant for requested feature
|
||||
* @return mixed True if module supports feature, false if not, null if doesn't know
|
||||
* @return mixed True if module supports feature, false if not, null if doesn't know or string for the module purpose.
|
||||
*/
|
||||
function lesson_supports($feature) {
|
||||
switch($feature) {
|
||||
@ -1003,6 +1003,8 @@ function lesson_supports($feature) {
|
||||
return true;
|
||||
case FEATURE_SHOW_DESCRIPTION:
|
||||
return true;
|
||||
case FEATURE_MOD_PURPOSE:
|
||||
return MOD_PURPOSE_CONTENT;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ defined('MOODLE_INTERNAL') || die;
|
||||
/**
|
||||
* List of features supported in URL module
|
||||
* @param string $feature FEATURE_xx constant for requested feature
|
||||
* @return mixed True if module supports feature, false if not, null if doesn't know
|
||||
* @return mixed True if module supports feature, false if not, null if doesn't know or string for the module purpose.
|
||||
*/
|
||||
function lti_supports($feature) {
|
||||
switch ($feature) {
|
||||
@ -65,6 +65,8 @@ function lti_supports($feature) {
|
||||
case FEATURE_BACKUP_MOODLE2:
|
||||
case FEATURE_SHOW_DESCRIPTION:
|
||||
return true;
|
||||
case FEATURE_MOD_PURPOSE:
|
||||
return MOD_PURPOSE_CONTENT;
|
||||
|
||||
default:
|
||||
return null;
|
||||
@ -281,7 +283,8 @@ function lti_get_course_content_items(\core_course\local\entity\content_item $de
|
||||
$defaultmodulecontentitem->get_icon(),
|
||||
$defaultmodulecontentitem->get_help(),
|
||||
$defaultmodulecontentitem->get_archetype(),
|
||||
$defaultmodulecontentitem->get_component_name()
|
||||
$defaultmodulecontentitem->get_component_name(),
|
||||
$defaultmodulecontentitem->get_purpose()
|
||||
)];
|
||||
}
|
||||
|
||||
@ -308,7 +311,8 @@ function lti_get_course_content_items(\core_course\local\entity\content_item $de
|
||||
$preconfiguredtool->icon,
|
||||
$preconfiguredtool->help,
|
||||
$defaultmodulecontentitem->get_archetype(),
|
||||
$defaultmodulecontentitem->get_component_name()
|
||||
$defaultmodulecontentitem->get_component_name(),
|
||||
$defaultmodulecontentitem->get_purpose()
|
||||
);
|
||||
}
|
||||
return $types;
|
||||
@ -333,7 +337,8 @@ function mod_lti_get_all_content_items(\core_course\local\entity\content_item $d
|
||||
$defaultmodulecontentitem->get_icon(),
|
||||
$defaultmodulecontentitem->get_help(),
|
||||
$defaultmodulecontentitem->get_archetype(),
|
||||
$defaultmodulecontentitem->get_component_name()
|
||||
$defaultmodulecontentitem->get_component_name(),
|
||||
$defaultmodulecontentitem->get_purpose()
|
||||
)];
|
||||
|
||||
foreach (lti_get_lti_types() as $ltitype) {
|
||||
@ -368,7 +373,8 @@ function mod_lti_get_all_content_items(\core_course\local\entity\content_item $d
|
||||
$type->icon,
|
||||
$type->help,
|
||||
$defaultmodulecontentitem->get_archetype(),
|
||||
$defaultmodulecontentitem->get_component_name()
|
||||
$defaultmodulecontentitem->get_component_name(),
|
||||
$defaultmodulecontentitem->get_purpose()
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -404,7 +404,8 @@ class mod_lti_lib_testcase extends advanced_testcase {
|
||||
'icon',
|
||||
'Description of the module',
|
||||
MOD_ARCHETYPE_OTHER,
|
||||
'mod_lti'
|
||||
'mod_lti',
|
||||
MOD_PURPOSE_CONTENT
|
||||
);
|
||||
|
||||
// The lti_get_lti_types_by_course method (used by the callbacks) assumes the global user.
|
||||
|
@ -26,7 +26,7 @@ defined('MOODLE_INTERNAL') || die;
|
||||
/**
|
||||
* List of features supported in Page module
|
||||
* @param string $feature FEATURE_xx constant for requested feature
|
||||
* @return mixed True if module supports feature, false if not, null if doesn't know
|
||||
* @return mixed True if module supports feature, false if not, null if doesn't know or string for the module purpose.
|
||||
*/
|
||||
function page_supports($feature) {
|
||||
switch($feature) {
|
||||
@ -39,6 +39,7 @@ function page_supports($feature) {
|
||||
case FEATURE_GRADE_OUTCOMES: return false;
|
||||
case FEATURE_BACKUP_MOODLE2: return true;
|
||||
case FEATURE_SHOW_DESCRIPTION: return true;
|
||||
case FEATURE_MOD_PURPOSE: return MOD_PURPOSE_CONTENT;
|
||||
|
||||
default: return null;
|
||||
}
|
||||
|
@ -1672,7 +1672,7 @@ function quiz_attempt_summary_link_to_reports($quiz, $cm, $context, $returnzero
|
||||
|
||||
/**
|
||||
* @param string $feature FEATURE_xx constant for requested feature
|
||||
* @return bool True if quiz supports feature
|
||||
* @return mixed True if module supports feature, false if not, null if doesn't know or string for the module purpose.
|
||||
*/
|
||||
function quiz_supports($feature) {
|
||||
switch($feature) {
|
||||
@ -1688,6 +1688,7 @@ function quiz_supports($feature) {
|
||||
case FEATURE_CONTROLS_GRADE_VISIBILITY: return true;
|
||||
case FEATURE_USES_QUESTIONS: return true;
|
||||
case FEATURE_PLAGIARISM: return true;
|
||||
case FEATURE_MOD_PURPOSE: return MOD_PURPOSE_ASSESSMENT;
|
||||
|
||||
default: return null;
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ defined('MOODLE_INTERNAL') || die;
|
||||
/**
|
||||
* List of features supported in Resource module
|
||||
* @param string $feature FEATURE_xx constant for requested feature
|
||||
* @return mixed True if module supports feature, false if not, null if doesn't know
|
||||
* @return mixed True if module supports feature, false if not, null if doesn't know or string for the module purpose.
|
||||
*/
|
||||
function resource_supports($feature) {
|
||||
switch($feature) {
|
||||
@ -39,6 +39,7 @@ function resource_supports($feature) {
|
||||
case FEATURE_GRADE_OUTCOMES: return false;
|
||||
case FEATURE_BACKUP_MOODLE2: return true;
|
||||
case FEATURE_SHOW_DESCRIPTION: return true;
|
||||
case FEATURE_MOD_PURPOSE: return MOD_PURPOSE_CONTENT;
|
||||
|
||||
default: return null;
|
||||
}
|
||||
@ -217,7 +218,6 @@ function resource_get_coursemodule_info($coursemodule) {
|
||||
}
|
||||
|
||||
if ($resource->tobemigrated) {
|
||||
$info->icon ='i/invalid';
|
||||
return $info;
|
||||
}
|
||||
|
||||
@ -226,7 +226,6 @@ function resource_get_coursemodule_info($coursemodule) {
|
||||
$files = $fs->get_area_files($context->id, 'mod_resource', 'content', 0, 'sortorder DESC, id ASC', false, 0, 0, 1);
|
||||
if (count($files) >= 1) {
|
||||
$mainfile = reset($files);
|
||||
$info->icon = file_file_icon($mainfile, 24);
|
||||
$resource->mainfile = $mainfile->get_filename();
|
||||
}
|
||||
|
||||
|
@ -143,13 +143,11 @@ class mod_resource_lib_testcase extends advanced_testcase {
|
||||
$info = resource_get_coursemodule_info(
|
||||
$DB->get_record('course_modules', array('id' => $resource2->cmid)));
|
||||
$this->assertEquals('R2', $info->name);
|
||||
$this->assertEquals('f/text-24', $info->icon);
|
||||
|
||||
// For third one, it should use the highest sortorder icon.
|
||||
$info = resource_get_coursemodule_info(
|
||||
$DB->get_record('course_modules', array('id' => $resource3->cmid)));
|
||||
$this->assertEquals('R3', $info->name);
|
||||
$this->assertEquals('f/document-24', $info->icon);
|
||||
}
|
||||
|
||||
public function test_resource_core_calendar_provide_event_action() {
|
||||
|
@ -1027,7 +1027,7 @@ function scorm_pluginfile($course, $cm, $context, $filearea, $args, $forcedownlo
|
||||
* @uses FEATURE_GRADE_HAS_GRADE
|
||||
* @uses FEATURE_GRADE_OUTCOMES
|
||||
* @param string $feature FEATURE_xx constant for requested feature
|
||||
* @return mixed True if module supports feature, false if not, null if doesn't know
|
||||
* @return mixed True if module supports feature, false if not, null if doesn't know or string for the module purpose.
|
||||
*/
|
||||
function scorm_supports($feature) {
|
||||
switch($feature) {
|
||||
@ -1040,6 +1040,7 @@ function scorm_supports($feature) {
|
||||
case FEATURE_GRADE_OUTCOMES: return true;
|
||||
case FEATURE_BACKUP_MOODLE2: return true;
|
||||
case FEATURE_SHOW_DESCRIPTION: return true;
|
||||
case FEATURE_MOD_PURPOSE: return MOD_PURPOSE_CONTENT;
|
||||
|
||||
default: return null;
|
||||
}
|
||||
|
@ -782,7 +782,7 @@ function survey_reset_userdata($data) {
|
||||
* @uses FEATURE_GRADE_HAS_GRADE
|
||||
* @uses FEATURE_GRADE_OUTCOMES
|
||||
* @param string $feature FEATURE_xx constant for requested feature
|
||||
* @return mixed True if module supports feature, false if not, null if doesn't know
|
||||
* @return mixed True if module supports feature, false if not, null if doesn't know or string for the module purpose.
|
||||
*/
|
||||
function survey_supports($feature) {
|
||||
switch($feature) {
|
||||
@ -795,6 +795,7 @@ function survey_supports($feature) {
|
||||
case FEATURE_GRADE_OUTCOMES: return false;
|
||||
case FEATURE_BACKUP_MOODLE2: return true;
|
||||
case FEATURE_SHOW_DESCRIPTION: return true;
|
||||
case FEATURE_MOD_PURPOSE: return MOD_PURPOSE_COMMUNICATION;
|
||||
|
||||
default: return null;
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ defined('MOODLE_INTERNAL') || die;
|
||||
/**
|
||||
* List of features supported in URL module
|
||||
* @param string $feature FEATURE_xx constant for requested feature
|
||||
* @return mixed True if module supports feature, false if not, null if doesn't know
|
||||
* @return mixed True if module supports feature, false if not, null if doesn't know or string for the module purpose.
|
||||
*/
|
||||
function url_supports($feature) {
|
||||
switch($feature) {
|
||||
@ -41,6 +41,7 @@ function url_supports($feature) {
|
||||
case FEATURE_GRADE_OUTCOMES: return false;
|
||||
case FEATURE_BACKUP_MOODLE2: return true;
|
||||
case FEATURE_SHOW_DESCRIPTION: return true;
|
||||
case FEATURE_MOD_PURPOSE: return MOD_PURPOSE_CONTENT;
|
||||
|
||||
default: return null;
|
||||
}
|
||||
|
@ -258,7 +258,7 @@ function wiki_reset_course_form_definition(&$mform) {
|
||||
* @uses FEATURE_GRADE_HAS_GRADE
|
||||
* @uses FEATURE_GRADE_OUTCOMES
|
||||
* @param string $feature
|
||||
* @return mixed True if yes (some features may use other values)
|
||||
* @return mixed True if module supports feature, false if not, null if doesn't know or string for the module purpose.
|
||||
*/
|
||||
function wiki_supports($feature) {
|
||||
switch ($feature) {
|
||||
@ -282,6 +282,8 @@ function wiki_supports($feature) {
|
||||
return true;
|
||||
case FEATURE_COMMENT:
|
||||
return true;
|
||||
case FEATURE_MOD_PURPOSE:
|
||||
return MOD_PURPOSE_COLLABORATION;
|
||||
|
||||
default:
|
||||
return null;
|
||||
|
@ -47,7 +47,7 @@ define('WORKSHOP_SUBMISSION_TYPE_REQUIRED', 2);
|
||||
*
|
||||
* @see plugin_supports() in lib/moodlelib.php
|
||||
* @param string $feature FEATURE_xx constant for requested feature
|
||||
* @return mixed true if the feature is supported, null if unknown
|
||||
* @return mixed True if module supports feature, false if not, null if doesn't know or string for the module purpose.
|
||||
*/
|
||||
function workshop_supports($feature) {
|
||||
switch($feature) {
|
||||
@ -60,6 +60,7 @@ function workshop_supports($feature) {
|
||||
return true;
|
||||
case FEATURE_SHOW_DESCRIPTION: return true;
|
||||
case FEATURE_PLAGIARISM: return true;
|
||||
case FEATURE_MOD_PURPOSE: return MOD_PURPOSE_ASSESSMENT;
|
||||
default: return null;
|
||||
}
|
||||
}
|
||||
|
@ -187,7 +187,7 @@ class core_renderer extends \core_renderer {
|
||||
// Image data.
|
||||
if (isset($contextheader->imagedata)) {
|
||||
// Header specific image.
|
||||
$html .= html_writer::div($contextheader->imagedata, 'page-header-image icon-size-6');
|
||||
$html .= html_writer::div($contextheader->imagedata, 'page-header-image mr-2');
|
||||
}
|
||||
|
||||
// Headings.
|
||||
|
@ -2059,9 +2059,6 @@ nav.navbar .logo img {
|
||||
}
|
||||
|
||||
.page-header-image {
|
||||
margin-right: 1em;
|
||||
margin-bottom: 0.5em;
|
||||
margin-top: 0.7em;
|
||||
& > a {
|
||||
display: inline-block;
|
||||
}
|
||||
|
@ -85,14 +85,10 @@ body:not(.editing) .sitetopic ul.section {
|
||||
.contentwithoutlink,
|
||||
.activityinstance {
|
||||
min-width: 40%;
|
||||
display: table-cell;
|
||||
padding-right: 4px;
|
||||
min-height: 2em;
|
||||
|
||||
> a {
|
||||
display: inline-block;
|
||||
text-indent: -31px;
|
||||
padding-left: 31px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.dimmed {
|
||||
@ -154,14 +150,10 @@ body:not(.editing) .sitetopic ul.section {
|
||||
}
|
||||
}
|
||||
|
||||
.activity img.activityicon {
|
||||
margin-right: 6px;
|
||||
vertical-align: text-bottom;
|
||||
}
|
||||
|
||||
.section .activity .activityinstance,
|
||||
.section .activity .activityinstance div {
|
||||
display: inline-block;
|
||||
.section .activity .activityinstance {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.editing {
|
||||
@ -1333,26 +1325,6 @@ $activity-add-hover: theme-color-level('primary', -10) !default;
|
||||
}
|
||||
}
|
||||
|
||||
$activity-iconcontainer-width: 50px;
|
||||
$activity-iconcontainer-height: 50px;
|
||||
|
||||
.activity-item .activityiconcontainer {
|
||||
width: $activity-iconcontainer-width;
|
||||
height: $activity-iconcontainer-height;
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: $gray-100;
|
||||
border-radius: $border-radius;
|
||||
padding: 0.7rem;
|
||||
|
||||
.activityicon {
|
||||
margin: 0;
|
||||
height: 24px;
|
||||
width: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.description .course-description-item {
|
||||
background-color: $gray-100;
|
||||
padding-left: map-get($spacers, 3);
|
||||
|
@ -124,3 +124,36 @@ $iconsizes: map-merge((
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.activityiconcontainer {
|
||||
width: $activity-iconcontainer-width;
|
||||
height: $activity-iconcontainer-height;
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: $gray-100;
|
||||
border-radius: 4px;
|
||||
padding: 0.7rem;
|
||||
.activityicon {
|
||||
margin: 0;
|
||||
height: 24px;
|
||||
width: 24px;
|
||||
}
|
||||
}
|
||||
|
||||
@each $type, $value in $activity-icon-colors {
|
||||
.activityiconcontainer.#{$type} {
|
||||
background-color: $value;
|
||||
.activityicon {
|
||||
filter: brightness(0) invert(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Make activtity colours available for custom modules.
|
||||
:root {
|
||||
@each $type, $value in $activity-icon-colors {
|
||||
--activity#{$type}: #{$value};
|
||||
}
|
||||
}
|
||||
|
@ -34,3 +34,18 @@ $primary-light-background: theme-color-level('primary', -12) !default;
|
||||
$primary-light-border: theme-color-level('primary', -2) !default;
|
||||
$primary-light-color: $body-color;
|
||||
$primary-light-hover: theme-color-level('primary', -10) !default;
|
||||
$activity-iconcontainer-height: 50px;
|
||||
$activity-iconcontainer-width: 50px;
|
||||
|
||||
$activity-icon-colors: () !default;
|
||||
$activity-icon-colors: map-merge(
|
||||
(
|
||||
"administration": #5d63f6,
|
||||
"assessment": #eb66a2,
|
||||
"collaboration": #f7634d,
|
||||
"communication": #11a676,
|
||||
"content": #399be2,
|
||||
"interface": #a378ff
|
||||
),
|
||||
$activity-icon-colors
|
||||
);
|
||||
|
@ -11552,12 +11552,8 @@ nav.navbar .logo img {
|
||||
float: left;
|
||||
display: block;
|
||||
position: relative; }
|
||||
.page-context-header .page-header-image {
|
||||
margin-right: 1em;
|
||||
margin-bottom: 0.5em;
|
||||
margin-top: 0.7em; }
|
||||
.page-context-header .page-header-image > a {
|
||||
display: inline-block; }
|
||||
.page-context-header .page-header-image > a {
|
||||
display: inline-block; }
|
||||
.page-context-header .page-header-headings,
|
||||
.page-context-header .header-button-group {
|
||||
position: relative;
|
||||
@ -12344,6 +12340,58 @@ body.dragging .dragging {
|
||||
display: flex;
|
||||
align-items: center; }
|
||||
|
||||
.activityiconcontainer {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: #f8f9fa;
|
||||
border-radius: 4px;
|
||||
padding: 0.7rem; }
|
||||
.activityiconcontainer .activityicon {
|
||||
margin: 0;
|
||||
height: 24px;
|
||||
width: 24px; }
|
||||
|
||||
.activityiconcontainer.administration {
|
||||
background-color: #5d63f6; }
|
||||
.activityiconcontainer.administration .activityicon {
|
||||
filter: brightness(0) invert(1); }
|
||||
|
||||
.activityiconcontainer.assessment {
|
||||
background-color: #eb66a2; }
|
||||
.activityiconcontainer.assessment .activityicon {
|
||||
filter: brightness(0) invert(1); }
|
||||
|
||||
.activityiconcontainer.collaboration {
|
||||
background-color: #f7634d; }
|
||||
.activityiconcontainer.collaboration .activityicon {
|
||||
filter: brightness(0) invert(1); }
|
||||
|
||||
.activityiconcontainer.communication {
|
||||
background-color: #11a676; }
|
||||
.activityiconcontainer.communication .activityicon {
|
||||
filter: brightness(0) invert(1); }
|
||||
|
||||
.activityiconcontainer.content {
|
||||
background-color: #399be2; }
|
||||
.activityiconcontainer.content .activityicon {
|
||||
filter: brightness(0) invert(1); }
|
||||
|
||||
.activityiconcontainer.interface {
|
||||
background-color: #a378ff; }
|
||||
.activityiconcontainer.interface .activityicon {
|
||||
filter: brightness(0) invert(1); }
|
||||
|
||||
:root {
|
||||
--activityadministration: #5d63f6;
|
||||
--activityassessment: #eb66a2;
|
||||
--activitycollaboration: #f7634d;
|
||||
--activitycommunication: #11a676;
|
||||
--activitycontent: #399be2;
|
||||
--activityinterface: #a378ff; }
|
||||
|
||||
/* admin.less */
|
||||
.formtable tbody th {
|
||||
font-weight: normal;
|
||||
@ -13682,15 +13730,11 @@ body:not(.editing) .sitetopic ul.section {
|
||||
display: flex; }
|
||||
.section .activity .contentwithoutlink,
|
||||
.section .activity .activityinstance {
|
||||
min-width: 40%;
|
||||
display: table-cell;
|
||||
padding-right: 4px;
|
||||
min-height: 2em; }
|
||||
min-width: 40%; }
|
||||
.section .activity .contentwithoutlink > a,
|
||||
.section .activity .activityinstance > a {
|
||||
display: inline-block;
|
||||
text-indent: -31px;
|
||||
padding-left: 31px; }
|
||||
display: inline-flex;
|
||||
align-items: center; }
|
||||
.section .activity .contentwithoutlink .dimmed .activityicon,
|
||||
.section .activity .activityinstance .dimmed .activityicon {
|
||||
opacity: .5; }
|
||||
@ -13731,13 +13775,10 @@ body:not(.editing) .sitetopic ul.section {
|
||||
padding-bottom: initial;
|
||||
vertical-align: text-bottom; }
|
||||
|
||||
.activity img.activityicon {
|
||||
margin-right: 6px;
|
||||
vertical-align: text-bottom; }
|
||||
|
||||
.section .activity .activityinstance,
|
||||
.section .activity .activityinstance div {
|
||||
display: inline-block; }
|
||||
.section .activity .activityinstance {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
margin-bottom: 1rem; }
|
||||
|
||||
.editing .section .activity .contentwithoutlink,
|
||||
.editing .section .activity .activityinstance {
|
||||
@ -14596,20 +14637,6 @@ span.editinstructions {
|
||||
white-space: nowrap;
|
||||
display: inline-block; }
|
||||
|
||||
.activity-item .activityiconcontainer {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: #f8f9fa;
|
||||
border-radius: 0.25rem;
|
||||
padding: 0.7rem; }
|
||||
.activity-item .activityiconcontainer .activityicon {
|
||||
margin: 0;
|
||||
height: 24px;
|
||||
width: 24px; }
|
||||
|
||||
.description .course-description-item {
|
||||
background-color: #f8f9fa;
|
||||
padding-left: 1rem;
|
||||
|
@ -11552,12 +11552,8 @@ nav.navbar .logo img {
|
||||
float: left;
|
||||
display: block;
|
||||
position: relative; }
|
||||
.page-context-header .page-header-image {
|
||||
margin-right: 1em;
|
||||
margin-bottom: 0.5em;
|
||||
margin-top: 0.7em; }
|
||||
.page-context-header .page-header-image > a {
|
||||
display: inline-block; }
|
||||
.page-context-header .page-header-image > a {
|
||||
display: inline-block; }
|
||||
.page-context-header .page-header-headings,
|
||||
.page-context-header .header-button-group {
|
||||
position: relative;
|
||||
@ -12344,6 +12340,58 @@ body.dragging .dragging {
|
||||
display: flex;
|
||||
align-items: center; }
|
||||
|
||||
.activityiconcontainer {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: #f8f9fa;
|
||||
border-radius: 4px;
|
||||
padding: 0.7rem; }
|
||||
.activityiconcontainer .activityicon {
|
||||
margin: 0;
|
||||
height: 24px;
|
||||
width: 24px; }
|
||||
|
||||
.activityiconcontainer.administration {
|
||||
background-color: #5d63f6; }
|
||||
.activityiconcontainer.administration .activityicon {
|
||||
filter: brightness(0) invert(1); }
|
||||
|
||||
.activityiconcontainer.assessment {
|
||||
background-color: #eb66a2; }
|
||||
.activityiconcontainer.assessment .activityicon {
|
||||
filter: brightness(0) invert(1); }
|
||||
|
||||
.activityiconcontainer.collaboration {
|
||||
background-color: #f7634d; }
|
||||
.activityiconcontainer.collaboration .activityicon {
|
||||
filter: brightness(0) invert(1); }
|
||||
|
||||
.activityiconcontainer.communication {
|
||||
background-color: #11a676; }
|
||||
.activityiconcontainer.communication .activityicon {
|
||||
filter: brightness(0) invert(1); }
|
||||
|
||||
.activityiconcontainer.content {
|
||||
background-color: #399be2; }
|
||||
.activityiconcontainer.content .activityicon {
|
||||
filter: brightness(0) invert(1); }
|
||||
|
||||
.activityiconcontainer.interface {
|
||||
background-color: #a378ff; }
|
||||
.activityiconcontainer.interface .activityicon {
|
||||
filter: brightness(0) invert(1); }
|
||||
|
||||
:root {
|
||||
--activityadministration: #5d63f6;
|
||||
--activityassessment: #eb66a2;
|
||||
--activitycollaboration: #f7634d;
|
||||
--activitycommunication: #11a676;
|
||||
--activitycontent: #399be2;
|
||||
--activityinterface: #a378ff; }
|
||||
|
||||
/* admin.less */
|
||||
.formtable tbody th {
|
||||
font-weight: normal;
|
||||
@ -13682,15 +13730,11 @@ body:not(.editing) .sitetopic ul.section {
|
||||
display: flex; }
|
||||
.section .activity .contentwithoutlink,
|
||||
.section .activity .activityinstance {
|
||||
min-width: 40%;
|
||||
display: table-cell;
|
||||
padding-right: 4px;
|
||||
min-height: 2em; }
|
||||
min-width: 40%; }
|
||||
.section .activity .contentwithoutlink > a,
|
||||
.section .activity .activityinstance > a {
|
||||
display: inline-block;
|
||||
text-indent: -31px;
|
||||
padding-left: 31px; }
|
||||
display: inline-flex;
|
||||
align-items: center; }
|
||||
.section .activity .contentwithoutlink .dimmed .activityicon,
|
||||
.section .activity .activityinstance .dimmed .activityicon {
|
||||
opacity: .5; }
|
||||
@ -13731,13 +13775,10 @@ body:not(.editing) .sitetopic ul.section {
|
||||
padding-bottom: initial;
|
||||
vertical-align: text-bottom; }
|
||||
|
||||
.activity img.activityicon {
|
||||
margin-right: 6px;
|
||||
vertical-align: text-bottom; }
|
||||
|
||||
.section .activity .activityinstance,
|
||||
.section .activity .activityinstance div {
|
||||
display: inline-block; }
|
||||
.section .activity .activityinstance {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
margin-bottom: 1rem; }
|
||||
|
||||
.editing .section .activity .contentwithoutlink,
|
||||
.editing .section .activity .activityinstance {
|
||||
@ -14596,20 +14637,6 @@ span.editinstructions {
|
||||
white-space: nowrap;
|
||||
display: inline-block; }
|
||||
|
||||
.activity-item .activityiconcontainer {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
display: inline-flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-color: #f8f9fa;
|
||||
border-radius: 0.25rem;
|
||||
padding: 0.7rem; }
|
||||
.activity-item .activityiconcontainer .activityicon {
|
||||
margin: 0;
|
||||
height: 24px;
|
||||
width: 24px; }
|
||||
|
||||
.description .course-description-item {
|
||||
background-color: #f8f9fa;
|
||||
padding-left: 1rem;
|
||||
|
Loading…
x
Reference in New Issue
Block a user