From 505a871c2d70783d9b4dc97d7e42c580e20a9afd Mon Sep 17 00:00:00 2001
From: Tim Schroeder <t.schroeder@itc.rwth-aachen.de>
Date: Thu, 8 Oct 2020 12:49:59 +0200
Subject: [PATCH] fixed multilang titles
---
version.php | 2 +-
view.php | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/version.php b/version.php
index c014fc4..6375f6a 100644
--- a/version.php
+++ b/version.php
@@ -25,6 +25,6 @@
defined('MOODLE_INTERNAL') || die();
$plugin->component = 'mod_pdfannotator'; // Full name of the plugin (used for diagnostics).
-$plugin->version = 2020081200; // The current module version (Date: YYYYMMDDXX).
+$plugin->version = 2020100800; // The current module version (Date: YYYYMMDDXX).
$plugin->release = 'PDF Annotator v1.4 release 4';
$plugin->requires = 2016112900; // Requires this Moodle version.
diff --git a/view.php b/view.php
index 0c3bf39..a7c7f01 100644
--- a/view.php
+++ b/view.php
@@ -46,13 +46,14 @@ if ($r) {
}
$course = get_course($cm->course); // Get course by id.
-
require_course_login($course, true, $cm);
$context = context_module::instance($cm->id);
-
require_capability('mod/pdfannotator:view', $context);
+// Apply filters, e.g. multilang.
+$pdfannotator->name = format_text($pdfannotator->name, FORMAT_MOODLE, ['para' => false]);
+
// Completion and trigger events.
pdfannotator_view($pdfannotator, $course, $cm, $context);
--
GitLab