$string[assignmentdetails] = "Assignment details";
$string[duedate] = "Assignment due";
$string[early] = "\$a early";
+$string[failedupdatefeedback] = "Failed to update submission feedback for user \$a";
+$string[feedbackupdated] = "Submissions feedback updated for \$a people";
$string[late] = "\$a late";
$string[notsubmittedyet] = "Not submitted yet";
$string[overwritewarning] = "Warning: uploading again will REPLACE your current submission";
$string[submissionfeedback] = "Submission feedback";
$string[submissions] = "Submissions";
-$string[failedupdatefeedback] = "Failed to update submission feedback for user \$a";
-$string[feedbackupdated] = "Submissions feedback updated for \$a people";
+$string[uploadedfiles] = "uploaded files";
$string[viewsubmissions] = "View \$a submitted assignments";
$string[yoursubmission] = "Your submission";
$string[modulenameplural] = "Journals";
#------------------------------------------------------------
+
+$string[noentry] = "No entry";
+
?>
return $result;
}
+function assignment_user_outline($course, $user, $mod, $assignment) {
+ if ($submission = assignment_get_submission($assignment, $user)) {
+ if ($basedir = assignment_file_area($assignment, $user)) {
+ if ($files = get_directory_list($basedir)) {
+ $countfiles = count($files)." ".get_string("uploadedfiles", "assignment");
+ foreach ($files as $file) {
+ $countfiles .= "; $file";
+ }
+ }
+ }
+ $result->info = $countfiles;
+ $result->time = $submission->timemodified;
+ return $result;
+ }
+ return NULL;
+}
+
+function assignment_user_complete($course, $user, $mod, $assignment) {
+ if ($submission = assignment_get_submission($assignment, $user)) {
+ if ($basedir = assignment_file_area($assignment, $user)) {
+ if ($files = get_directory_list($basedir)) {
+ $countfiles = count($files)." ".get_string("uploadedfiles", "assignment");
+ foreach ($files as $file) {
+ $countfiles .= "; $file";
+ }
+ }
+ }
+
+ print_simple_box_start();
+ echo "<P><FONT SIZE=1>";
+ echo get_string("lastmodified").": ";
+ echo userdate($submission->timemodified);
+ echo assignment_print_difference($assignment->timedue - $submission->timemodified);
+ echo "</FONT></P>";
+
+ assignment_print_user_files($assignment, $user);
+
+ echo "<BR>";
+
+ assignment_print_feedback($course, $submission);
+
+ print_simple_box_end();
+
+ } else {
+ print_string("notsubmittedyet", "assignment");
+ }
+}
+
+
function assignment_cron () {
// Function to be run periodically according to the moodle cron
// Finds all assignment notifications that have yet to be mailed out, and mails them
$footer = "";
}
- print_post($post, $course->id, $ownpost=false, $reply=false, $link=false, $rate=false, $footer);
+ forum_print_post($post, $course->id, $ownpost=false, $reply=false, $link=false, $rate=false, $footer);
}
} else {
function journal_user_complete($course, $user, $mod, $journal) {
- global $CFG, $THEME;
if ($entry = get_record_sql("SELECT * FROM journal_entries
WHERE user='$user->id' AND journal='$journal->id'")) {
echo text_to_html($entry->text);
}
if ($entry->teacher) {
- $teacher = get_record("user", "id", $entry->teacher);
-
- echo "\n<BR CLEAR=ALL>";
- echo "<TABLE><TR>";
- echo "<TD WIDTH=35 VALIGN=TOP>";
- print_user_picture($entry->teacher, $course->id, $teacher->picture);
- echo "<TD BGCOLOR=\"$THEME->cellheading\">".$RATING[$entry->rating];
- if ($entry->timemarked) {
- echo " <FONT SIZE=1>".userdate($entry->timemarked)."</FONT>";
- }
- echo "<P ALIGN=RIGHT><FONT SIZE=-1><I>";
- if ($RATING[$entry->rating]) {
- echo "Overall rating: ";
- echo $RATING[$entry->rating];
- } else {
- echo "No rating given";
- }
- echo "</I></FONT></P>";
-
- echo "<BR><FONT COLOR=#000055>";
- echo text_to_html($entry->comment);
- echo "</FONT><BR>";
- echo "</TD></TR></TABLE>";
+ journal_print_feedback($course, $entry);
}
print_simple_box_end();
} else {
- echo "No entry";
+ print_string("noentry", "journal");
}
}