Skip to content

Commit

Permalink
fixed submission logging, email notification for online
Browse files Browse the repository at this point in the history
  • Loading branch information
skodak committed Jul 12, 2005
1 parent 42dc0e9 commit acef19a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions mod/assignment/type/online/assignment.class.php
Expand Up @@ -31,6 +31,10 @@ function view() {

if ($data = data_submitted()) { // No incoming data?
if ($editable && $this->update_submission($data)) {
//TODO fix log actions - needs db upgrade
add_to_log($this->course->id, 'assignment', 'upload',
'view.php?a='.$this->assignment->id, $this->assignment->id, $this->cm->id);
$this->email_teachers($submission);
//redirect to get updated submission date and word count
redirect('view.php?id='.$this->cm->id.'&saved=1');
} else {
Expand Down
2 changes: 2 additions & 0 deletions mod/assignment/type/uploadsingle/assignment.class.php
Expand Up @@ -88,6 +88,8 @@ function upload() {
unset($submission->data1); // Don't need to update this.
unset($submission->data2); // Don't need to update this.
if (update_record("assignment_submissions", $submission)) {
add_to_log($this->course->id, 'assignment', 'upload',
'view.php?a='.$this->assignment->id, $this->assignment->id, $this->cm->id);
$this->email_teachers($submission);
print_heading(get_string('uploadedfile'));
} else {
Expand Down

0 comments on commit acef19a

Please sign in to comment.