From 9e5b9a20848e4aab5f7e9c4d58148289d237d9bd Mon Sep 17 00:00:00 2001 From: gustav_delius Date: Wed, 8 Dec 2004 10:09:25 +0000 Subject: [PATCH] fixed missing ) and undefined $timenow --- mod/workshop/submissions.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mod/workshop/submissions.php b/mod/workshop/submissions.php index bdb9a1cdf0..d8909f92b7 100644 --- a/mod/workshop/submissions.php +++ b/mod/workshop/submissions.php @@ -25,6 +25,8 @@ require("locallib.php"); require_variable($id); // Course Module ID + + $timenow = time(); // get some useful stuff... if (! $cm = get_record("course_modules", "id", $id)) { @@ -416,7 +418,7 @@ if ($submission->userid <> $USER->id) { error("Edit submission: Userids do not match"); } - if (($submission->timecreated < ($timenow - $CFG->maxeditingtime)) and ($workshop->assessmentstart < time()) { + if (($submission->timecreated < ($timenow - $CFG->maxeditingtime)) and ($workshop->assessmentstart < $timenow)) { error(get_string('notallowed', 'workshop')); } ?> @@ -578,7 +580,6 @@ /*************** update submission ***************************/ elseif ($action == 'updatesubmission') { - $timenow = time(); $form = data_submitted(); if (empty($form->sid)) { @@ -663,5 +664,4 @@ print_footer($course); -?> - +?> \ No newline at end of file -- 2.39.5