if ($choose) {
if (count(explode('.', $choose)) > 2) {
- print_error('Incorrect format for choose parameter');
+ print_error('invalidformatpara');
}
}
if (! $course = get_record("course", "id", $id) ) {
- print_error("That's an invalid course id");
+ print_error('invalidcourseid');
}
require_login($course);
if (! $basedir = make_upload_directory("$course->id")) {
- print_error("The site administrator needs to fix the file permissions");
+ print_error("nopermissiontomkdir");
}
$baseweb = $CFG->wwwroot;
if ($wdir == "/backupdata") {
if (! make_upload_directory("$course->id/backupdata")) { // Backup folder
- print_error("Could not create backupdata folder. The site administrator needs to fix the file permissions");
+ print_error("nopermissiontomkdir");
}
}
if (!is_dir($basedir.$wdir)) {
html_header($course, $wdir);
- print_error("Requested directory does not exist.", '', "$CFG->wwwroot/files/index.php?id=$id");
+ print_error('nofolder', '', "$CFG->wwwroot/files/index.php?id=$id");
}
switch ($action) {
}
if (!zip_files($files,"$basedir$wdir/$name")) {
- print_error("zipfileserror","error");
+ print_error("zipfileserror", "error");
}
clearfilelist();
$file = basename($file);
if (!unzip_file("$basedir$wdir/$file")) {
- print_error("unzipfileserror","error");
+ print_error("unzipfileserror", "error");
}
echo "<div style=\"text-align:center\"><form action=\"index.php\" method=\"get\">";
$string['invalidevent'] = 'Invalid event';
$string['invalidfieldname'] = '\"$a\" is not a valid field name';
$string['invalidfiletype'] = '\"$a\" is not a valid file type';
+$string['invalidformatpara'] = 'Incorrect format for choose parameter';
$string['invalidgroupid'] = 'INcorrect group id specified.';
$string['invalidipformat'] = 'Invalid IP address format';
$string['invalidmd5'] = 'Invalid md5';
$string['nonmeaningfulcontent'] = 'Non meaningful content';
$string['noparticipatorycms'] = 'Sorry, but you have no participatory course modules to report on.';
$string['nopermissions'] = 'Sorry, but you do not currently have permissions to do that ($a)';
+$string['nopermissiontomkdir'] = 'Cannot create folder. The site administrator needs to fix the file permissions';
$string['nopermissiontoimportact'] = 'You do not have the required permissions to import activities to this course';
$string['nopermissiontoviewpage'] = 'You are not allowed to look at this page';
$string['nopermissiontomanagegroup'] = 'You do not have the required permissions to manage groups.';
$string['nosite'] = 'No sites';
$string['nositeid'] = 'No site ID';
+$string['nofolder'] = 'Requested directory does not exist.';
$string['nostatstodisplay'] = 'There is no available data to display, sorry.';
$string['notavailable'] = 'That is not currently available';
$string['notmemberofgroup'] = 'You are not a member of this course group';