From 9a31279a8309d01be667d304d982e637a1f25b77 Mon Sep 17 00:00:00 2001
From: Anisa <kusumadewi@itc.rwth-aachen.de>
Date: Thu, 30 Mar 2023 16:10:48 +0200
Subject: [PATCH] add mod_purpose and icon for the Moodle Version 4.x and
 remove the old icon

---
 lib.php          |  17 +++++++++--
 pix/icon.svg     |  73 -----------------------------------------------
 pix/monologo.png | Bin 0 -> 908 bytes
 pix/monologo.svg |  30 +++++++++++++++++++
 version.php      |   2 +-
 5 files changed, 46 insertions(+), 76 deletions(-)
 delete mode 100644 pix/icon.svg
 create mode 100644 pix/monologo.png
 create mode 100644 pix/monologo.svg

diff --git a/lib.php b/lib.php
index 84281b8..322fd59 100644
--- a/lib.php
+++ b/lib.php
@@ -38,11 +38,24 @@ function pdfannotator_supports($feature) {
             return true;
         case FEATURE_COMPLETION_TRACKS_VIEWS:
             return true;
+        case FEATURE_COMPLETION_HAS_RULES:
+            return true;
+        case FEATURE_GRADE_HAS_GRADE:
+            return false;
+        case FEATURE_GRADE_OUTCOMES:
+            return false;
         case FEATURE_BACKUP_MOODLE2:
             return true;
         case FEATURE_SHOW_DESCRIPTION:
             return true;
-
+        case FEATURE_ADVANCED_GRADING:
+            return false;
+        case FEATURE_PLAGIARISM:
+            return true;
+        case FEATURE_COMMENT:
+            return true;
+        case FEATURE_MOD_PURPOSE:
+            return MOD_PURPOSE_COMMUNICATION;
         default:
             return null;
     }
