diff --git a/classes/mooduell.php b/classes/mooduell.php index c6ca6f4..87d8181 100644 --- a/classes/mooduell.php +++ b/classes/mooduell.php @@ -213,6 +213,9 @@ public function display_page(bool $inline = null, string $pagename = null, $game switch ($pagename) { case null: // Create the list of open games we can pass on to the renderer. + $qrcode = new qr_code(); + $qrcodeimage = $qrcode->generate_qr_code(); + $data['qrimage'] = $qrcodeimage; $data['opengames'] = []; $data['finishedgames'] = []; $data['warnings'] = $this->check_quiz(); @@ -453,7 +456,6 @@ public static function update_all_subscriptions() { $udpatedentry = $returnitem; $udpatedentry->validuntil = time() + (60 * 60 * 24); $DB->update_record('mooduell_purchase', $udpatedentry); - return; } else if ($singleproduct->isExpired === true) { // Delete Cancel etc. $udpatedentry = $returnitem; @@ -469,8 +471,11 @@ public static function update_all_subscriptions() { $udpatedentry = $returnitem; $udpatedentry->productid = 'notvalid'; $DB->update_record('mooduell_purchase', $udpatedentry); + } else { + $udpatedentry = $returnitem; + $udpatedentry->validuntil = time() + (60 * 60 * 24); + $DB->update_record('mooduell_purchase', $udpatedentry); } - return; } } } diff --git a/classes/output/overview_teacher.php b/classes/output/overview_teacher.php index fb70420..031f0d9 100644 --- a/classes/output/overview_teacher.php +++ b/classes/output/overview_teacher.php @@ -26,6 +26,7 @@ namespace mod_mooduell\output; use mod_mooduell\mooduell; +use mod_mooduell\qr_code; use mod_mooduell\tables\table_games; use mod_mooduell\tables\table_highscores; use mod_mooduell\tables\table_questions; @@ -56,6 +57,13 @@ class overview_teacher implements renderable, templatable { public function __construct(mooduell $mooduell = null) { $data = []; + $qrcode = new qr_code(); + $qrcodeimage = $qrcode->generate_qr_code(); + // Create the list of open games we can pass on to the renderer. + $data['qrimage'] = $qrcodeimage; + + $data['appstorelink'] = get_config('mooduell', 'appstoreurl'); + $data['playstorelink'] = get_config('mooduell', 'playstoreurl'); $data['opengames'] = $this->render_open_games_table($mooduell); $data['finishedgames'] = $this->render_finished_games_table($mooduell); diff --git a/settings.php b/settings.php index 89db7ee..2220bb5 100755 --- a/settings.php +++ b/settings.php @@ -168,7 +168,7 @@ 'mooduell/appstoreurl', get_string('appstoreurl', 'mod_mooduell'), '', - 'https://apps.apple.com/kw/app/u-mooduell/id1596475094', + 'https://apps.apple.com/at/app/mooduell/id1598911543', PARAM_URL )); @@ -176,7 +176,7 @@ 'mooduell/playstoreurl', get_string('playstoreurl', 'mod_mooduell'), '', - 'https://play.google.com/store/apps/details?id=at.ac.univie.uwmooduell', + 'https://play.google.com/store/apps/details?id=at.wunderbyte.mooduellapp', PARAM_URL )); diff --git a/templates/overview_teachers.mustache b/templates/overview_teachers.mustache index 1f20cb2..d3fd3dd 100644 --- a/templates/overview_teachers.mustache +++ b/templates/overview_teachers.mustache @@ -65,6 +65,71 @@ {{/warnings}} +{{#statistics}} +{{#str}} downloaduniviemoduell, mod_mooduell {{/str}} +
+
+
+
+
+
+ {{#appstorelink}} +
+ {{#str}} univiemooduellappstore, mod_mooduell {{/str}} +
+
+ Download from Apple App Store +
+ {{/appstorelink}} +
+
+ {{#playstorelink}} +
+ {{#str}} univiemooduellplaystore, mod_mooduell {{/str}} +
+
+ Get it on Google Play +
+ {{/playstorelink}} +
+
+
+ +
+
+ + +
+{{/statistics}}