Merge branch 'MDL-78884-master' of https://github.com/sarjona/moodle

This commit is contained in:
Huong Nguyen 2023-08-23 13:36:08 +07:00
commit 4f30570699
No known key found for this signature in database
GPG Key ID: 40D88AB693A3E72A
506 changed files with 489 additions and 238 deletions

View File

@ -82,7 +82,9 @@ class tool_filetypes_renderer extends plugin_renderer_base {
// First cell has icon and extension.
$icon = $this->pix_icon('f/' . $filetype['icon'], '');
$row->cells[] = new html_table_cell($icon . ' ' . html_writer::span(s($extension)));
$iconcell = new html_table_cell($icon . ' ' . html_writer::span(s($extension)));
$iconcell->attributes['class'] = 'icon-size-5';
$row->cells[] = $iconcell;
// Reset URL and button if needed.
$reverturl = new \moodle_url('/admin/tool/filetypes/revert.php',

View File

@ -14,16 +14,6 @@
// You should have received a copy of the GNU General Public License
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
/**
* Unit tests for the custom file types.
*
* @package tool_filetypes
* @copyright 2014 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined('MOODLE_INTERNAL') || die();
use tool_filetypes\utils;
/**
@ -32,10 +22,13 @@ use tool_filetypes\utils;
* @package tool_filetypes
* @copyright 2014 The Open University
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
* @coversDefaultClass \tool_filetypes\utils
*/
class tool_filetypes_test extends advanced_testcase {
/**
* Tests is_extension_invalid() function.
*
* @covers ::is_extension_invalid
*/
public function test_is_extension_invalid() {
// The pdf file extension already exists in default moodle minetypes.
@ -56,6 +49,8 @@ class tool_filetypes_test extends advanced_testcase {
/**
* Tests is_defaulticon_allowed() function.
*
* @covers ::is_defaulticon_allowed
*/
public function test_is_defaulticon_allowed() {
// You ARE allowed to set a default icon for a MIME type that hasn't
@ -73,6 +68,8 @@ class tool_filetypes_test extends advanced_testcase {
/**
* Tests get_icons_from_path() function.
*
* @covers ::get_icons_from_path
*/
public function test_get_icons_from_path() {
// Get icons from the fixtures folder.
@ -83,4 +80,14 @@ class tool_filetypes_test extends advanced_testcase {
// returned and only one of it.
$this->assertEquals(array('frog' => 'frog', 'zombie' => 'zombie'), $icons);
}
/**
* Test get_file_icons() function to confirm no file icons are removed/added by mistake.
*
* @covers ::get_file_icons
*/
public function test_get_file_icons() {
$icons = utils::get_file_icons();
$this->assertCount(30, $icons);
}
}

View File

@ -979,7 +979,7 @@ class core_course_renderer extends plugin_renderer_base {
html_writer::empty_tag('img', ['src' => $url, 'alt' => '']),
['class' => 'courseimage']);
} else {
$image = $this->output->pix_icon(file_file_icon($file, 24), $file->get_filename(), 'moodle');
$image = $this->output->pix_icon(file_file_icon($file), $file->get_filename(), 'moodle');
$filename = html_writer::tag('span', $image, ['class' => 'fp-icon']).
html_writer::tag('span', $file->get_filename(), ['class' => 'fp-filename']);
$contentfiles .= html_writer::tag('span',

View File

@ -147,7 +147,7 @@ class stored_file_exporter extends \core\external\exporter {
$filenameshort .= substr($filename, -4);
}
$icon = $this->file->is_directory() ? file_folder_icon(128) : file_file_icon($this->file, 128);
$icon = $this->file->is_directory() ? file_folder_icon() : file_file_icon($this->file);
$url = moodle_url::make_pluginfile_url(
$this->file->get_contextid(),

View File

@ -70,10 +70,10 @@ class core_files_renderer extends plugin_renderer_base {
if ($file['filesize']) {
$filesize = display_size($file['filesize']);
}
$fileicon = file_file_icon($file, 24);
$fileicon = file_file_icon($file);
$filetype = get_mimetype_description($file);
} else {
$fileicon = file_folder_icon(24);
$fileicon = file_folder_icon();
}
$table->data[] = array(
html_writer::link($file['url'], $this->output->pix_icon($fileicon, get_string('icon')) . ' ' . $file['filename']),

View File

@ -47,12 +47,12 @@ abstract class core_filetypes {
protected static function get_default_types() {
return array(
'xxx' => array('type' => 'document/unknown', 'icon' => 'unknown'),
'3gp' => array('type' => 'video/quicktime', 'icon' => 'quicktime', 'groups' => array('video'), 'string' => 'video'),
'3gp' => array('type' => 'video/quicktime', 'icon' => 'video', 'groups' => array('video'), 'string' => 'video'),
'7z' => array('type' => 'application/x-7z-compressed', 'icon' => 'archive',
'groups' => array('archive'), 'string' => 'archive'),
'aac' => array('type' => 'audio/aac', 'icon' => 'audio', 'groups' => array('audio', 'html_audio', 'web_audio'),
'string' => 'audio'),
'accdb' => array('type' => 'application/msaccess', 'icon' => 'base'),
'accdb' => array('type' => 'application/msaccess', 'icon' => 'database'),
'ai' => array('type' => 'application/postscript', 'icon' => 'eps', 'groups' => array('image'), 'string' => 'image'),
'aif' => array('type' => 'audio/x-aiff', 'icon' => 'audio', 'groups' => array('audio'), 'string' => 'audio'),
'aiff' => array('type' => 'audio/x-aiff', 'icon' => 'audio', 'groups' => array('audio'), 'string' => 'audio'),
@ -61,16 +61,16 @@ abstract class core_filetypes {
'asc' => array('type' => 'text/plain', 'icon' => 'sourcecode'),
'asm' => array('type' => 'text/plain', 'icon' => 'sourcecode'),
'au' => array('type' => 'audio/au', 'icon' => 'audio', 'groups' => array('audio'), 'string' => 'audio'),
'avi' => array('type' => 'video/x-ms-wm', 'icon' => 'avi',
'avi' => array('type' => 'video/x-ms-wm', 'icon' => 'video',
'groups' => array('video', 'web_video'), 'string' => 'video'),
'bmp' => array('type' => 'image/bmp', 'icon' => 'bmp', 'groups' => array('image'), 'string' => 'image'),
'bmp' => array('type' => 'image/bmp', 'icon' => 'image', 'groups' => array('image'), 'string' => 'image'),
'c' => array('type' => 'text/plain', 'icon' => 'sourcecode'),
'cct' => array('type' => 'shockwave/director', 'icon' => 'flash'),
'cpp' => array('type' => 'text/plain', 'icon' => 'sourcecode'),
'cs' => array('type' => 'application/x-csh', 'icon' => 'sourcecode'),
'css' => array('type' => 'text/css', 'icon' => 'text', 'groups' => array('web_file')),
'csv' => array('type' => 'text/csv', 'icon' => 'spreadsheet', 'groups' => array('spreadsheet')),
'dv' => array('type' => 'video/x-dv', 'icon' => 'quicktime', 'groups' => array('video'), 'string' => 'video'),
'dv' => array('type' => 'video/x-dv', 'icon' => 'video', 'groups' => array('video'), 'string' => 'video'),
'dmg' => array('type' => 'application/octet-stream', 'icon' => 'unknown'),
'doc' => array('type' => 'application/msword', 'icon' => 'document', 'groups' => array('document')),
@ -85,7 +85,7 @@ abstract class core_filetypes {
'dotm' => array('type' => 'application/vnd.ms-word.template.macroEnabled.12', 'icon' => 'document'),
'dcr' => array('type' => 'application/x-director', 'icon' => 'flash'),
'dif' => array('type' => 'video/x-dv', 'icon' => 'quicktime', 'groups' => array('video'), 'string' => 'video'),
'dif' => array('type' => 'video/x-dv', 'icon' => 'video', 'groups' => array('video'), 'string' => 'video'),
'dir' => array('type' => 'application/x-director', 'icon' => 'flash'),
'dxr' => array('type' => 'application/x-director', 'icon' => 'flash'),
'eps' => array('type' => 'application/postscript', 'icon' => 'eps'),
@ -96,7 +96,7 @@ abstract class core_filetypes {
'flv' => array('type' => 'video/x-flv', 'icon' => 'flash',
'groups' => array('video', 'web_video'), 'string' => 'video'),
'f4v' => array('type' => 'video/mp4', 'icon' => 'flash', 'groups' => array('video', 'web_video'), 'string' => 'video'),
'fmp4' => array('type' => 'video/mp4', 'icon' => 'mpeg', 'groups' => array('html_video', 'video', 'web_video'),
'fmp4' => array('type' => 'video/mp4', 'icon' => 'video', 'groups' => array('html_video', 'video', 'web_video'),
'string' => 'video'),
'gallery' => array('type' => 'application/x-smarttech-notebook', 'icon' => 'archive'),
'galleryitem' => array('type' => 'application/x-smarttech-notebook', 'icon' => 'archive'),
@ -121,9 +121,9 @@ abstract class core_filetypes {
'hqx' => array('type' => 'application/mac-binhex40', 'icon' => 'archive',
'groups' => array('archive'), 'string' => 'archive'),
'htc' => array('type' => 'text/x-component', 'icon' => 'markup'),
'html' => array('type' => 'text/html', 'icon' => 'html', 'groups' => array('web_file')),
'xhtml' => array('type' => 'application/xhtml+xml', 'icon' => 'html', 'groups' => array('web_file')),
'htm' => array('type' => 'text/html', 'icon' => 'html', 'groups' => array('web_file')),
'html' => array('type' => 'text/html', 'icon' => 'markup', 'groups' => array('web_file')),
'xhtml' => array('type' => 'application/xhtml+xml', 'icon' => 'markup', 'groups' => array('web_file')),
'htm' => array('type' => 'text/html', 'icon' => 'markup', 'groups' => array('web_file')),
'ico' => array('type' => 'image/vnd.microsoft.icon', 'icon' => 'image',
'groups' => array('image'), 'string' => 'image'),
'ics' => array('type' => 'text/calendar', 'icon' => 'text'),
@ -137,11 +137,11 @@ abstract class core_filetypes {
'jmt' => array('type' => 'text/xml', 'icon' => 'markup'),
'jmx' => array('type' => 'text/xml', 'icon' => 'markup'),
'jnlp' => array('type' => 'application/x-java-jnlp-file', 'icon' => 'markup'),
'jpe' => array('type' => 'image/jpeg', 'icon' => 'jpeg', 'groups' => array('image', 'web_image', 'optimised_image'),
'jpe' => array('type' => 'image/jpeg', 'icon' => 'image', 'groups' => array('image', 'web_image', 'optimised_image'),
'string' => 'image'),
'jpeg' => array('type' => 'image/jpeg', 'icon' => 'jpeg', 'groups' => array('image', 'web_image', 'optimised_image'),
'jpeg' => array('type' => 'image/jpeg', 'icon' => 'image', 'groups' => array('image', 'web_image', 'optimised_image'),
'string' => 'image'),
'jpg' => array('type' => 'image/jpeg', 'icon' => 'jpeg', 'groups' => array('image', 'web_image', 'optimised_image'),
'jpg' => array('type' => 'image/jpeg', 'icon' => 'image', 'groups' => array('image', 'web_image', 'optimised_image'),
'string' => 'image'),
'jqz' => array('type' => 'text/xml', 'icon' => 'markup'),
'js' => array('type' => 'application/x-javascript', 'icon' => 'text', 'groups' => array('web_file')),
@ -149,30 +149,30 @@ abstract class core_filetypes {
'latex' => array('type' => 'application/x-latex', 'icon' => 'text'),
'm' => array('type' => 'text/plain', 'icon' => 'sourcecode'),
'mbz' => array('type' => 'application/vnd.moodle.backup', 'icon' => 'moodle'),
'mdb' => array('type' => 'application/x-msaccess', 'icon' => 'base'),
'mdb' => array('type' => 'application/x-msaccess', 'icon' => 'database'),
'mht' => array('type' => 'message/rfc822', 'icon' => 'archive'),
'mhtml' => array('type' => 'message/rfc822', 'icon' => 'archive'),
'mov' => array('type' => 'video/quicktime', 'icon' => 'quicktime',
'mov' => array('type' => 'video/quicktime', 'icon' => 'video',
'groups' => array('video', 'web_video', 'html_video'), 'string' => 'video'),
'movie' => array('type' => 'video/x-sgi-movie', 'icon' => 'quicktime', 'groups' => array('video'), 'string' => 'video'),
'movie' => array('type' => 'video/x-sgi-movie', 'icon' => 'video', 'groups' => array('video'), 'string' => 'video'),
'mw' => array('type' => 'application/maple', 'icon' => 'math'),
'mws' => array('type' => 'application/maple', 'icon' => 'math'),
'm3u' => array('type' => 'audio/x-mpegurl', 'icon' => 'mp3', 'groups' => array('audio'), 'string' => 'audio'),
'm3u8' => array('type' => 'application/x-mpegURL', 'icon' => 'mpeg', 'groups' => array('media_source')),
'mp3' => array('type' => 'audio/mp3', 'icon' => 'mp3', 'groups' => array('audio', 'html_audio', 'web_audio'),
'm3u' => array('type' => 'audio/x-mpegurl', 'icon' => 'audio', 'groups' => array('audio'), 'string' => 'audio'),
'm3u8' => array('type' => 'application/x-mpegURL', 'icon' => 'video', 'groups' => array('media_source')),
'mp3' => array('type' => 'audio/mp3', 'icon' => 'audio', 'groups' => array('audio', 'html_audio', 'web_audio'),
'string' => 'audio'),
'mp4' => array('type' => 'video/mp4', 'icon' => 'mpeg', 'groups' => array('html_video', 'video', 'web_video'),
'mp4' => array('type' => 'video/mp4', 'icon' => 'video', 'groups' => array('html_video', 'video', 'web_video'),
'string' => 'video'),
'm4v' => array('type' => 'video/mp4', 'icon' => 'mpeg', 'groups' => array('html_video', 'video', 'web_video'),
'm4v' => array('type' => 'video/mp4', 'icon' => 'video', 'groups' => array('html_video', 'video', 'web_video'),
'string' => 'video'),
'm4a' => array('type' => 'audio/mp4', 'icon' => 'mp3', 'groups' => array('audio', 'html_audio', 'web_audio'),
'm4a' => array('type' => 'audio/mp4', 'icon' => 'audio', 'groups' => array('audio', 'html_audio', 'web_audio'),
'string' => 'audio'),
'mpeg' => array('type' => 'video/mpeg', 'icon' => 'mpeg', 'groups' => array('video', 'web_video'),
'mpeg' => array('type' => 'video/mpeg', 'icon' => 'video', 'groups' => array('video', 'web_video'),
'string' => 'video'),
'mpd' => array('type' => 'application/dash+xml', 'icon' => 'mpeg', 'groups' => array('media_source')),
'mpe' => array('type' => 'video/mpeg', 'icon' => 'mpeg', 'groups' => array('video', 'web_video'),
'mpd' => array('type' => 'application/dash+xml', 'icon' => 'video', 'groups' => array('media_source')),
'mpe' => array('type' => 'video/mpeg', 'icon' => 'video', 'groups' => array('video', 'web_video'),
'string' => 'video'),
'mpg' => array('type' => 'video/mpeg', 'icon' => 'mpeg', 'groups' => array('video', 'web_video'),
'mpg' => array('type' => 'video/mpeg', 'icon' => 'video', 'groups' => array('video', 'web_video'),
'string' => 'video'),
'mpr' => array('type' => 'application/vnd.moodle.profiling', 'icon' => 'moodle'),
@ -196,7 +196,7 @@ abstract class core_filetypes {
'icon' => 'calc', 'groups' => array('spreadsheet')),
'odc' => array('type' => 'application/vnd.oasis.opendocument.chart', 'icon' => 'chart'),
'odf' => array('type' => 'application/vnd.oasis.opendocument.formula', 'icon' => 'math'),
'odb' => array('type' => 'application/vnd.oasis.opendocument.database', 'icon' => 'base'),
'odb' => array('type' => 'application/vnd.oasis.opendocument.database', 'icon' => 'database'),
'odi' => array('type' => 'application/vnd.oasis.opendocument.image', 'icon' => 'draw'),
'oga' => array('type' => 'audio/ogg', 'icon' => 'audio', 'groups' => array('audio', 'html_audio', 'web_audio'),
'string' => 'audio'),
@ -210,7 +210,7 @@ abstract class core_filetypes {
'php' => array('type' => 'text/plain', 'icon' => 'sourcecode'),
'pic' => array('type' => 'image/pict', 'icon' => 'image', 'groups' => array('image'), 'string' => 'image'),
'pict' => array('type' => 'image/pict', 'icon' => 'image', 'groups' => array('image'), 'string' => 'image'),
'png' => array('type' => 'image/png', 'icon' => 'png', 'groups' => array('image', 'web_image', 'optimised_image'),
'png' => array('type' => 'image/png', 'icon' => 'image', 'groups' => array('image', 'web_image', 'optimised_image'),
'string' => 'image'),
'pps' => array('type' => 'application/vnd.ms-powerpoint', 'icon' => 'powerpoint', 'groups' => array('presentation')),
'ppt' => array('type' => 'application/vnd.ms-powerpoint', 'icon' => 'powerpoint', 'groups' => array('presentation')),
@ -231,7 +231,7 @@ abstract class core_filetypes {
'ps' => array('type' => 'application/postscript', 'icon' => 'pdf'),
'pub' => array('type' => 'application/x-mspublisher', 'icon' => 'publisher', 'groups' => array('presentation')),
'qt' => array('type' => 'video/quicktime', 'icon' => 'quicktime',
'qt' => array('type' => 'video/quicktime', 'icon' => 'video',
'groups' => array('video', 'web_video'), 'string' => 'video'),
'ra' => array('type' => 'audio/x-realaudio-plugin', 'icon' => 'audio',
'groups' => array('audio', 'web_audio'), 'string' => 'audio'),
@ -276,22 +276,22 @@ abstract class core_filetypes {
'sxm' => array('type' => 'application/vnd.sun.xml.math', 'icon' => 'math'),
'tar' => array('type' => 'application/x-tar', 'icon' => 'archive', 'groups' => array('archive'), 'string' => 'archive'),
'tif' => array('type' => 'image/tiff', 'icon' => 'tiff', 'groups' => array('image'), 'string' => 'image'),
'tiff' => array('type' => 'image/tiff', 'icon' => 'tiff', 'groups' => array('image'), 'string' => 'image'),
'tif' => array('type' => 'image/tiff', 'icon' => 'image', 'groups' => array('image'), 'string' => 'image'),
'tiff' => array('type' => 'image/tiff', 'icon' => 'image', 'groups' => array('image'), 'string' => 'image'),
'tex' => array('type' => 'application/x-tex', 'icon' => 'text'),
'texi' => array('type' => 'application/x-texinfo', 'icon' => 'text'),
'texinfo' => array('type' => 'application/x-texinfo', 'icon' => 'text'),
'ts' => array('type' => 'video/MP2T', 'icon' => 'mpeg', 'groups' => array('video', 'web_video'),
'ts' => array('type' => 'video/MP2T', 'icon' => 'video', 'groups' => array('video', 'web_video'),
'string' => 'video'),
'tsv' => array('type' => 'text/tab-separated-values', 'icon' => 'text'),
'txt' => array('type' => 'text/plain', 'icon' => 'text', 'defaulticon' => true),
'vtt' => array('type' => 'text/vtt', 'icon' => 'text', 'groups' => array('html_track')),
'wav' => array('type' => 'audio/wav', 'icon' => 'wav', 'groups' => array('audio', 'html_audio', 'web_audio'),
'wav' => array('type' => 'audio/wav', 'icon' => 'audio', 'groups' => array('audio', 'html_audio', 'web_audio'),
'string' => 'audio'),
'webm' => array('type' => 'video/webm', 'icon' => 'video', 'groups' => array('html_video', 'video', 'web_video'),
'string' => 'video'),
'wmv' => array('type' => 'video/x-ms-wmv', 'icon' => 'wmv', 'groups' => array('video'), 'string' => 'video'),
'asf' => array('type' => 'video/x-ms-asf', 'icon' => 'wmv', 'groups' => array('video'), 'string' => 'video'),
'wmv' => array('type' => 'video/x-ms-wmv', 'icon' => 'video', 'groups' => array('video'), 'string' => 'video'),
'asf' => array('type' => 'video/x-ms-asf', 'icon' => 'video', 'groups' => array('video'), 'string' => 'video'),
'wma' => array('type' => 'audio/x-ms-wma', 'icon' => 'audio', 'groups' => array('audio'), 'string' => 'audio'),
'xbk' => array('type' => 'application/x-smarttech-notebook', 'icon' => 'archive'),

View File

@ -134,7 +134,7 @@ class imsbadgeconnect extends base_definition {
$request = [
'client_name' => $SITE->fullname,
'client_uri' => $hosturl,
'logo_uri' => $hosturl . 'pix/f/moodle-256.png',
'logo_uri' => $hosturl . 'pix/moodlelogo.png',
'tos_uri' => $hosturl,
'policy_uri' => $hosturl,
'software_id' => 'moodle',

View File

@ -135,7 +135,7 @@ class moodlenet implements issuer_interface {
$request = [
'client_name' => $SITE->fullname,
'client_uri' => $hosturl,
'logo_uri' => $hosturl . '/pix/f/moodle-256.png',
'logo_uri' => $hosturl . '/pix/moodlelogo.png',
'tos_uri' => $hosturl,
'policy_uri' => $hosturl,
'software_id' => 'moodle',

View File

@ -3383,5 +3383,93 @@ privatefiles,moodle|/user/files.php';
upgrade_main_savepoint(true, 2023081800.01);
}
if ($oldversion < 2023082200.01) {
// Some MIME icons have been removed and replaced with existing icons. They need to be upgraded for custom MIME types.
$replacedicons = [
'avi' => 'video',
'base' => 'database',
'bmp' => 'image',
'html' => 'markup',
'jpeg' => 'image',
'mov' => 'video',
'mp3' => 'audio',
'mpeg' => 'video',
'png' => 'image',
'quicktime' => 'video',
'tiff' => 'image',
'wav' => 'audio',
'wmv' => 'video',
];
$custom = [];
if (!empty($CFG->customfiletypes)) {
if (array_key_exists('customfiletypes', $CFG->config_php_settings)) {
// It's set in config.php, so the MIME icons can't be upgraded automatically.
echo("\nYou need to manually check customfiletypes in config.php because some MIME icons have been removed!\n");
} else {
// It's a JSON string in the config table.
$custom = json_decode($CFG->customfiletypes);
}
}
$changed = false;
foreach ($custom as $customentry) {
if (!empty($customentry->icon) && array_key_exists($customentry->icon, $replacedicons)) {
$customentry->icon = $replacedicons[$customentry->icon];
$changed = true;
}
}
if ($changed) {
// Save the new customfiletypes.
set_config('customfiletypes', json_encode($custom));
}
// Main savepoint reached.
upgrade_main_savepoint(true, 2023082200.01);
}
if ($oldversion < 2023082200.02) {
// Some MIME icons have been removed. They need to be replaced to 'unknown' for custom MIME types.
$removedicons = array_flip([
'clip-353',
'edit',
'env',
'explore',
'folder-open',
'help',
'move',
'parent',
]);
$custom = [];
if (!empty($CFG->customfiletypes)) {
if (array_key_exists('customfiletypes', $CFG->config_php_settings)) {
// It's set in config.php, so the MIME icons can't be upgraded automatically.
echo("\nYou need to manually check customfiletypes in config.php because some MIME icons have been removed!\n");
} else {
// It's a JSON string in the config table.
$custom = json_decode($CFG->customfiletypes);
}
}
$changed = false;
foreach ($custom as $customentry) {
if (!empty($customentry->icon) && array_key_exists($customentry->icon, $removedicons)) {
// The icon has been removed, so set it to unknown.
$customentry->icon = 'unknown';
$changed = true;
}
}
if ($changed) {
// Save the new customfiletypes.
set_config('customfiletypes', json_encode($custom));
}
// Main savepoint reached.
upgrade_main_savepoint(true, 2023082200.02);
}
return true;
}

View File

@ -798,11 +798,11 @@ function file_get_drafarea_files($draftitemid, $filepath = '/') {
if ($file->is_directory()) {
$item->filesize = 0;
$item->icon = $OUTPUT->image_url(file_folder_icon(24))->out(false);
$item->icon = $OUTPUT->image_url(file_folder_icon())->out(false);
$item->type = 'folder';
$foldername = explode('/', trim($item->filepath, '/'));
$item->fullname = trim(array_pop($foldername), '/');
$item->thumbnail = $OUTPUT->image_url(file_folder_icon(90))->out(false);
$item->thumbnail = $OUTPUT->image_url(file_folder_icon())->out(false);
} else {
// do NOT use file browser here!
$item->mimetype = get_mimetype_description($file);
@ -813,8 +813,8 @@ function file_get_drafarea_files($draftitemid, $filepath = '/') {
}
$itemurl = moodle_url::make_draftfile_url($draftitemid, $item->filepath, $item->filename);
$item->url = $itemurl->out();
$item->icon = $OUTPUT->image_url(file_file_icon($file, 24))->out(false);
$item->thumbnail = $OUTPUT->image_url(file_file_icon($file, 90))->out(false);
$item->icon = $OUTPUT->image_url(file_file_icon($file))->out(false);
$item->thumbnail = $OUTPUT->image_url(file_file_icon($file))->out(false);
// The call to $file->get_imageinfo() fails with an exception if the file can't be read on the file system.
// We still want to add such files to the list, so the owner can view and delete them if needed. So, we only call
@ -1811,7 +1811,7 @@ function mimeinfo($element, $filename) {
* the other way around.
*
* @category files
* @param string $element Desired information ('extension', 'icon', 'icon-24', etc.)
* @param string $element Desired information ('extension', 'icon', etc.)
* @param string $mimetype MIME type we're looking up
* @return string Requested piece of information from array
*/
@ -1860,10 +1860,14 @@ function mimeinfo_from_type($element, $mimetype) {
*
* @param stored_file|file_info|stdClass|array $file (in case of object attributes $file->filename
* and $file->mimetype are expected)
* @param int $size The size of the icon. Defaults to 16 can also be 24, 32, 64, 128, 256
* @param null $unused This parameter has been deprecated since 4.3 and should not be used anymore.
* @return string
*/
function file_file_icon($file, $size = null) {
function file_file_icon($file, $unused = null) {
if ($unused !== null) {
debugging('Deprecated argument passed to ' . __FUNCTION__, DEBUG_DEVELOPER);
}
if (!is_object($file)) {
$file = (object)$file;
}
@ -1888,14 +1892,14 @@ function file_file_icon($file, $size = null) {
$extension = strtolower(pathinfo($filename, PATHINFO_EXTENSION));
if ($extension && !empty($mimetypes[$extension])) {
// if file name has known extension, return icon for this extension
return file_extension_icon($filename, $size);
return file_extension_icon($filename);
}
}
return file_mimetype_icon($mimetype, $size);
return file_mimetype_icon($mimetype);
}
/**
* Return the relative icon path for a folder image
* Return the relative icon path for a folder image.
*
* Usage:
* <code>
@ -1904,28 +1908,20 @@ function file_file_icon($file, $size = null) {
* </code>
* or
* <code>
* echo $OUTPUT->pix_icon(file_folder_icon(32), '');
* echo $OUTPUT->pix_icon(file_folder_icon(), '');
* </code>
*
* @param int $iconsize The size of the icon. Defaults to 16 can also be 24, 32, 48, 64, 72, 80, 96, 128, 256
* @param null $unused This parameter has been deprecated since 4.3 and should not be used anymore.
* @return string
*/
function file_folder_icon($iconsize = null) {
function file_folder_icon($unused = null) {
global $CFG;
static $iconpostfixes = array(256=>'-256', 128=>'-128', 96=>'-96', 80=>'-80', 72=>'-72', 64=>'-64', 48=>'-48', 32=>'-32', 24=>'-24', 16=>'');
static $cached = array();
$iconsize = max(array(16, (int)$iconsize));
if (!array_key_exists($iconsize, $cached)) {
foreach ($iconpostfixes as $size => $postfix) {
$fullname = $CFG->dirroot.'/pix/f/folder'.$postfix;
if ($iconsize >= $size &&
(file_exists($fullname.'.svg') || file_exists($fullname.'.png') || file_exists($fullname.'.gif'))) {
$cached[$iconsize] = 'f/folder'.$postfix;
break;
}
}
if ($unused !== null) {
debugging('Deprecated argument passed to ' . __FUNCTION__, DEBUG_DEVELOPER);
}
return $cached[$iconsize];
return 'f/folder';
}
/**
@ -1944,11 +1940,11 @@ function file_folder_icon($iconsize = null) {
* @todo MDL-31074 When an $OUTPUT->icon method is available this function should be altered
* to conform with that.
* @param string $mimetype The mimetype to fetch an icon for
* @param int $size The size of the icon. Defaults to 16 can also be 24, 32, 64, 128, 256
* @param null $unused This parameter has been deprecated since 4.3 and should not be used anymore.
* @return string The relative path to the icon
*/
function file_mimetype_icon($mimetype, $size = NULL) {
return 'f/'.mimeinfo_from_type('icon'.$size, $mimetype);
function file_mimetype_icon($mimetype, $unused = null) {
return 'f/'.mimeinfo_from_type('icon', $mimetype);
}
/**
@ -1968,11 +1964,14 @@ function file_mimetype_icon($mimetype, $size = NULL) {
* @todo MDL-31074 Implement $size
* @category files
* @param string $filename The filename to get the icon for
* @param int $size The size of the icon. Defaults to 16 can also be 24, 32, 64, 128, 256
* @param null $unused This parameter has been deprecated since 4.3 and should not be used anymore.
* @return string
*/
function file_extension_icon($filename, $size = NULL) {
return 'f/'.mimeinfo('icon'.$size, $filename);
function file_extension_icon($filename, $unused = null) {
if ($unused !== null) {
debugging('Deprecated argument passed to ' . __FUNCTION__, DEBUG_DEVELOPER);
}
return 'f/'.mimeinfo('icon', $filename);
}
/**
@ -2675,14 +2674,14 @@ function send_file($path, $filename, $lifetime = null , $filter=0, $pathisstring
* Note: it's up to the consumer to set it properly i.e. when serving a "versioned" URL.
*
* @category files
* @param stored_file $stored_file local file object
* @param stored_file $storedfile local file object
* @param int $lifetime Number of seconds before the file should expire from caches (null means $CFG->filelifetime)
* @param int $filter 0 (default)=no filtering, 1=all files, 2=html files only
* @param bool $forcedownload If true (default false), forces download of file rather than view in browser/plugin
* @param array $options additional options affecting the file serving
* @return null script execution stopped unless $options['dontdie'] is true
*/
function send_stored_file($stored_file, $lifetime=null, $filter=0, $forcedownload=false, array $options=array()) {
function send_stored_file($storedfile, $lifetime=null, $filter=0, $forcedownload=false, array $options=array()) {
global $CFG, $COURSE;
static $recursion = 0;
@ -2706,22 +2705,15 @@ function send_stored_file($stored_file, $lifetime=null, $filter=0, $forcedownloa
if (!empty($options['preview'])) {
// replace the file with its preview
$fs = get_file_storage();
$preview_file = $fs->get_file_preview($stored_file, $options['preview']);
if (!$preview_file) {
// unable to create a preview of the file, send its default mime icon instead
if ($options['preview'] === 'tinyicon') {
$size = 24;
} else if ($options['preview'] === 'thumb') {
$size = 90;
} else {
$size = 256;
}
$fileicon = file_file_icon($stored_file, $size);
send_file($CFG->dirroot.'/pix/'.$fileicon.'.png', basename($fileicon).'.png');
$previewfile = $fs->get_file_preview($storedfile, $options['preview']);
if (!$previewfile) {
// Unable to create a preview of the file, send its default mime icon instead.
$fileicon = file_file_icon($storedfile);
send_file($CFG->dirroot.'/pix/'.$fileicon.'.svg', basename($fileicon).'.svg');
} else {
// preview images have fixed cache lifetime and they ignore forced download
// (they are generated by GD and therefore they are considered reasonably safe).
$stored_file = $preview_file;
$storedfile = $previewfile;
$lifetime = DAYSECS;
$filter = 0;
$forcedownload = false;
@ -2729,7 +2721,7 @@ function send_stored_file($stored_file, $lifetime=null, $filter=0, $forcedownloa
}
// handle external resource
if ($stored_file && $stored_file->is_external_file() && !isset($options['sendcachedexternalfile'])) {
if ($storedfile && $storedfile->is_external_file() && !isset($options['sendcachedexternalfile'])) {
// Have we been here before?
$recursion++;
@ -2737,22 +2729,22 @@ function send_stored_file($stored_file, $lifetime=null, $filter=0, $forcedownloa
throw new coding_exception('Recursive file serving detected');
}
$stored_file->send_file($lifetime, $filter, $forcedownload, $options);
$storedfile->send_file($lifetime, $filter, $forcedownload, $options);
die;
}
if (!$stored_file or $stored_file->is_directory()) {
// nothing to serve
if (!$storedfile || $storedfile->is_directory()) {
// Nothing to serve.
if ($dontdie) {
return;
}
die;
}
$filename = is_null($filename) ? $stored_file->get_filename() : $filename;
$filename = is_null($filename) ? $storedfile->get_filename() : $filename;
// Use given MIME type if specified.
$mimetype = $stored_file->get_mimetype();
$mimetype = $storedfile->get_mimetype();
// Allow cross-origin requests only for Web Services.
// This allow to receive requests done by Web Workers or webapps in different domains.
@ -2760,7 +2752,7 @@ function send_stored_file($stored_file, $lifetime=null, $filter=0, $forcedownloa
header('Access-Control-Allow-Origin: *');
}
send_file($stored_file, $filename, $lifetime, $filter, false, $forcedownload, $mimetype, $dontdie, $options);
send_file($storedfile, $filename, $lifetime, $filter, false, $forcedownload, $mimetype, $dontdie, $options);
}
/**

View File

@ -131,7 +131,7 @@ class google_docs {
'url' => "{$gdoc->link[0]->attributes()->href}",
'source' => $source,
'date' => strtotime($gdoc->updated),
'thumbnail' => (string) $OUTPUT->image_url(file_extension_icon($title, 32))
'thumbnail' => (string) $OUTPUT->image_url(file_extension_icon($title))
);
}
core_date::set_default_server_timezone();

View File

@ -87,6 +87,38 @@ information provided here is intended especially for developers.
to ensure in some test that the block drawer is closed. This helps with random failures due to the block drawer
being forced open in all behat tests.
* The core_useragent::get_device_type_list() function has been deprecated. Use core_useragent::devicetypes instead as a replacement.
* The parameter $size of the following functions has been deprecated and is not used any more:
- file_extension_icon
- file_file_icon
- file_folder_icon
- file_mimetype_icon
- mimeinfo_from_type
- url_guess_icon
* The xxxxxxx-yyy.png MIME icons placed in pix/f have been removed and replaced with new SVG files.
In order to reduce the number of icons for the MIME types, a few MIME icons have been removed and
replaced with their generic from the existing ones:
- avi -> video
- base -> database
- bmp -> image
- html -> markup
- jpeg -> image
- mov -> video
- mp3 -> audio
- mpeg -> video
- png -> image
- quicktime -> video
- tiff -> image
- wav -> audio
- wmv -> video
Apart from that, the following MIME icons have been completely removed:
- clip-353 --> It was added in MDL-75362 by mistake.
- edit
- env
- explore
- folder-open
- help
- move
- parent
=== 4.2 ===

View File

@ -205,7 +205,7 @@ class files {
);
return [
'icondesc' => get_mimetype_description($file),
'iconname' => file_file_icon($file, 24),
'iconname' => file_file_icon($file),
'name' => $file->get_filename(),
'url' => $url->out(false),
];

View File

@ -282,7 +282,7 @@ function toolbook_importhtml_get_chapter_files($package, $type) {
} else {
$mime = mimeinfo('icon', $file->pathname);
if ($mime !== 'html') {
if ($mime !== 'markup') {
continue;
}
$level = substr_count($file->pathname, '/');

View File

@ -625,7 +625,7 @@ function folder_get_recent_mod_activity(&$activities, &$index, $timestart, $cour
$image = $url->out(false, array('preview' => 'tinyicon', 'oid' => $file->get_timemodified()));
$image = html_writer::empty_tag('img', array('src' => $image));
} else {
$image = $OUTPUT->pix_icon(file_file_icon($file, 24), $file->get_filename(), 'moodle');
$image = $OUTPUT->pix_icon(file_file_icon($file), $file->get_filename(), 'moodle');
}
$tmpactivity->content = (object) [

View File

@ -121,7 +121,7 @@ class mod_folder_renderer extends plugin_renderer_base {
}
$result = '<ul>';
foreach ($dir['subdirs'] as $subdir) {
$image = $this->output->pix_icon(file_folder_icon(24), $subdir['dirname'], 'moodle');
$image = $this->output->pix_icon(file_folder_icon(), $subdir['dirname'], 'moodle');
$filename = html_writer::tag('span', $image, array('class' => 'fp-icon')).
html_writer::tag('span', s($subdir['dirname']), array('class' => 'fp-filename'));
$filename = html_writer::tag('div', $filename, array('class' => 'fp-filename-icon'));
@ -136,7 +136,7 @@ class mod_folder_renderer extends plugin_renderer_base {
$image = $url->out(false, array('preview' => 'tinyicon', 'oid' => $file->get_timemodified()));
$image = html_writer::empty_tag('img', array('src' => $image));
} else {
$image = $this->output->pix_icon(file_file_icon($file, 24), $filenamedisplay, 'moodle');
$image = $this->output->pix_icon(file_file_icon($file), $filenamedisplay, 'moodle');
}
$filename = html_writer::tag('span', $image, array('class' => 'fp-icon')).
html_writer::tag('span', $filenamedisplay, array('class' => 'fp-filename'));

View File

@ -59,9 +59,9 @@ class externallib_test extends externallib_advanced_testcase {
/**
* Get the expected attachment.
*
* @param stored_file $file
* @param \stored_file $file
* @param array $values
* @param moodle_url|null $url
* @param \moodle_url|null $url
* @return array
*/
protected function get_expected_attachment(\stored_file $file, array $values = [], ?\moodle_url $url = null): array {
@ -94,7 +94,7 @@ class externallib_test extends externallib_advanced_testcase {
'license' => $file->get_license(),
'filenameshort' => $file->get_filename(),
'filesizeformatted' => display_size((int) $file->get_filesize()),
'icon' => $file->is_directory() ? file_folder_icon(128) : file_file_icon($file, 128),
'icon' => $file->is_directory() ? file_folder_icon() : file_file_icon($file),
'timecreatedformatted' => userdate($file->get_timecreated()),
'timemodifiedformatted' => userdate($file->get_timemodified()),
'url' => $url->out(),

View File

@ -220,8 +220,8 @@ function url_get_coursemodule_info($coursemodule) {
$info = new cached_cm_info();
$info->name = $url->name;
//note: there should be a way to differentiate links from normal resources
$info->icon = url_guess_icon($url->externalurl, 24);
// Note: there should be a way to differentiate links from normal resources.
$info->icon = url_guess_icon($url->externalurl);
$display = url_get_final_display_type($url);
@ -245,8 +245,8 @@ function url_get_coursemodule_info($coursemodule) {
}
$info->customdata['display'] = $display;
// The icon will be filtered if it will be the default module icon.
$info->customdata['filtericon'] = empty($info->icon);
// The icon will be filtered from now on because the custom icons have been updated.
$info->customdata['filtericon'] = true;
return $info;
}

View File

@ -528,13 +528,17 @@ function url_get_encrypted_parameter($url, $config) {
/**
* Optimised mimetype detection from general URL
* @param $fullurl
* @param int $size of the icon.
* @param null $unused This parameter has been deprecated since 4.3 and should not be used anymore.
* @return string|null mimetype or null when the filetype is not relevant.
*/
function url_guess_icon($fullurl, $size = null) {
function url_guess_icon($fullurl, $unused = null) {
global $CFG;
require_once("$CFG->libdir/filelib.php");
if ($unused !== null) {
debugging('Deprecated argument passed to ' . __FUNCTION__, DEBUG_DEVELOPER);
}
if (substr_count($fullurl, '/') < 3 or substr($fullurl, -1) === '/') {
// Most probably default directory - index.php, index.html, etc. Return null because
// we want to use the default module icon instead of the HTML file icon.
@ -551,10 +555,10 @@ function url_guess_icon($fullurl, $size = null) {
return null;
}
$icon = file_extension_icon($fullurl, $size);
$htmlicon = file_extension_icon('.htm', $size);
$unknownicon = file_extension_icon('', $size);
$phpicon = file_extension_icon('.php', $size); // Exception for php files.
$icon = file_extension_icon($fullurl);
$htmlicon = file_extension_icon('.htm');
$unknownicon = file_extension_icon('');
$phpicon = file_extension_icon('.php'); // Exception for php files.
// We do not want to return those icon types, the module icon is more appropriate.
if ($icon === $unknownicon || $icon === $htmlicon || $icon === $phpicon) {

View File

@ -1,15 +0,0 @@
FileTypesIcons Copyright 2012 Renato Veras
These icons are free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

View File

@ -1,15 +0,0 @@
FileTypesIcons Copyright 2012 Oxygen Team
These icons are free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 567 B

3
pix/f/archive.svg Normal file
View File

@ -0,0 +1,3 @@
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M19.5 19C19.5 20.3807 18.3807 21.5 17 21.5H7C5.61929 21.5 4.5 20.3807 4.5 19V5C4.5 3.61929 5.61929 2.5 7 2.5H13.1716C13.8346 2.5 14.4705 2.76339 14.9393 3.23223L18.7678 7.06066C19.2366 7.5295 19.5 8.16539 19.5 8.82843V19ZM7 3.5C6.17157 3.5 5.5 4.17157 5.5 5V19C5.5 19.8284 6.17157 20.5 7 20.5H17C17.8284 20.5 18.5 19.8284 18.5 19V9C18.5 8.72386 18.2761 8.5 18 8.5H15C14.1716 8.5 13.5 7.82843 13.5 7V4C13.5 3.72386 13.2761 3.5 13 3.5H10.5V6.5H11C11.2761 6.5 11.5 6.72386 11.5 7C11.5 7.27614 11.2761 7.5 11 7.5H10.5V8.5H11C11.2761 8.5 11.5 8.72386 11.5 9C11.5 9.27614 11.2761 9.5 11 9.5H10.5V10.5H11C11.2761 10.5 11.5 10.7239 11.5 11C11.5 11.2761 11.2761 11.5 11 11.5H10.5V12.5H11C11.2761 12.5 11.5 12.7239 11.5 13C11.5 13.2761 11.2761 13.5 11 13.5H10.5L10.5 14.5H11C11.2761 14.5 11.5 14.7239 11.5 15V16C11.5 16.8284 10.8284 17.5 10 17.5C9.17157 17.5 8.5 16.8284 8.5 16V15C8.5 14.7239 8.72386 14.5 9 14.5H9.5L9.5 12.5H9C8.72386 12.5 8.5 12.2761 8.5 12C8.5 11.7239 8.72386 11.5 9 11.5H9.5V10.5H9C8.72386 10.5 8.5 10.2761 8.5 10C8.5 9.72386 8.72386 9.5 9 9.5H9.5V8.5H9C8.72386 8.5 8.5 8.27614 8.5 8C8.5 7.72386 8.72386 7.5 9 7.5H9.5V6.5H9C8.72386 6.5 8.5 6.27614 8.5 6C8.5 5.72386 8.72386 5.5 9 5.5L9.5 5.5V3.5H7ZM14.5 4.20711V7C14.5 7.27614 14.7239 7.5 15 7.5H17.7929L14.5 4.20711ZM9.5 15.5V16C9.5 16.2761 9.72386 16.5 10 16.5C10.2761 16.5 10.5 16.2761 10.5 16V15.5H9.5Z" fill="#212529"/>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 793 B

6
pix/f/audio.svg Normal file
View File

@ -0,0 +1,6 @@
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M7 14C7 13.1716 7.67157 12.5 8.5 12.5H9.29282L10.4393 11.3535C11.3843 10.4085 13 11.0778 13 12.4141V16.5857C13 17.9221 11.3843 18.5913 10.4393 17.6464L9.29297 16.5H8.5C7.67157 16.5 7 15.8284 7 15V14ZM9.49133 15.5C9.62217 15.4977 9.75372 15.5465 9.85355 15.6464L11.1464 16.9393C11.4614 17.2542 12 17.0312 12 16.5857V12.4141C12 11.9687 11.4614 11.7456 11.1464 12.0606L9.85355 13.3535C9.75592 13.4511 9.62796 13.4999 9.5 13.4999L8.5 13.5C8.22386 13.5 8 13.7239 8 14V15C8 15.2761 8.22386 15.5 8.5 15.5H9.49133Z" fill="#212529"/>
<path d="M13.6843 13.0745C13.8764 12.8762 14.1929 12.8711 14.3913 13.0632C14.7661 13.4262 15.0001 13.9362 15.0001 14.5C15.0001 15.0638 14.7661 15.5739 14.3913 15.9369C14.1929 16.129 13.8764 16.1239 13.6843 15.9255C13.4922 15.7271 13.4973 15.4106 13.6956 15.2185C13.884 15.0361 14.0001 14.7821 14.0001 14.5C14.0001 14.218 13.884 13.9639 13.6956 13.7815C13.4973 13.5894 13.4922 13.2729 13.6843 13.0745Z" fill="#212529"/>
<path d="M14.7147 10.8852C14.4652 10.7667 14.167 10.8728 14.0485 11.1222C13.93 11.3717 14.0361 11.6699 14.2856 11.7884C15.3003 12.2705 16.0001 13.304 16.0001 14.5C16.0001 15.696 15.3003 16.7295 14.2856 17.2115C14.0361 17.33 13.93 17.6283 14.0485 17.8777C14.167 18.1271 14.4652 18.2333 14.7147 18.1148C16.0649 17.4734 17.0001 16.0964 17.0001 14.5C17.0001 12.9036 16.0649 11.5266 14.7147 10.8852Z" fill="#212529"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M19.5 19C19.5 20.3807 18.3807 21.5 17 21.5H7C5.61929 21.5 4.5 20.3807 4.5 19V5C4.5 3.61929 5.61929 2.5 7 2.5H13.1716C13.8346 2.5 14.4705 2.76339 14.9393 3.23223L18.7678 7.06066C19.2366 7.5295 19.5 8.16539 19.5 8.82843V19ZM5.5 5C5.5 4.17157 6.17157 3.5 7 3.5H13C13.2761 3.5 13.5 3.72386 13.5 4V7C13.5 7.82843 14.1716 8.5 15 8.5H18C18.2761 8.5 18.5 8.72386 18.5 9V19C18.5 19.8284 17.8284 20.5 17 20.5H7C6.17157 20.5 5.5 19.8284 5.5 19V5ZM14.5 4.20711L17.7929 7.5H15C14.7239 7.5 14.5 7.27614 14.5 7V4.20711Z" fill="#212529"/>
</svg>

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 706 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1018 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 475 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 667 B

4
pix/f/calc.svg Normal file
View File

@ -0,0 +1,4 @@
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.5 12.5C7.5 11.3954 8.39543 10.5 9.5 10.5H14.5C15.6046 10.5 16.5 11.3954 16.5 12.5V16.5C16.5 17.6046 15.6046 18.5 14.5 18.5H9.5C8.39543 18.5 7.5 17.6046 7.5 16.5V12.5ZM10.5 17.5H14.5C15.0523 17.5 15.5 17.0523 15.5 16.5H10.5V17.5ZM9.5 16.5L9.5 17.5C8.94772 17.5 8.5 17.0523 8.5 16.5H9.5ZM10.5 15.5L15.5 15.5V14.5L10.5 14.5V15.5ZM9.5 14.5V15.5H8.5V14.5H9.5ZM10.5 13.5L15.5 13.5V12.5C15.5 11.9477 15.0523 11.5 14.5 11.5H10.5V13.5ZM9.5 11.5C8.94772 11.5 8.5 11.9477 8.5 12.5V13.5H9.5V11.5Z" fill="#212529"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M19.5 19C19.5 20.3807 18.3807 21.5 17 21.5H7C5.61929 21.5 4.5 20.3807 4.5 19V5C4.5 3.61929 5.61929 2.5 7 2.5H13.1716C13.8346 2.5 14.4705 2.76339 14.9393 3.23223L18.7678 7.06066C19.2366 7.5295 19.5 8.16539 19.5 8.82843V19ZM5.5 5C5.5 4.17157 6.17157 3.5 7 3.5H13C13.2761 3.5 13.5 3.72386 13.5 4V7C13.5 7.82843 14.1716 8.5 15 8.5H18C18.2761 8.5 18.5 8.72386 18.5 9V19C18.5 19.8284 17.8284 20.5 17 20.5H7C6.17157 20.5 5.5 19.8284 5.5 19V5ZM14.5 4.20711L17.7929 7.5H15C14.7239 7.5 14.5 7.27614 14.5 7V4.20711Z" fill="#212529"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 458 B

3
pix/f/chart.svg Normal file
View File

@ -0,0 +1,3 @@
<svg viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M7 3.5C6.17157 3.5 5.5 4.17157 5.5 5V19C5.5 19.8284 6.17157 20.5 7 20.5H17C17.8284 20.5 18.5 19.8284 18.5 19V9C18.5 8.72386 18.2761 8.5 18 8.5H15C14.1716 8.5 13.5 7.82843 13.5 7V4C13.5 3.72386 13.2761 3.5 13 3.5H7ZM19.5 19V9V8.82843C19.5 8.16539 19.2366 7.5295 18.7678 7.06066L14.9393 3.23223C14.4705 2.76339 13.8346 2.5 13.1716 2.5H13H7C5.61929 2.5 4.5 3.61929 4.5 5V19C4.5 20.3807 5.61929 21.5 7 21.5H17C18.3807 21.5 19.5 20.3807 19.5 19ZM17.7929 7.5L14.5 4.20711V7C14.5 7.27614 14.7239 7.5 15 7.5H17.7929ZM9.5 10C9.5 9.72386 9.27614 9.5 9 9.5C8.72386 9.5 8.5 9.72386 8.5 10V17C8.5 17.2761 8.72386 17.5 9 17.5C9.27614 17.5 9.5 17.2761 9.5 17V10ZM12 11.5C12.2761 11.5 12.5 11.7239 12.5 12V17C12.5 17.2761 12.2761 17.5 12 17.5C11.7239 17.5 11.5 17.2761 11.5 17V12C11.5 11.7239 11.7239 11.5 12 11.5ZM15.5 13C15.5 12.7239 15.2761 12.5 15 12.5C14.7239 12.5 14.5 12.7239 14.5 13V17C14.5 17.2761 14.7239 17.5 15 17.5C15.2761 17.5 15.5 17.2761 15.5 17V13Z" fill="#212529"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Some files were not shown because too many files have changed in this diff Show More