Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions blocks/microsoft/block_microsoft.php
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,31 @@ protected function get_user_content_connected() {
}
}

// Microsoft Word.
if (!empty($this->globalconfig->settings_showword)) {
$wordurl = 'https://word.cloud.microsoft';
$wordattrs = ['target' => '_blank', 'rel' => 'noopener noreferrer', 'class' => 'servicelink block_microsoft_word'];
$items[] = html_writer::link($wordurl, get_string('linkword', 'block_microsoft'), $wordattrs);
}

// Microsoft Excel.
if (!empty($this->globalconfig->settings_showexcel)) {
$excelurl = 'https://excel.cloud.microsoft';
$excelattrs = ['target' => '_blank', 'rel' => 'noopener noreferrer', 'class' => 'servicelink block_microsoft_excel'];
$items[] = html_writer::link($excelurl, get_string('linkexcel', 'block_microsoft'), $excelattrs);
}

// Microsoft PowerPoint.
if (!empty($this->globalconfig->settings_showpowerpoint)) {
$powerpointurl = 'https://powerpoint.cloud.microsoft';
$powerpointattrs = [
'target' => '_blank',
'rel' => 'noopener noreferrer',
'class' => 'servicelink block_microsoft_powerpoint',
];
$items[] = html_writer::link($powerpointurl, get_string('linkpowerpoint', 'block_microsoft'), $powerpointattrs);
}
Comment thread
patmr7 marked this conversation as resolved.

