mirror of
https://github.com/moodle/moodle.git
synced 2025-08-05 00:46:50 +02:00
Security fix to disallow guest uploading
This commit is contained in:
parent
00178c8b42
commit
890c016ac0
2 changed files with 5 additions and 0 deletions
|
@ -41,6 +41,7 @@ $string['failedupdatefeedback'] = 'Failed to update submission feedback for user
|
|||
$string['feedback'] = 'Feedback';
|
||||
$string['feedbackfromteacher'] = 'Feedback from the $a';
|
||||
$string['feedbackupdated'] = 'Submissions feedback updated for $a people';
|
||||
$string['guestnoupload'] = 'Sorry, guests are not allowed to upload.';
|
||||
$string['helpoffline'] = '<p>This is useful when the assignment is performed outside of Moodle. It could be
|
||||
something elsewhere on the web or face-to-face.</p><p>Students can see a description of the assignment,
|
||||
but can\'t upload files or anything. Grading works normally, and students will get notifications of
|
||||
|
|
|
@ -57,6 +57,10 @@ class assignment_uploadsingle extends assignment_base {
|
|||
function upload() {
|
||||
global $CFG, $USER;
|
||||
|
||||
if (isguest($USER->id)) {
|
||||
error(get_string('guestnoupload','assignment'));
|
||||
}
|
||||
|
||||
$this->view_header(get_string('upload'));
|
||||
|
||||
if (!$this->isopen()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue