File tree 1 file changed +13
-1
lines changed
1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -238,11 +238,20 @@ function capquiz_reset_gradebook($courseid, $type = '') {
238
238
}
239
239
}
240
240
241
+
242
+ // Ugly hack to make 3.11 and 4.0 work seamlessly.
243
+ if (!defined ('FEATURE_MOD_PURPOSE ' )) {
244
+ define ('FEATURE_MOD_PURPOSE ' , 'mod_purpose ' );
245
+ }
246
+ if (!defined ('MOD_PURPOSE_ASSESSMENT ' )) {
247
+ define ('MOD_PURPOSE_ASSESSMENT ' , 'assessment ' );
248
+ }
249
+
241
250
/**
242
251
* Checks if $feature is supported
243
252
*
244
253
* @param string $feature
245
- * @return bool
254
+ * @return mixed
246
255
*/
247
256
function capquiz_supports ($ feature ) {
248
257
switch ($ feature ) {
@@ -252,7 +261,10 @@ function capquiz_supports($feature) {
252
261
case FEATURE_USES_QUESTIONS :
253
262
case FEATURE_GRADE_HAS_GRADE :
254
263
return true ;
264
+ case FEATURE_MOD_PURPOSE :
265
+ return MOD_PURPOSE_ASSESSMENT ;
255
266
default :
256
267
return false ;
257
268
}
258
269
}
270
+
You can’t perform that action at this time.
0 commit comments