xow / moodle-mod_quizgame

Moodle activity module to create dynamic games based on the question bank
7 stars 7 forks source link

GDPR infringement #78

Open rschrenk opened 2 years ago

rschrenk commented 2 years ago

Hello,

we recognized, that mod_quizgame imports Google Fonts in https://github.com/xow/moodle-mod_quizgame/blob/b5ba519dfc586e0607cd73ec40c4f36c4e4d6059/view.php#L91

As for European sites, this causes an infringement of the GDPR. Would it be possible to offer a localized version of the Google fonts integrated in your plugin?

Kind regards

billieKnoll commented 2 years ago

https://typeschool.de/typografie-im-digital-media-design-tipps-im-umgang-mit-google-fonts/#:~:text=Google%20Fonts%20sind%20kostenlos%20und,in%20PDFs%20f%C3%BCr%20die%20Druckproduktion.

Here is paragraph about Google Fronts and the data protection. (German Headline is -Google Fonts und die DSGVO) Is this the problem, that Google Fonts sents data to Google? I think there is a way to prevent this problem.

sbourget commented 2 years ago

Thanks for filing the issue, From reading through the article and looking at the license it looks like the font is licensed using the SIL Open Font License https://github.com/google/fonts/tree/main/ofl/audiowide which unfortunately is not compatible with the GPL license https://directory.fsf.org/wiki/License:OFL-1.1 that is bundled with Moodle (so we cannot directly ship that font in the plugin)

