$filename = $CFG->dataroot.'/temp/gradeimport/cvs/'.$USER->id.'/'.$importcode;
if (!file_exists($filename)) {
- print_error('error processing upload file');
+ print_error('cannotuploadfile');
}
if ($fp = fopen($filename, "r")) {
} else {
// collision
unlink($filename); // needs to be uploaded again, sorry
- print_error('mapping collision detected, 2 fields maps to the same grade item '.$j);
+ print_error('cannotmapfield', '', '', $j);
}
}
}
if ($id) {
if (!$key = get_record('user_private_key', 'id', $id)) {
- print_error('Group ID was incorrect');
+ print_error('invalidgroupid');
}
if (empty($courseid)) {
$courseid = $key->instance;
} else if ($courseid != $key->instance) {
- print_error('Course ID was incorrect');
+ print_error('invalidcourseid');
}
if (!$course = get_record('course', 'id', $courseid)) {
- print_error('Course ID was incorrect');
+ print_error('invalidcourseid');
}
} else {
if (!$course = get_record('course', 'id', $courseid)) {
- print_error('Course ID was incorrect');
+ print_error('invalidcourseid');
}
$key = new object();
}
// extra security check
if (!empty($key->userid) and $USER->id != $key->userid) {
- print_error('You are not owner of this key');
+ print_error('notownerofkey');
}
$returnurl = $CFG->wwwroot.'/grade/import/keymanager.php?id='.$course->id;
$string['cannotfindhelp'] = 'Cannot find \"$a\" language help files';
$string['cannotfindlang'] = 'Cannot find \"$a\" language pack!';
$string['cannotfindsite'] = 'Cannot find site-level course';
+$string['cannotimportgrade'] = 'Grade import error';
$string['cannotgradeuser'] = 'Can not grade this user';
+$string['cannotmapfield'] = 'mapping collision detected, 2 fields maps to the same grade item $a';
$string['cannotmarktopic'] = 'Could not mark that topic for this course';
$string['cannotmoverolewithid'] = 'Cannot move role with ID $a';
$string['cannotmetacourse'] = 'Cannot not add the selected course to this meta course!';
$string['cannotoverridebaserole'] = 'Can not override base role capabilities';
$string['cannotopencsv'] = 'Cannot open csv file';
$string['cannotreadtmpfile'] = 'Error reading temporary file';
+$string['cannotreadfile'] = 'Can not read file';
$string['cannotremovefrommeta'] = 'Could not remove the selected course from this meta course!';
$string['cannotrestore'] = 'An error has occurred and the restore could not be completed!';
$string['cannotsavefile'] = 'Cannot save the file \"$a\".';
$string['cannotupdatesummary'] = 'Could not update the summary!';
$string['cannotupdatesubcate'] = 'Could not update a child category!';
$string['cannotupdatesubcourse'] = 'Could not update a child course!';
+$string['cannotuploadfile'] = 'error processing upload file';
$string['cannotuseadmin'] = 'You need to be an admin user to use this page.';
$string['cannotuseadminadminorteacher'] = 'You need to be a teacher or admin user to use this page.';
$string['cannotrestoreadminorcreator'] = 'You need to be a creator or admin user to restore into new course!';
$string['filternotinstalled'] = 'Filter $a is not currently installed';
$string['filternotactive'] = 'Filter $a is not currently active';
$string['forumblockingtoomanyposts'] = 'You have exceeded the posting threshold set for this forum.';
+$string['gradepubdisable'] = 'Grade publishing disabled';
$string['groupalready'] = 'User already belongs to group $a';
$string['groupexistforcourse'] = 'Group \"$a\" already exists for this course';
$string['groupnotaddederror'] = 'Group \"$a\" not added';
$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';
+$string['notownerofkey'] = 'You are not owner of this key';
$string['onlyadmins'] = 'Only administrators can do that.';
$string['onlyeditingteachers'] = 'Only editing teachers can do that.';
$string['onlyeditown'] = 'You can only edit your own information';