Skip to content

Commit

Permalink
Mobile app: Remove ionic3 template
Browse files Browse the repository at this point in the history
  • Loading branch information
dpalou authored and danmarsden committed Jul 24, 2024
1 parent 3fef941 commit e30030c
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 114 deletions.
3 changes: 1 addition & 2 deletions classes/output/mobile.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ public static function main_view($args) {
global $OUTPUT, $USER, $DB;

$args = (object) $args;
$versionname = $args->appversioncode >= 3950 ? 'latest' : 'ionic3';
$cm = get_coursemodule_from_id('subcourse', $args->cmid);
$context = \context_module::instance($cm->id);

Expand Down Expand Up @@ -99,7 +98,7 @@ public static function main_view($args) {
'templates' => [
[
'id' => 'main',
'html' => $OUTPUT->render_from_template("mod_subcourse/mobile_view_$versionname", $data),
'html' => $OUTPUT->render_from_template('mod_subcourse/mobile_view_latest', $data),
],
],
'javascript' => '',
Expand Down
102 changes: 0 additions & 102 deletions templates/mobile_view_ionic3.mustache

This file was deleted.

10 changes: 0 additions & 10 deletions tests/output_mobile_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,15 +79,5 @@ public function test_main_view() {

$this->assertEquals('main', $mainview3950['templates'][0]['id']);
$this->assertStringContainsString('plugin.mod_subcourse.currentgrade', $mainview3950['templates'][0]['html']);

// Ionic3 compatible view for the app version 3.9.4.
$mainview3940 = \mod_subcourse\output\mobile::main_view([
'cmid' => $subcourse->cmid,
'courseid' => $metacourse->id,
'appversioncode' => 3940,
]);

$this->assertEquals('main', $mainview3940['templates'][0]['id']);
$this->assertStringContainsString('plugin.mod_subcourse.currentgrade', $mainview3940['templates'][0]['html']);
}
}

0 comments on commit e30030c

Please sign in to comment.