diff --git a/constants.php b/constants.php index 405d311..bcc7c96 100644 --- a/constants.php +++ b/constants.php @@ -23,8 +23,11 @@ * */ -define("GROUP_HELP_CENTER_LINK", "https://support.kialo-edu.com/en/hc/moodle/#using-the-kialo-plugin-with-moodle-group-mode"); -define("PLUGIN_RELEASE_EMAIL_NOTIFICATION_LINK", "https://fh6m79pud11.typeform.com/to/cYurgy84"); -define("TERMS_LINK", "https://www.kialo-edu.com/terms"); -define("PRIVACY_LINK", "https://www.kialo-edu.com/privacy"); -define("DATA_SECURITY_LINK", "https://support.kialo-edu.com/en/hc/kialo-edu-data-security-and-privacy-plan/"); +define( + "MOD_KIALO_GROUP_HELP_CENTER_LINK", + "https://support.kialo-edu.com/en/hc/moodle/#using-the-kialo-plugin-with-moodle-group-mode" +); +define("MOD_KIALO_PLUGIN_RELEASE_EMAIL_NOTIFICATION_LINK", "https://fh6m79pud11.typeform.com/to/cYurgy84"); +define("MOD_KIALO_TERMS_LINK", "https://www.kialo-edu.com/terms"); +define("MOD_KIALO_PRIVACY_LINK", "https://www.kialo-edu.com/privacy"); +define("MOD_KIALO_DATA_SECURITY_LINK", "https://support.kialo-edu.com/en/hc/kialo-edu-data-security-and-privacy-plan/"); diff --git a/lang/en/kialo.php b/lang/en/kialo.php index 824d17f..18fcdde 100644 --- a/lang/en/kialo.php +++ b/lang/en/kialo.php @@ -48,9 +48,8 @@ $string['errors:noguestaccess'] = "Guests cannot access this activity. Please log in."; $string['errors:nopermissiontoview'] = "You do not have permission to view this activity."; $string['errors:resourcelink'] = "Activity cannot be displayed due to an unexpected error. Please try again."; -$string['groupmode_off_info'] = 'Please note that Moodle groups are currently not automatically supported. (More info)'; +$string['groupmode_off_info'] = 'Please note that Moodle groups are currently not automatically supported. (More info)'; $string['groupmode_on_warning'] = 'Moodle groups are currently not automatically supported. If you use the Kialo Moodle Plugin with a course that has multiple groups, all groups will find themselves in the same Kialo discussion.

To manually set up Kialo discussions for each of your groups, please follow the instructions in our help center.

