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 72913d6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 11 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
14 changes: 6 additions & 8 deletions mobile/qtype_aitext.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
<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>
<core-format-text [component]="component" [componentId]="componentId"
[text]="question.textarea"></core-format-text>
<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.itemcount" (afterRender)="questionRendered()"></core-format-text>
[text]="question.textarea"></core-format-text>
</ion-item>
</section>

0 comments on commit 72913d6

Please sign in to comment.