Skip to content

Commit

Permalink
Displahing and basic rendereing in mobile
Browse files Browse the repository at this point in the history
  • Loading branch information
marcusgreen committed Jun 22, 2024
1 parent 37f3351 commit 52dc677
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
3 changes: 1 addition & 2 deletions classes/output/mobile.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@ class mobile {
public static function mobile_get_aitext($args) {
global $CFG;
$args = (object) $args;
$folder = $args->appversioncode >= 3950 ? 'latest' : 'ionic3';
$templatepath = $CFG->dirroot."/question/type/aitext/mobile/$folder/addon-qtype-aitext.html";
$templatepath = $CFG->dirroot."/question/type/aitext/mobile/qtype_aitext.html";
return [
'templates' => [
[
Expand Down
2 changes: 1 addition & 1 deletion db/mobile.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
'mobile_get_aitext' => [], // Function in classes/output/mobile.php.
], // Function needs caching for offline.
'styles' => [
'url' => $CFG->wwwroot.'/question/type/aitext/mobile/styles_app.css',
'url' => $CFG->wwwroot.'/question/type/aitext/mobile/qtype_aitext_app.css',
'version' => '0.1'
]
]
Expand Down
12 changes: 7 additions & 5 deletions mobile/qtype_aitext.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<section class="list qtype-aitext-container qtype_aitext" ion-list *ngIf="question.text || question.text === ''">
<ion-item><p>
<core-format-text [component]="component" [componentId]="componentId"
[text]="question.text"></core-format-text>
</p></ion-item>
<section class="list qtype-aitext-container qtype_aitext">
<ion-item>
<p>
<core-format-text [component]="component" [componentId]="componentId"
[text]="question.text"></core-format-text>
</p>
</ion-item>
<ion-item>
<core-format-text [component]="component" [componentId]="componentId"
[text]="question.textarea"></core-format-text>
Expand Down

0 comments on commit 52dc677

Please sign in to comment.