We will release automatic Moodle groups support in Q1 2024. Submit your email address to be notified when it is released.'; -$string['hello'] = 'Hello World!'; $string['kialo:addinstance'] = 'Add a new Kialo Discussion'; $string['kialo:kialo_admin'] = 'Granted Admin rights in Kialo discussions'; $string['kialo:view'] = 'View Kialo discussions'; @@ -79,3 +78,5 @@ $string['select_discussion'] = 'Select Discussion'; $string['select_discussion_help'] = 'Opens Kialo in a new tab to select a discussion for this activity. You can create a Kialo account during this process if you don’t already have one.'; $string['termsnotaccepted'] = 'You have to accept Kialo’s Terms of Service before you can enable the Kialo plugin.'; +$string['information_helptext'] = 'Information'; +$string['warning_helptext'] = 'Warning'; diff --git a/mod_form.php b/mod_form.php index b06db65..f485fed 100644 --- a/mod_form.php +++ b/mod_form.php @@ -63,17 +63,19 @@ public function definition() { $mform = $this->_form; // Kialo does not support group mode yet. Show a warning if it is enabled, otherwise show an info. if (groups_get_course_groupmode($COURSE) == NOGROUPS) { - $text = ''; + $text = ''; $text .= get_string("groupmode_off_info", "mod_kialo", [ - "grouphelpcenterlink" => GROUP_HELP_CENTER_LINK, + "grouphelpcenterlink" => MOD_KIALO_GROUP_HELP_CENTER_LINK, ]); } else { - $text = ''; + $text = ''; $text .= get_string("groupmode_on_warning", "mod_kialo", [ - "grouphelpcenterlink" => GROUP_HELP_CENTER_LINK, - "pluginreleaseemailnotificationlink" => PLUGIN_RELEASE_EMAIL_NOTIFICATION_LINK, + "grouphelpcenterlink" => MOD_KIALO_GROUP_HELP_CENTER_LINK, + "pluginreleaseemailnotificationlink" => MOD_KIALO_PLUGIN_RELEASE_EMAIL_NOTIFICATION_LINK, ]); } $text = "
" . $text . "
"; diff --git a/settings.php b/settings.php index 6d9a5df..c6a706a 100644 --- a/settings.php +++ b/settings.php @@ -39,9 +39,9 @@ 'mod_kialo/acceptterms', new lang_string('acceptterms', 'mod_kialo'), new lang_string('acceptterms_desc', 'mod_kialo', [ - "terms" => TERMS_LINK, - "privacy" => PRIVACY_LINK, - "data_security" => DATA_SECURITY_LINK, + "terms" => MOD_KIALO_TERMS_LINK, + "privacy" => MOD_KIALO_PRIVACY_LINK, + "data_security" => MOD_KIALO_DATA_SECURITY_LINK, ]), 0 ); diff --git a/styles.css b/styles.css new file mode 100644 index 0000000..551486c --- /dev/null +++ b/styles.css @@ -0,0 +1,234 @@ +:root { + --kialo-blue-color: #0069e0; +} + +@font-face { + font-family: Roboto-subset; + font-style: normal; + font-weight: 300; + src: url(data:application/font-woff2;charset=utf-8;base64,d09GMgABAAAAAAu0ABIAAAAAHxQAAAtPAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAP0ZGVE0cGjQbl1gcglwGYACDMghcCYM8EQgKijCJZQs4AAE2AiQDbAQgBYc6B4FnDII6G1sdsxFWOygnLsF/lWDTeVdQnwCTUBgEdQAVHkOI2gw/xL+dzml5Tb1mCRwm2+h7Xzz8v03zvj9/RmLLS9KxFrTAWsIqzFSFT4+lqzCUQG1Shcv1z+Np71dDOjodgB7Uju6sdoLO/MlZCoD8J4e9dJPrNP3tqEx1nxN4TCItBW2jLY7lUcBPLXP/t5ba+bO3F8DZtKwCUyJLoICFLAs1NxfeCzM9X+GYZVkoAl3hSCOoGhfr402lrO+2VCu8FrYgIINCOKqu/Xj1uULADw+Kn4QP/1SyBfz299prIEkXA4wkIUwJGQkhoY2e4O7bVtNpyrD28/QPB+1zK4vywPzCovRccL0suaQABFgwIyG2P046V1IsAflL04sKQBUBQkgqXYHQkxAGQlNpmYMgoZRaGyHTarcWwgrLfZJmsNEe9wS1YLmUcDF67z1VefXa8ol+2tXeAr2ilwD0sLn0tVeAOUPpC9Lmt9W53lffUvBDH6mDdnek4xY2rYFO1g/d5a/+0eb0oeq9otdd5WsdbYKqeYs8em+HZ/X5h9T3A1v5izSic/fS2uore089lrGjnwDtMyqRg7c8i2JoXQgv2B+Ndp27tlfP18rUsvWsh73s6XDoQM+7AebuAC2Tov097gb6vd9sads73ZsWW3brOtajPhiglxZ9Jht6b9MZoMUil18G/d611RtSzIKeNFy93CVR9bezHZhm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iGdOWrFH+eSEcqWDCbxpG5kNvfsUZ1bk/IiEmWYXSJBSclLiozySsPXGgJpqXLVmfLxMyemfpVeJA1/VX8iYM/R2Z0DqEsgqF/7dwMVyDshaBcZpjcEgPgbwNeVd8B0PhjSchHkZQnkxWmj+XyYn2+FGFrWAhUASTvuwmEK78IW4XhO4TnIum5Da7K8ZXRJPASY43+FyA2cAWw0DJxBk64baGHgPpqt8iItrfAhrQz8QWv2CgZtaMc+tGVOBNK2FZFCO06LDtp1XDyhPe20k05qpv3op9RTIP2MfUqjn5NOz1l8QT69eM3fF6bSWvsSk6jclFVFKcA2rZ0pbAfmJi3OvO9Tvei8beERLHPrnSJH9sNMfwx0EAOcgnjAgSpkSxi5fO7agGfhDzJeyX0ZoCc5QVJUzYC1floyuSooJQHBcFyGnfJpQNWWi1NDt5ZGgDRttywZv51AMsnUMjXPXhJcnVfaFHsuYRzIPguZ5bRwiTAfNam1tFBQyxRENotNKcbY2An/7jrhfFF9YIXRcrP5wsZpv1xfnmsNSohXXFLyRTnPgj9esrXIGxl4EQvLAsCNNqO4KuDFjtldwHYaxHEsiiGQThv2mZ+TrLIybGd/KLSZaU/JUIkURWSFDavt4XR/BEVsxEFSSBrJIFlEIC6SQ/JIASkiJaSMVDiZeZWSLAep0oJse3t7AVY46s6yn+Boby86iI6ik+gsuoiuopvoLnooZuk7eipcWH32OZhrhVkBjbgMK0TLIXQV2+X49hb6yiBtBdtRvkjoqGdKsz3VZQa71+ZFWZKfq3luTgvk+5Ve/LMMZqkGy+P4Rk41jlnqIbOdTTRmaXjYGWsrOjXpTi3emdpLWjJ9rfMBLS8vZYX9FkhOY2VUTAcfpBK6AUlCSukZ2i77RMD1yE4qoYOwGPfjTfg/MlAH4lJcysBFQf+8rRhUZm6xfw/IwLbElx9wPz6P/9vPoOvYkXZiYGZfc1QMAAA=) + format("woff2"); +} + +body, +div, +html, +iframe, +p, +span { + border: 0; + font-size: 100%; + font: inherit; + margin: 0; + padding: 0; + vertical-align: baseline; +} + +body, +html { + height: 100%; +} + +html { + -webkit-text-size-adjust: 100%; +} + +.kialo-loading-text { + display: flex; + height: 100%; + align-items: center; + flex-direction: column; + justify-content: center; +} + +.kialo-loading-title { + margin: 0 0 8px; + color: #656f7b; + font-family: Roboto-subset, -apple-system, BlinkMacSystemFont, Helvetica, + Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol; + font-size: 33px; + font-weight: 300; + line-height: 1.2; + text-align: center; +} + +.kialo-spinner { + animation: spinner-fade-in 1.5s ease-in 1; + overflow: hidden; + position: relative; + margin: 0 auto; +} + +@keyframes kialo-spinner-fade-in { + 0% { + opacity: 0; + } + to { + opacity: 1; + } +} + +.kialo-spinner--large, +.kialo-spinner--large .kialo-spinner__circle--1 { + height: 64px; + width: 64px; +} + +.kialo-spinner--large .kialo-spinner__circle--2 { + height: 48px; + width: 48px; +} + +.kialo-spinner--large .kialo-spinner__circle--3 { + height: 32px; + width: 32px; +} + +.kialo-spinner--large .kialo-spinner__arc-inner { + border-width: 3px; +} + +.kialo-spinner__circle--1 { + animation: container-rotate 2s linear infinite; + left: 0; + position: absolute; + top: 0; +} + +.kialo-spinner__circle--2 { + animation: container-rotate 1.2s linear infinite; + left: 12.5%; + position: absolute; + top: 12.5%; +} + +.kialo-spinner__circle--3 { + animation: container-rotate 2s linear infinite; + left: 25%; + position: absolute; + top: 25%; +} + +.kialo-spinner__line { + animation: line-center-rotate 4s cubic-bezier(0.4, 0, 0.2, 1) infinite both, + blend-line-color 4s cubic-bezier(0.4, 0, 0.2, 1) infinite both; + border-color: var(--kialo-blue-color); + display: flex; + height: 100%; + position: absolute; + width: 100%; +} + +.kialo-spinner__arc { + border-color: inherit; + height: 100%; + overflow: hidden; + position: relative; + width: 50%; +} + +.kialo-spinner__arc-inner { + border-color: inherit; + border-bottom-color: transparent; + border-radius: 50%; + border-style: solid; + bottom: 0; + box-sizing: border-box; + height: 100%; + left: 0; + position: absolute; + right: 0; + top: 0; + width: 200%; +} + +.kialo-spinner__arc-inner--left { + animation: left-expand-line 1s cubic-bezier(0.4, 0, 0.2, 1) infinite both; + border-right-color: transparent; + transform: rotate(129deg); +} + +.kialo-spinner__arc-inner--right { + animation: right-expand-line 1s cubic-bezier(0.4, 0, 0.2, 1) infinite both; + border-left-color: transparent; + left: -100%; + transform: rotate(-129deg); +} + +@keyframes kialo-container-rotate { + to { + transform: rotate(1turn); + } +} + +@keyframes kialo-line-center-rotate { + 12.5% { + transform: rotate(135deg); + } + 25% { + transform: rotate(270deg); + } + 37.5% { + transform: rotate(405deg); + } + 50% { + transform: rotate(540deg); + } + 62.5% { + transform: rotate(675deg); + } + 75% { + transform: rotate(810deg); + } + 87.5% { + transform: rotate(945deg); + } + to { + transform: rotate(3turn); + } +} + +@keyframes kialo-left-expand-line { + 0% { + transform: rotate(130deg); + } + 50% { + transform: rotate(-5deg); + } + to { + transform: rotate(130deg); + } +} + +@keyframes kialo-right-expand-line { + 0% { + transform: rotate(-130deg); + } + 50% { + transform: rotate(5deg); + } + to { + transform: rotate(-130deg); + } +} + +@keyframes kialo-blend-line-color { + 0% { + border-color: var(--kialo-blue-color); + } + 15% { + border-color: var(--kialo-blue-color); + } + 25% { + border-color: #e6e9eb; + } + 65% { + border-color: #e6e9eb; + } + 75% { + border-color: var(--kialo-blue-color); + } + to { + border-color: var(--kialo-blue-color); + } +} diff --git a/templates/loading_page.mustache b/templates/loading_page.mustache index fe912c2..b2b460f 100644 --- a/templates/loading_page.mustache +++ b/templates/loading_page.mustache @@ -47,278 +47,53 @@ - {{ htmltitle }} + -
+
{{{ extrahtml }}} -

