File tree 2 files changed +10
-2
lines changed
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 24
24
25
25
defined ('MOODLE_INTERNAL ' ) || die ();
26
26
27
+ // Totara compatibility.
28
+ if (!defined ('MESSAGE_DEFAULT_ENABLED ' )) {
29
+ define ('MESSAGE_DEFAULT_ENABLED ' , MESSAGE_DEFAULT_LOGGEDIN | MESSAGE_DEFAULT_LOGGEDOFF );
30
+ }
31
+
27
32
$ messageproviders = array (
28
33
// Notify teacher that a student has submitted an attempt.
29
34
'submission ' => array (
Original file line number Diff line number Diff line change 49
49
* @return mixed true if the feature is supported, null if unknown
50
50
*/
51
51
function hvp_supports ($ feature ) {
52
+ // Totara compatibility.
53
+ if (defined ('FEATURE_MOD_PURPOSE ' ) && $ feature == FEATURE_MOD_PURPOSE ) {
54
+ return MOD_PURPOSE_CONTENT ;
55
+ }
56
+
52
57
switch ($ feature ) {
53
58
case FEATURE_GROUPS :
54
59
return true ;
@@ -70,8 +75,6 @@ function hvp_supports($feature) {
70
75
return true ;
71
76
case FEATURE_SHOW_DESCRIPTION :
72
77
return true ;
73
- case FEATURE_MOD_PURPOSE :
74
- return MOD_PURPOSE_CONTENT ;
75
78
76
79
default :
77
80
return null ;
You can’t perform that action at this time.
0 commit comments