// Microsoft Stream (on SharePoint).
if (!empty($this->globalconfig->settings_showmsstreamonsharepoint)) {
$streamurl = 'https://www.microsoft365.com/launch/stream';
Expand All @@ -415,6 +440,28 @@ protected function get_user_content_connected() {
$items[] = html_writer::link($teamsurl, get_string('linkmsteams', 'block_microsoft'), $teamsattrs);
}

// Viva Engage.
if (!empty($this->globalconfig->settings_showvivaengage)) {
$vivaengageurl = 'https://engage.cloud.microsoft';
$vivaengageattrs = [
'target' => '_blank',
'rel' => 'noopener noreferrer',
'class' => 'servicelink block_microsoft_vivaengage',
];
$items[] = html_writer::link($vivaengageurl, get_string('linkvivaengage', 'block_microsoft'), $vivaengageattrs);
}

// Viva Learning.
if (!empty($this->globalconfig->settings_showvivalearning)) {
$vivalearningurl = 'https://learning.cloud.microsoft';
$vivalearningattrs = [
'target' => '_blank',
'rel' => 'noopener noreferrer',
'class' => 'servicelink block_microsoft_vivalearning',
];
$items[] = html_writer::link($vivalearningurl, get_string('linkvivalearning', 'block_microsoft'), $vivalearningattrs);
}
Comment thread
patmr7 marked this conversation as resolved.

// My Sways.
if (!empty($this->globalconfig->settings_showsways) && !empty($userupn)) {
$swayurl = 'https://www.sway.com/my?auth_pvr=OrgId&auth_upn=' . $userupn;
Expand Down
15 changes: 15 additions & 0 deletions blocks/microsoft/lang/en/block_microsoft.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@
$string['linkmsstream'] = 'Microsoft Stream';
$string['linkmsstreamclassic'] = 'Microsoft Stream (classic)';
$string['linkmsteams'] = 'Microsoft Teams';
$string['linkword'] = 'Microsoft Word';
$string['linkexcel'] = 'Microsoft Excel';
$string['linkpowerpoint'] = 'Microsoft PowerPoint';
$string['linkvivaengage'] = 'Viva Engage';
$string['linkvivalearning'] = 'Viva Learning';
$string['linkemail'] = 'My Email';
$string['linkonenote_unavailable'] = 'OneNote unavailable';
$string['linksharepoint'] = 'Course SharePoint site';
Expand Down Expand Up @@ -84,6 +89,16 @@
$string['settings_showmsstreamclassic_desc'] = 'Enable or disable the "Microsoft Stream (classic)" link in the block.';
$string['settings_showmsteams'] = 'Show "Microsoft Teams"';
$string['settings_showmsteams_desc'] = 'Enable or disable the "Microsoft Teams" link in the block.';
$string['settings_showword'] = 'Show "Microsoft Word"';
$string['settings_showword_desc'] = 'Enable or disable the "Microsoft Word" link in the block.';
$string['settings_showexcel'] = 'Show "Microsoft Excel"';
$string['settings_showexcel_desc'] = 'Enable or disable the "Microsoft Excel" link in the block.';
$string['settings_showpowerpoint'] = 'Show "Microsoft PowerPoint"';
$string['settings_showpowerpoint_desc'] = 'Enable or disable the "Microsoft PowerPoint" link in the block.';
$string['settings_showvivaengage'] = 'Show "Viva Engage"';
$string['settings_showvivaengage_desc'] = 'Enable or disable the "Viva Engage" link in the block.';
$string['settings_showvivalearning'] = 'Show "Viva Learning"';
$string['settings_showvivalearning_desc'] = 'Enable or disable the "Viva Learning" link in the block.';
$string['settings_showonedrive'] = 'Show "My OneDrive"';
$string['settings_showonedrive_desc'] = 'Enable or disable the "My OneDrive" link in the block.';
$string['settings_showonenotenotebook'] = 'Show "My OneNote Notebook"';
Expand Down
Binary file added blocks/microsoft/pix/excel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified blocks/microsoft/pix/formscolor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified blocks/microsoft/pix/msstream.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified blocks/microsoft/pix/msteams.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified blocks/microsoft/pix/onedriveicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified blocks/microsoft/pix/onenotecolor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified blocks/microsoft/pix/outlookcolor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added blocks/microsoft/pix/powerpoint.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified blocks/microsoft/pix/sharepointcolor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added blocks/microsoft/pix/vivaengage.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added blocks/microsoft/pix/vivalearning.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added blocks/microsoft/pix/word.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions blocks/microsoft/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,21 @@
$desc = new lang_string('settings_showonedrive_desc', 'block_microsoft');
$settings->add(new admin_setting_configcheckbox('block_microsoft/settings_showonedrive', $label, $desc, 1));

// Settings to show Microsoft Word link in the block.
$label = new lang_string('settings_showword', 'block_microsoft');
$desc = new lang_string('settings_showword_desc', 'block_microsoft');
$settings->add(new admin_setting_configcheckbox('block_microsoft/settings_showword', $label, $desc, 0));

// Settings to show Microsoft Excel link in the block.
$label = new lang_string('settings_showexcel', 'block_microsoft');
$desc = new lang_string('settings_showexcel_desc', 'block_microsoft');
$settings->add(new admin_setting_configcheckbox('block_microsoft/settings_showexcel', $label, $desc, 0));

// Settings to show Microsoft PowerPoint link in the block.
$label = new lang_string('settings_showpowerpoint', 'block_microsoft');
$desc = new lang_string('settings_showpowerpoint_desc', 'block_microsoft');
$settings->add(new admin_setting_configcheckbox('block_microsoft/settings_showpowerpoint', $label, $desc, 0));

// Settings to show Microsoft Stream (on SharePoint) link in the block.
$label = new lang_string('settings_showmsstream', 'block_microsoft');
$desc = new lang_string('settings_showmsstream_desc', 'block_microsoft');
Expand All @@ -65,6 +80,16 @@
$desc = new lang_string('settings_showmsteams_desc', 'block_microsoft');
$settings->add(new admin_setting_configcheckbox('block_microsoft/settings_showmsteams', $label, $desc, 1));

// Settings to show Viva Engage link in the block.
$label = new lang_string('settings_showvivaengage', 'block_microsoft');
$desc = new lang_string('settings_showvivaengage_desc', 'block_microsoft');
$settings->add(new admin_setting_configcheckbox('block_microsoft/settings_showvivaengage', $label, $desc, 0));

// Settings to show Viva Learning link in the block.
$label = new lang_string('settings_showvivalearning', 'block_microsoft');
$desc = new lang_string('settings_showvivalearning_desc', 'block_microsoft');
$settings->add(new admin_setting_configcheckbox('block_microsoft/settings_showvivalearning', $label, $desc, 0));

// Settings to show sways link in the block.
$label = new lang_string('settings_showsways', 'block_microsoft');
$desc = new lang_string('settings_showsways_desc', 'block_microsoft');
Expand Down
20 changes: 20 additions & 0 deletions blocks/microsoft/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,26 @@
background-image: url([[pix:block_microsoft|msteams]]);
}

.block_microsoft .block_microsoft_word {
background-image: url([[pix:block_microsoft|word]]);
}

.block_microsoft .block_microsoft_excel {
background-image: url([[pix:block_microsoft|excel]]);
}

.block_microsoft .block_microsoft_powerpoint {
background-image: url([[pix:block_microsoft|powerpoint]]);
}

.block_microsoft .block_microsoft_vivaengage {
background-image: url([[pix:block_microsoft|vivaengage]]);
}

.block_microsoft .block_microsoft_vivalearning {
background-image: url([[pix:block_microsoft|vivalearning]]);
}

.block_microsoft .block_microsoft_onenote {
background-image: url([[pix:block_microsoft|onenotecolor]]);
}
Expand Down
Binary file modified local/o365/pix/onenotecolor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified local/o365/pix/outlookcolor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified local/onenote/pix/onenote.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified repository/office365/pix/onedrive.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified repository/office365/pix/sharepoint.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.