Skip to content

Commit

Permalink
code compliance
Browse files Browse the repository at this point in the history
  • Loading branch information
Marcus Green committed May 25, 2021
1 parent e369b7a commit 11dd052
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 21 deletions.
2 changes: 1 addition & 1 deletion classes/privacy/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class provider implements
* @return string
*/
public static function get_reason() : string {
return 'privacy:null_metadata';
return 'privacy:null_reason';
}

}
4 changes: 2 additions & 2 deletions import_examples.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,11 @@ public function validation($fromform, $data) {
echo $OUTPUT->header();
// Do anything before that we need to.
if (!$qformat->importpreprocess()) {
print_error('cannotimport', 'qtype_gapfill', $PAGE->out);
throw new \moodle_exception(get_string('cannotimport', ''), '', $PAGE->url));
}
// Process the uploaded file.
if (!$qformat->importprocess($category)) {
print_error(get_string('cannotimport', ''), '', $PAGE->url);
throw new \moodle_exception(get_string('cannotimport', ''), '', $PAGE->url));
} else {
/* after the import offer a link to go to the course and view the questions */
$visitquestions = new moodle_url('/question/edit.php?courseid=' . $mform->course->id);
Expand Down
25 changes: 14 additions & 11 deletions mobile/ionic3/addon-qtype-gapfill.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,19 @@
<ion-icon name="information-circle"></ion-icon>
{{ 'core.question.howtodraganddrop' | translate }}
</p>
<p>
<core-format-text *ngIf="question.optionsaftertext" [component]="component" [componentId]="componentId"
[text]="question.text" (afterRender)="questionRendered()"></core-format-text></p>
<div class="answeroptions">
<core-format-text [text]="question.answeroptions" ></core-format-text>
</div>
<p><core-format-text *ngIf="!question.optionsaftertext" [component]="component"
[componentId]="componentId" [text]="question.text" (afterRender)="questionRendered()"></core-format-text></p>
<core-format-text *ngIf="question.answers" [component]="component" [componentId]="componentId"
[text]="question.answers" (afterRender)="questionRendered()"></core-format-text>
</ion-label>
<p>
<core-format-text *ngIf="question.optionsaftertext" [component]="component" [componentId]="componentId"
[text]="question.text" (afterRender)="questionRendered()"></core-format-text>
</p>
<div class="answeroptions">
<core-format-text [text]="question.answeroptions" ></core-format-text>
</div>
<p>
<core-format-text *ngIf="!question.optionsaftertext" [component]="component"
[componentId]="componentId" [text]="question.text" (afterRender)="questionRendered()"></core-format-text>
</p>
<core-format-text *ngIf="question.answers" [component]="component" [componentId]="componentId"
[text]="question.answers" (afterRender)="questionRendered()"></core-format-text>
</ion-label>
</ion-item>
</section>
10 changes: 5 additions & 5 deletions mobile/latest/addon-qtype-gapfill.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
<p>
<core-format-text *ngIf="question.optionsaftertext" [component]="component" [componentId]="componentId"
[text]="question.text" (afterRender)="questionRendered()"></core-format-text></p>
<div class="answeroptions">
<core-format-text [text]="question.answeroptions" ></core-format-text>
</div>
<p><core-format-text *ngIf="!question.optionsaftertext" [component]="component"
<div class="answeroptions">
<core-format-text [text]="question.answeroptions" ></core-format-text>
</div>
<p><core-format-text *ngIf="!question.optionsaftertext" [component]="component"
[componentId]="componentId" [text]="question.text" (afterRender)="questionRendered()"></core-format-text></p>
<core-format-text *ngIf="question.answers" [component]="component" [componentId]="componentId"
[text]="question.answers" (afterRender)="questionRendered()"></core-format-text>
</ion-label>
</ion-label>
</ion-item>
</section>
3 changes: 2 additions & 1 deletion tests/coverage.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
* @var array
*/
protected $includelistfiles = [
'questiontype.php'
'questiontype.php',
'qtype_gapfill'
];

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/walkthrough_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* @copyright 2012 Marcus Green
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
class qtype_gapfill_walkthrough_test extends qbehaviour_walkthrough_test_base {
class walkthrough_test extends qbehaviour_walkthrough_test_base {

public function test_draggable_items() {
/* This checks that the bug from line 130 of questiontype is fixed
Expand Down

0 comments on commit 11dd052

Please sign in to comment.