mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 17:36:38 +02:00
Changes throughout Moodle to remove any reserved words from the
Moodle tables. ie user -> userid in many tables, plus in user_students start -> starttime and end -> endtime I've just done all this as carefully as I could ... I don't think I missed anything but it's pretty intensive work and I'd be fooling myself if I didn't think I'd missed a couple. Note that this version should pretty much be able to bootstrap itself using PostgreSQL now ... but this is untested
This commit is contained in:
parent
1f48942e7d
commit
ebc3bd2b24
68 changed files with 277 additions and 461 deletions
|
@ -48,7 +48,7 @@
|
|||
/// Make some easy ways to reference submissions
|
||||
if ($submissions = assignment_get_all_submissions($assignment)) {
|
||||
foreach ($submissions as $submission) {
|
||||
$submissionbyuser[$submission->user] = $submission;
|
||||
$submissionbyuser[$submission->userid] = $submission;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@
|
|||
foreach($users as $user) {
|
||||
if (!isset($submissionbyuser[$user->id])) { // Need to create empty entry
|
||||
$newsubmission->assignment = $assignment->id;
|
||||
$newsubmission->user = $user->id;
|
||||
$newsubmission->userid = $user->id;
|
||||
$newsubmission->timecreated = time();
|
||||
if (!insert_record("assignment_submissions", $newsubmission)) {
|
||||
error("Could not insert a new empty submission");
|
||||
|
@ -97,7 +97,7 @@
|
|||
$newsubmission->mailed = 0; // Make sure mail goes out (again, even)
|
||||
$newsubmission->id = $num;
|
||||
if (! update_record("assignment_submissions", $newsubmission)) {
|
||||
notify(get_string("failedupdatefeedback", "assignment", $submission->user));
|
||||
notify(get_string("failedupdatefeedback", "assignment", $submission->userid));
|
||||
} else {
|
||||
$count++;
|
||||
}
|
||||
|
@ -117,7 +117,7 @@
|
|||
echo "<FORM ACTION=submissions.php METHOD=post>\n";
|
||||
|
||||
foreach ($submissions as $submission) {
|
||||
$user = $users[$submission->user];
|
||||
$user = $users[$submission->userid];
|
||||
assignment_print_submission($assignment, $user, $submission, $teachers, $grades);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue