File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -133,6 +133,9 @@ Called when checking if LTI user can access the requested page
133
133
return an array of base filenames that are allowed to be accessed by a user
134
134
accessing an assessment via LTI. This is merged with the default list.
135
135
136
+ Called to determine if a user should be redirected to a diagnostic assessment
137
+ ` isDiagnostic() `
138
+
136
139
## util/batchcreateinstr
137
140
138
141
Include via ` $CFG['hooks']['util/batchcreateinstr'] `
Original file line number Diff line number Diff line change 465
465
if (isset ($ _GET ['graphdisp ' ])) {
466
466
$ _SESSION ['graphdisp ' ] = $ _GET ['graphdisp ' ];
467
467
}
468
- if (isset ($ _SESSION ['isdiag ' ])) { // && strpos(basename($_SERVER['PHP_SELF']),'showtest.php')===false) {
468
+ if (!function_exists ('isDiagnostic ' )) {
469
+ function isDiagnostic () {
470
+ return isset ($ _SESSION ['isdiag ' ]); // && strpos(basename($_SERVER['PHP_SELF']),'showtest.php')===false) {
471
+ }
472
+ }
473
+ if (isDiagnostic ()) {
469
474
$ urlparts = parse_url ($ _SERVER ['PHP_SELF ' ]);
470
475
if ($ _SESSION ['diag_aver ' ][0 ] == 1 &&
471
476
!in_array (basename ($ urlparts ['path ' ]), array ('showtest.php ' , 'ltiuserprefs.php ' ))
You can’t perform that action at this time.
0 commit comments