@@ -807,4 +820,4 @@ function mod_pdfannotator_output_fragment_open_add_comment_editor($args) {
     $out .= html_writer::empty_tag('input', ['type' => 'hidden', 'class' => 'pdfannotator_' . $args['action'] . 'comment' . '_editorformat', 'name' => 'input_value_editor', 'value' => $data['editorFormat']]);
 
     return $out;
-}
\ No newline at end of file
+}
diff --git a/pix/icon.svg b/pix/icon.svg
deleted file mode 100644
index eebac67..0000000
--- a/pix/icon.svg
+++ /dev/null
@@ -1,73 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Generator: Adobe Illustrator 22.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0)  -->
-
-<svg
-   xmlns:dc="http://purl.org/dc/elements/1.1/"
-   xmlns:cc="http://creativecommons.org/ns#"
-   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-   xmlns:svg="http://www.w3.org/2000/svg"
-   xmlns="http://www.w3.org/2000/svg"
-   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
-   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
-   version="1.1"
-   x="0px"
-   y="0px"
-   viewBox="0 0 24 24"
-   enable-background="new 0 0 24 24"
-   xml:space="preserve"
-   id="svg26"
-   sodipodi:docname="icon_blau.svg"
-   inkscape:version="0.92.2 (5c3e80d, 2017-08-06)"><metadata
-     id="metadata32"><rdf:RDF><cc:Work
-         rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
-           rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
-     id="defs30" /><sodipodi:namedview
-     pagecolor="#ffffff"
-     bordercolor="#666666"
-     borderopacity="1"
-     objecttolerance="10"
-     gridtolerance="10"
-     guidetolerance="10"
-     inkscape:pageopacity="0"
-     inkscape:pageshadow="2"
-     inkscape:window-width="1920"
-     inkscape:window-height="1138"
-     id="namedview28"
-     showgrid="false"
-     inkscape:zoom="31.96"
-     inkscape:cx="11.342929"
-     inkscape:cy="12"
-     inkscape:window-x="1672"
-     inkscape:window-y="-8"
-     inkscape:window-maximized="1"
-     inkscape:current-layer="svg26" /><g
-     id="Layer_1"
-     transform="matrix(1.0780321,0,0,0.92551058,1.1658054,4.292837)"><path
-       d="m 19.143,20.351 c 0,0.404 -0.331,0.735 -0.735,0.735 H 2.235 C 1.831,21.086 1.5,20.755 1.5,20.351 V 13 c 0,-0.404 0.331,-0.735 0.735,-0.735 h 16.173 c 0.404,0 0.735,0.331 0.735,0.735 z"
-       id="path6"
-       inkscape:connector-curvature="0"
-       style="fill:#00549f;fill-opacity:1" /><g
-       id="g14"><path
-         d="m 2.7037097,14.161765 c 0,-0.3151 0.226312,-0.659435 0.5901862,-0.659435 h 2.0087039 c 1.1315601,0 2.1492244,0.831603 2.1492244,2.423345 0,1.508908 -1.0176643,2.350256 -2.1492244,2.350256 H 3.8515405 v 1.260399 c 0,0.420676 -0.244062,0.657813 -0.5561654,0.657813 -0.2869578,0 -0.5901862,-0.237137 -0.5901862,-0.657813 v -5.374565 z m 1.1478308,0.544117 v 2.377867 h 1.4510593 c 0.5827904,0 1.0442894,-0.56523 1.0442894,-1.156449 0,-0.667557 -0.461499,-1.221418 -1.0442894,-1.221418 z"
-         id="path8"
-         inkscape:connector-curvature="0"
-         style="fill:#ffffff;stroke-width:1.54999888" /><path
-         d="m 8.6979442,20.101275 c -0.2697283,0 -0.5644831,-0.171317 -0.5644831,-0.588298 v -5.396503 c 0,-0.34102 0.2947548,-0.589916 0.5644831,-0.589916 h 1.8714138 c 3.734487,0 3.652457,6.5731 0.07369,6.5731 H 8.6979442 Z m 0.5158207,-5.414283 v 4.255465 h 1.3569841 c 2.206489,0 2.305205,-4.255465 0,-4.255465 z"
-         id="path10"
-         inkscape:connector-curvature="0"
-         style="fill:#ffffff;stroke-width:1.49903059" /><path
-         d="m 15.299098,14.788822 v 1.505241 h 2.276506 c 0.32196,0 0.642402,0.34166 0.642402,0.67204 0,0.312652 -0.32196,0.568897 -0.642402,0.568897 h -2.276506 v 1.988724 c 0,0.331991 -0.221727,0.586626 -0.534577,0.586626 -0.393338,0 -0.63329,-0.254635 -0.63329,-0.586626 v -5.381157 c 0,-0.340049 0.24147,-0.588237 0.63329,-0.588237 h 3.133043 c 0.393339,0 0.625698,0.248188 0.625698,0.588237 0,0.302982 -0.232359,0.644642 -0.625698,0.644642 z"
-         id="path12"
-         inkscape:connector-curvature="0"
-         style="fill:#ffffff;stroke-width:1.56445539" /></g></g><g
-     id="Ebene_1"
-     transform="matrix(1.5785429,0,0,1.3360463,-2.4023443,-0.53905028)"><g
-       id="g23"><path
-         d="m 8.33,8.065 c 0.752,0.353 1.569,0.53 2.453,0.53 0.398,0 0.805,-0.041 1.222,-0.124 0.574,0.454 1.217,0.784 1.929,0.991 0.167,0.046 0.366,0.088 0.597,0.124 h 0.021 c 0.051,0 0.099,-0.02 0.142,-0.062 0.044,-0.041 0.071,-0.095 0.08,-0.162 0.005,-0.016 0.007,-0.032 0.007,-0.05 0,-0.018 -0.001,-0.035 -0.003,-0.05 C 14.776,9.246 14.771,9.231 14.764,9.216 L 14.747,9.178 c 0,0 -0.008,-0.014 -0.024,-0.043 C 14.707,9.107 14.698,9.094 14.695,9.097 14.693,9.099 14.683,9.086 14.664,9.058 14.646,9.03 14.637,9.018 14.637,9.023 14.614,8.992 14.56,8.927 14.477,8.83 14.393,8.732 14.333,8.656 14.297,8.602 14.26,8.548 14.208,8.473 14.141,8.378 14.074,8.282 14.016,8.183 13.968,8.08 13.919,7.977 13.872,7.863 13.826,7.739 14.4,7.368 14.851,6.911 15.179,6.369 15.508,5.827 15.672,5.249 15.672,4.635 15.672,3.918 15.454,3.255 15.019,2.646 14.584,2.037 13.991,1.556 13.239,1.203 12.487,0.85 11.669,0.673 10.786,0.673 9.902,0.673 9.085,0.85 8.333,1.203 7.578,1.554 6.985,2.035 6.55,2.644 6.115,3.252 5.898,3.916 5.898,4.633 c 0,0.717 0.217,1.38 0.652,1.989 0.434,0.609 1.028,1.09 1.78,1.443 z m 0,0"
-         id="path19"
-         inkscape:connector-curvature="0"
-         style="fill:#a0d50e;fill-opacity:1" /><path
-         d="m 3.725,8.352 c 0.329,0.539 0.779,0.994 1.353,1.366 -0.046,0.124 -0.094,0.237 -0.142,0.34 -0.049,0.104 -0.106,0.203 -0.173,0.298 -0.067,0.096 -0.119,0.17 -0.156,0.225 -0.037,0.054 -0.097,0.13 -0.18,0.228 -0.083,0.098 -0.136,0.162 -0.16,0.193 -0.005,0.005 -0.014,0.017 -0.027,0.035 -0.014,0.018 -0.024,0.031 -0.031,0.038 -0.007,0.008 -0.016,0.021 -0.028,0.039 -0.012,0.018 -0.02,0.032 -0.025,0.042 l -0.017,0.039 c 0,0 -0.005,0.016 -0.014,0.047 -0.009,0.031 -0.01,0.048 -0.003,0.05 0.007,0.002 0.009,0.019 0.007,0.05 0.014,0.072 0.044,0.129 0.09,0.17 0.046,0.041 0.097,0.059 0.153,0.054 0.231,-0.036 0.43,-0.078 0.597,-0.124 0.712,-0.206 1.355,-0.537 1.929,-0.991 0.417,0.083 0.824,0.124 1.222,0.124 1.254,0 2.346,-0.34 3.276,-1.021 -0.268,0.02 -0.472,0.031 -0.611,0.031 C 10.04,9.585 9.325,9.469 8.641,9.237 7.954,9.005 7.343,8.672 6.807,8.239 6.228,7.764 5.784,7.217 5.474,6.598 5.164,5.979 5.009,5.323 5.009,4.632 5.009,4.234 5.062,3.843 5.169,3.455 4.572,3.822 4.1,4.282 3.753,4.833 3.406,5.386 3.233,5.979 3.233,6.614 c 0,0.619 0.164,1.198 0.492,1.738 z m 0,0"
-         id="path21"
-         inkscape:connector-curvature="0"
-         style="fill:#88b1f1;fill-opacity:1" /></g></g></svg>
\ No newline at end of file
diff --git a/pix/monologo.png b/pix/monologo.png
new file mode 100644
index 0000000000000000000000000000000000000000..e080efd8865f35b2e0c526c541076a76db81f528
GIT binary patch
literal 908
zcmeAS@N?(olHy`uVBq!ia0y~yU~pw%V6f(3V_;y=UFtrAfq{Xuz$3Dlfk8|agc&`9
zR6Z~;Fxz>$IEG|2zMXxs@V0_P!+!hg?fY&@Uy*jnukA5%-0W!6WZto!TV?KoQ*4rs
zHxJx9aPvUyf_nLubu7s$Iwud=)s|biGco^Skq{6JU8<`zX?tJIL60R<zD?AhF?%ET
z1f|I${P9+G_1tfMYn(W7=can>?<v)xy44z2R_yq0YAVk^Sp*B3&z7$=iP6$PUSt3M
zRlkZCZ1I1V5RkPb#ewt1f#ZA{AycRD`CHBmJ{#XA7UX^L%8?yU_b|paMEaDzZgdya
zJU1sjyJgk19YOclPrcXvaM!9n^y*WG%B{z?S3C>*c(vhb$=j3pUzR<YcJlk=Jum-9
zvUsl3Tx#U!>E)vpq@ZZ1>DlOVWQiK9kig_cA`+24tAZ8?ZI)6_KG^eBmo0js_(awX
z94;pt(tkItIwg?0v5-AK_Wo~|g{!Pr{p=T?c<}vxQBCvt7iTP~fTIjuSC=c6-@aNn
zxm=s~!O7)WV}WmJddM69PwW8!z3O!g=g*z^e6{A;0p+VRRLT#PU)%Y&+~|nc&6TgD
z99-_LIFb@p5y=0?C58RYOmi0Yhnm9LsftS3pUd;?`g3n-uFUHGyX%Ro%c~#Kp|YtG
z_g&UZ$v-f;^q+UAxzeWxozeII1iYWXrW|%kY{mR{ZlTW6yNf<&9*-=|v|FaR&tiJ`
zDybMJ)2+Wx3V&fg|0#RTl-k3-smmTn7I5c;ZhiAHJgslDJ+FqVO1@BW%S`pX_taay
z@qA~F_%>%>zvSH`G6Kp^=RKaA<#=`DwKr#aZt%*#@^xIF6y?onI(wOF<FXGNW+D9S
ztD=5nv>xr)`1=_1xn1)viC*3~{n-|i*ZOvb+M&8ko~*x*b<g`fBYfTZb5A8dM7vB|
zzO4FU(1R5cFBG0FnsweVr1WK`S3qZ{-+Qek4iP+|$8XK*&bKpbTvj4I`CO=H<ANF2
zV&;mx&^xBC`Z>m0eDBk{u4i^`FE=eTuzdZi?ZO(KU31^>UiEC@d(k=R=}$C|NBiI2
zey3VT`qAbGHPLR#eYO+6?pS|TOn6$-z6l@e`?I;+*E`uHH3i+teZk*z`=Zm=f_qY7
wU;U2p{GGngPW6?%_Ig&qNQ>9D^M9}#Cz}ZwCxkOGFfcH9y85}Sb4q9e08!PTvj6}9

literal 0
HcmV?d00001

diff --git a/pix/monologo.svg b/pix/monologo.svg
new file mode 100644
index 0000000..100f81b
--- /dev/null
+++ b/pix/monologo.svg
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg id="Ebene_2" data-name="Ebene 2" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 34.36 28.66">
+  <defs>
+    <style>
+      .cls-1 {
+        fill: #231f20;
+      }
+    </style>
+  </defs>
+  <g id="Icons">
+    <g id="PDF_Annotation" data-name="PDF Annotation">
+      <g>
+        <path class="cls-1" d="m4.99,20.59v-4h1.29c.49,0,.81.02.96.06.23.06.42.19.57.39.15.2.23.46.23.78,0,.25-.04.45-.13.62s-.2.3-.34.39c-.14.1-.28.16-.42.19-.19.04-.47.06-.84.06h-.53v1.51h-.81Zm.81-3.32v1.13h.44c.32,0,.53-.02.64-.06.11-.04.19-.11.25-.2.06-.09.09-.19.09-.31,0-.15-.04-.27-.13-.36-.09-.09-.19-.15-.32-.18-.1-.02-.29-.03-.58-.03h-.39Z"/>
+        <path class="cls-1" d="m8.71,16.6h1.47c.33,0,.59.03.76.08.23.07.44.19.6.37.17.18.29.39.38.65.09.25.13.57.13.94,0,.33-.04.61-.12.85-.1.29-.24.53-.43.71-.14.14-.33.24-.57.32-.18.06-.42.08-.71.08h-1.52v-4Zm.81.68v2.65h.6c.23,0,.39-.01.49-.04.13-.03.24-.09.33-.17s.16-.21.21-.39c.05-.18.08-.42.08-.73s-.03-.55-.08-.71c-.05-.17-.13-.29-.23-.39s-.22-.16-.37-.19c-.11-.03-.33-.04-.66-.04h-.36Z"/>
+        <path class="cls-1" d="m12.74,20.59v-4h2.74v.68h-1.93v.95h1.67v.68h-1.67v1.7h-.81Z"/>
+      </g>
+      <g>
+        <path class="cls-1" d="m17.9,13.1v12.72c0,.23-.19.42-.42.42H2.42c-.23,0-.42-.19-.42-.42V9.31c0-.23.19-.41.42-.41h11.29v-2H2.42c-1.33,0-2.42,1.08-2.42,2.41v16.51c0,1.34,1.09,2.42,2.42,2.42h15.06c1.34,0,2.42-1.08,2.42-2.42v-12.72h-2Z"/>
+        <path class="cls-1" d="m13.72,6.9l3.09,3.12,3.09,3.12h-6.18c0-2.08,0-4.16,0-6.24Z"/>
+      </g>
+      <g id="Layer_2" data-name="Layer 2">
+        <g id="Layer_1-2" data-name="Layer 1-2">
+          <g id="Pictogram">
+            <polygon class="cls-1" points="34.36 0 5.54 0 5.54 6.5 7.46 6.5 7.46 1.91 32.44 1.91 32.44 19.17 28.78 19.15 28.77 24.09 23.76 19.17 21.88 19.17 21.88 21.08 22.98 21.08 30.68 28.66 30.69 21.09 34.36 21.1 34.36 0"/>
+          </g>
+        </g>
+      </g>
+    </g>
+  </g>
+</svg>
\ No newline at end of file
diff --git a/version.php b/version.php
index 7a1b8e6..ee31937 100644
--- a/version.php
+++ b/version.php
@@ -25,7 +25,7 @@
 defined('MOODLE_INTERNAL') || die();
 
 $plugin->component = 'mod_pdfannotator';
-$plugin->version   = 2023032000;
+$plugin->version   = 2023033000;
 $plugin->release  = 'PDF Annotator v1.5 release 3';
 $plugin->requires  = 2021051700;
 $plugin->maturity  = MATURITY_STABLE;
-- 
GitLab