Skip to content

Commit

Permalink
backupdata folder is not visible in directory resource any more, the …
Browse files Browse the repository at this point in the history
…backup files were not downloadable, but they might be stored in browser cache when teacher and student were logged from the same browser and computer account - MDL-6280 ; merged from MOODLE_16_STABLE
  • Loading branch information
skodak committed Sep 16, 2006
1 parent 8876809 commit de9a33f
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions file.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,12 @@
}

// security: only editing teachers can access backups
if ((!has_capability('moodle/site:backup', get_context_instance(CONTEXT_COURSE, $course->id)))
and (count($args) >= 2)
and (strtolower($args[1]) == 'backupdata')) {

error('Access not allowed');
if ((count($args) >= 2) and (strtolower($args[1]) == 'backupdata')) {
if (!has_capability('moodle/site:backup', get_context_instance(CONTEXT_COURSE, $course->id))) {
error('Access not allowed');
} else {
$lifetime = 0; //disable browser caching for backups
}
}

if (is_dir($pathname)) {
Expand Down

0 comments on commit de9a33f

Please sign in to comment.