That said I think we have 2 options...

  1. We change font to a different one (https://github.com/google/fonts/tree/main/apache) and then bundle it with the plugin
  2. We provide a config option to allow for Moodle admins to download and host the font on their server directly in the MoodleData folder

@xow do you have any preference? I'm thinking option 1 might be simplest.

rschrenk commented 2 years ago

Hello,

I don't think it is incompatible. The SIL Open Font Licence only says, that derivatives of the font must be published keeping the licence. This applies only, if you make a new font based on an existing one. If you just embed the font in your project, I don't think that this is a problem.

https://fontsarena.com/licenses-explained/

SIL OpenFont is a free software license, and fonts covered by this license can be freely used, modified, and distributed (as long as the derivatives remain under the same license).

Kind regards

rschrenk commented 2 years ago

In regard of the text shared by @billieKnoll here is a translation based on deepl.com

Legal use

Can Google Fonts be used or copied in any way? Yes and no! First of all, according to Google's terms of use, designers may download the provided fonts on their computers and use them for private as well as commercial purposes. It is irrelevant whether Google Fonts are used for integration on websites or for the use of print objects. But: Google Fonts are subject to different license conditions, e.g. Apache license. When passing on to third parties, a copy of the original license must be included in the font package. Therefore my recommendation: If you as a designer develop templates using Google Fonts and make these templates available to the client or other partners for further use, then for reasons of license security you should not simply include a font as a copy, but instead provide the direct link to this font via google-webfonts-helper in the style guide or CD manual. This allows other users to download this font free of charge in all font styles and the respective terms of use with their own IP computer address - and you do not make yourself vulnerable under licensing law.

Translated with www.DeepL.com/Translator (free version)

billieKnoll commented 2 years ago

I did a little research and yes from the official Google Font Webseite there is only the Open Font Licence https://fonts.google.com/specimen/Audiowide?query=aud#standard-styles but it is possible to take this identical font from other websites as well like https://www.1001freefonts.com/audiowide.font and there are more licences mentioned. I don't have this deep understanding of fonts licence yet but as I read it - everybody is allowed to use and even change it. @sbourget did you change the font?

sbourget commented 2 years ago

I'm working on a patch that changes it over to one of the Google Fonts licensed under the Apache license. https://fonts.google.com/attribution

I'm currently testing using the font Arimo, but I haven't had a chance to determine if another one will be better. Once that's done I'll bundle it with the plugin. I'd rather make it work with an Apache Licensed font since it'll be GPL compatible. (I want to avoid future code checker issues as moodle requires items shipped with it to be GPL compatible)

Once I have it fully tested, I'll roll it into the patchset for the Moodle 4.0 plugin release. (PR #77)

sbourget commented 2 years ago

I've put together a patch that seems to address the issue. If you can give it a try, it would be appreciated. At the moment it's available on the build for Moodle 4.0 which you can get here: https://github.com/sbourget/moodle-mod_quizgame/tree/MOODLE_40_FIXES

Thanks!

rschrenk commented 2 years ago

Hello, it is great, that you are working so fast on this issue! Thanks for that!

As regards the technical implementation, I think it solves the problem. I saw that you switched from Audiowide to Arimo. Audiowide was better suiting the graphical requirements of this game. I did a little research and came across this information from the SIL OFL: https://scripts.sil.org/cms/scripts/page.php?item_id=OFL-FAQ_web#68092c0f

It says:

Question: 1.2 Can the fonts be included with Free/Libre and Open Source Software collections such as GNU/Linux and BSD distributions and repositories? Answer: Yes! Fonts licensed under the OFL can be freely included alongside other software under FLOSS (Free/Libre and Open Source Software) licenses. Since fonts are typically aggregated with, not merged into, existing software, there is little need to be concerned about incompatibility with existing software licenses. You may also repackage the fonts and the accompanying components in a .rpm or .deb package (or other similar packaging formats or installers) and include them in distribution CD/DVDs and online repositories. (Also see section 5.9 about rebuilding from source.)

Question: 1.3 I want to distribute the fonts with my program. Does this mean my program also has to be Free/Libre and Open Source Software? Answer: No. Only the portions based on the Font Software are required to be released under the OFL. The intent of the license is to allow aggregation or bundling with software under restricted licensing as well.

Question: 2.1 Can I make webpages using these fonts? Answer: Yes! Go ahead! Using CSS (Cascading Style Sheets) is recommended. Your three best options are: referring directly in your stylesheet to open fonts which may be available on the user's system providing links to download the full package of the font - either from your own website or from elsewhere - so users can install it themselves using @font-face to distribute the font directly to browsers. This is recommended and explicitly allowed by the licensing model because it is distribution. The font file itself is distributed with other components of the webpage. It is not embedded in the webpage but referenced through a web address which will cause the browser to retrieve and use the corresponding font to render the webpage (see 1.11 and 1.15 for details related to embedding fonts into documents). As you take advantage of the @font-face cross-platform standard, be aware that web fonts are often tuned for a web environment and not intended for installation and use outside a browser. The reasons in favour of using web fonts are to allow design of dynamic text elements instead of static graphics, to make it easier for content to be localized and translated, indexed and searched, and all this with cross-platform open standards without depending on restricted extensions or plugins. You should check the CSS cascade (the order in which fonts are being called or delivered to your users) when testing.

I think you can safely ship Audiowide with this plugin!

Kind regards

rschrenk commented 2 years ago

PS: Maybe you should consider to set the Content-Type to text/css in the font.php. The content-type is text/html by default for a PHP-Script, so Webbrowsers may complain about it. Just add

Header("Content-Type: text/css");

sbourget commented 2 years ago

Thanks all,

My concern with audiowide was over the licensing as Moodle had this requirement for the Plugin DB https://docs.moodle.org/dev/Plugin_contribution_checklist#Licensing

That said, I just found that Moodle Core is shipping with a SIL OFL licensed library, so there shouldn't be an issue moving back to audiowide: https://github.com/moodle/moodle/blob/master/lib/thirdpartylibs.xml#L268

I'll work on an updated patch later today.

sbourget commented 2 years ago

The Patch has been updated and available here: https://github.com/sbourget/moodle-mod_quizgame/tree/MOODLE_40_FIXES

Please test.

rschrenk commented 2 years ago

Hello,

I am sorry, I will not be able to test this before February 15th.

Kind regards

rschrenk commented 2 years ago

Is there a particular reason why it is only designed to work with Modle 4.0? It is still not released yet...

rschrenk commented 2 years ago

In Moodle 4 it works. I also tried in Moodle 3.11, but I received errors:

Use of undefined constant FEATURE_MOD_PURPOSE

Fehler: Class 'core_completion\cm_completion_details' not found line 86 of /mod/quizgame/view.php: Error thrown

sbourget commented 2 years ago

I've been working on the changes for Moodle 4.0 that is why I've rolled it into that release. I can back-port it into the Moodle 3.11 release later if needed.

AS for the MOD_PURPOSE, that is part of the Moodle 4.0 Navigation overhaul see: https://tracker.moodle.org/browse/MDL-71457. There is also an API change for the question bank so the 4.0 branch will not work on Moodle 3.11

rschrenk commented 2 years ago

Hello,

yes, please back-port this patch into the Moodle 3.11 version of your Plugin. Although we wanted to switch to Moodle 4.0 this summer, due to the delay of the release plan (originally November 2021, now March 2022), we decided to wait one year. Therefore we will stick with our platform to Moodle 3.11 until 2023 and will then switch to the LTS version 4.1. I think, also other educational institutions will wait to upgrade. It is uncertain, if all third party plugins will be compatible to Moodle 4.0 already this summer!

Kind regards

Robert

xow commented 2 years ago

Thanks @sbourget sorry I missed this conversation, my github notifications must be misconfigured