[system] / trunk / wwmoodle / wwquestion / file.php Repository:
ViewVC logotype

Diff of /trunk/wwmoodle/wwquestion/file.php

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 5476 Revision 5477
22 22
23 // extract relative path components 23 // extract relative path components
24 $args = explode('/', trim($relativepath, '/')); 24 $args = explode('/', trim($relativepath, '/'));
25 25
26 //security this should only be used for wwquestions 26 //security this should only be used for wwquestions
27 if ((count($args) < 3) || ($args[0] != 'wwquestions')) { 27 if ((count($args) < 3) || ($args[0] != '1') || ($args[1] != 'wwquestions')) {
28 error('No valid arguments supplied'); 28 error('No valid arguments supplied');
29 } 29 }
30 30
31 //extra security for users 31 //extra security for users
32 if($args[1] == 'users') { 32 if($args[1] == 'users') {
33 //trying to get a user equation image 33 //trying to get a user equation image
34 //BEEF this up with roles etc, so teachers have access to students pics so on. 34 //BEEF this up with roles etc, so teachers have access to students pics so on.
35 if($args[2] != $USER->id) { 35 if($args[2] != $USER->id) {
36 error('Access Denied to this Picture'); 36 error('Access Denied to this Equation Image');
37 } 37 }
38 } 38 }
39 39
40 40
41 41

Legend:
Removed from v.5476  
changed lines
  Added in v.5477

aubreyja at gmail dot com
ViewVC Help
Powered by ViewVC 1.0.9