{{ loadingtext }}

-
-
-
-
-
+

{{ loadingtext }}

+
+
+
+
+
-
-
+
+
-
-
-
-
+
+
+
+
-
-
+
+
-
-
-
-
+
+
+
+
-
-
+
+
-
-
-
-
+
+
+
+
-
-
+
+
diff --git a/tests/classes/user_authenticator_test.php b/tests/classes/user_authenticator_test.php index dbe8e0e..a176279 100644 --- a/tests/classes/user_authenticator_test.php +++ b/tests/classes/user_authenticator_test.php @@ -53,6 +53,11 @@ final class user_authenticator_test extends \advanced_testcase { */ private $registrationstub; + /** + * @var userauthenticator + */ + private $userauthenticator; + protected function setUp(): void { parent::setUp(); @@ -60,7 +65,7 @@ protected function setUp(): void { $this->course = $this->getDataGenerator()->create_course(); $this->registrationstub = $this->createStub(RegistrationInterface::class); - $this->user_authenticator = new user_authenticator(); + $this->userauthenticator = new user_authenticator(); // Creates a Kialo activity. $this->module = $this->getDataGenerator()->create_module('kialo', ['course' => $this->course->id]); @@ -76,7 +81,7 @@ protected function setUp(): void { */ protected function authenticate_user(string $userid): UserAuthenticationResultInterface { $loginhint = "{$this->course->id}/$userid"; - return $this->user_authenticator->authenticate($this->registrationstub, $loginhint); + return $this->userauthenticator->authenticate($this->registrationstub, $loginhint); } /**