Skip to content

Commit

Permalink
added custom icons and bug fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
ubc-tuehoang committed May 2, 2024
1 parent 2cdb720 commit 055c35a
Show file tree
Hide file tree
Showing 53 changed files with 50 additions and 27 deletions.
13 changes: 9 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
##FROM lthub/moodle:moodlecore-4.1LTS
##FROM dangtue2020/moodlecore:419stg2-bb4b231d8e23
FROM dangtue2020/moodlecore:419stg2-7f3ef6e86ac4
##FROM dangtue2020/moodlecore:419stg2-7f3ef6e86ac4
FROM dangtue2020/moodlecore:419stg2-41ec0380b10f


#Updated to newer questionnaire 10Dec2023
RUN curl -L https://moodle.org/plugins/download.php/29228/mod_questionnaire_moodle42_2022092202.zip -o /questionnaire.zip \
Expand Down Expand Up @@ -190,8 +192,11 @@ COPY docker-entrypoint.d/* /docker-entrypoint.d/
COPY 000-default.conf /etc/apache2/sites-available/

# add modified files for Language Icon
##COPY themes/maker-header.mustache /var/www/html/theme/maker/templates/header.mustache
##COPY themes/boost-language_menu.mustache /var/www/html/theme/boost/templates/language_menu.mustache
COPY themes/updated-icon-designs-4.1/* /var/www/html/theme/maker/pix
COPY themes/maker-header.mustache /var/www/html/theme/maker/templates/header.mustache
COPY themes/boost-language_menu.mustache /var/www/html/theme/boost/templates/language_menu.mustache
COPY themes/updated-icon-designs-4.1/mod/ /var/www/html/theme/maker/pix_plugins/mod

RUN sleep 3 && echo "\$THEME->removedprimarynavitems = ['courses'];" >> /var/www/html/theme/maker/config.php
##RUN sleep 3 && sed -i "\$a\\n\\n\$THEME->removedprimarynavitems = ['courses'];" /var/www/html/theme/maker/config.php

RUN chmod -R 755 /docker-entrypoint.d/
Empty file added themes/maker-config-php
Empty file.
36 changes: 20 additions & 16 deletions themes/maker-header.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -72,21 +72,25 @@ function updateLanguageLinks() {
const dropdownItems = document.querySelectorAll('#lang-action-menu .dropdown-item');
dropdownItems.forEach(item => {
const lang = item.getAttribute('lang');
if (lang) {
// Update the 'href' to include the correct 'lang' parameter
currentUrl.searchParams.set('lang', lang);
item.href = currentUrl.toString();
// Add or remove checkmarks based on the current language
if (lang === currentLang) {
item.innerText = `✔️ ${item.innerText.trim().replace('✔️', '')}`;
} else {
item.innerText = item.innerText.trim().replace('✔️', '');
}
}
});
dropdownItems.forEach((item) => {
const lang = item.getAttribute("lang");
if (lang) {
// Update the 'href' to include the correct 'lang' parameter
currentUrl.searchParams.set("lang", lang);
item.href = currentUrl.toString();
// Add or remove checkmarks based on the current language
const checkmark = lang === currentLang ? "✓" : " "; // Unicode checkmark or empty space
item.innerHTML = `
<div class="dropdown-item">
<span class="checkmark-column">${checkmark}</span>
<span class="language-column">${item.innerText.trim().replace(/✔️|&#x2713;/g, "")}</span>
</div>
`;
}
});
}
// Run the function to update the language links and set the checkmark
Expand Down Expand Up @@ -164,4 +168,4 @@ updateLanguageLinks();

{{> theme_boost/primary-drawer-mobile }}

<!--//modified:30Apr2024-->
<!--//TUE:modified:30Apr2024-->
1 change: 1 addition & 0 deletions themes/updated-icon-designs-4.1/mod/book/monologo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions themes/updated-icon-designs-4.1/mod/chat/monologo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions themes/updated-icon-designs-4.1/mod/choice/monologo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions themes/updated-icon-designs-4.1/mod/content/monologo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions themes/updated-icon-designs-4.1/mod/database/monologo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions themes/updated-icon-designs-4.1/mod/feedback/monologo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions themes/updated-icon-designs-4.1/mod/file/monologo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions themes/updated-icon-designs-4.1/mod/folder/monologo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions themes/updated-icon-designs-4.1/mod/forum/monologo.svg
1 change: 1 addition & 0 deletions themes/updated-icon-designs-4.1/mod/glossary/monologo.svg
1 change: 0 additions & 1 deletion themes/updated-icon-designs-4.1/mod/h5p/pix/monologo.svg
Diff not rendered.
Diff not rendered.
1 change: 1 addition & 0 deletions themes/updated-icon-designs-4.1/mod/label/monologo.svg
1 change: 1 addition & 0 deletions themes/updated-icon-designs-4.1/mod/lesson/monologo.svg
Loading

0 comments on commit 055c35a

Please sign in to comment.