Permalink
Browse files

Moved back a few functions from locallib.php to lib.php

  • Loading branch information...
rkingdon
rkingdon committed Jun 18, 2004
1 parent de72006 commit 3f06c90ddad3ba1068bba27a545c17b446e08dd4
Showing with 33 additions and 31 deletions.
  1. +30 −0 mod/workshop/lib.php
  2. +3 −31 mod/workshop/locallib.php
View
@@ -997,6 +997,23 @@ function workshop_get_participants($workshopid) {
}
+//////////////////////////////////////////////////////////////////////////////////////
+// Non-standard workshop functions
+//////////////////////////////////////////////////////////////////////////////////////
+function workshop_file_area($workshop, $submission) {
+ return make_upload_directory( workshop_file_area_name($workshop, $submission) );
+}
+
+
+//////////////////////////////////////////////////////////////////////////////////////
+function workshop_file_area_name($workshop, $submission) {
+// Creates a directory file name, suitable for make_upload_directory()
+ global $CFG;
+
+ return "$workshop->course/$CFG->moddata/workshop/$submission->id";
+}
+
+
///////////////////////////////////////////////////////////////////////////////////////////////
function workshop_get_agree_logs($course, $timestart) {
// get the "agree" entries for this user (the assessment owner and add the first and last names
@@ -1090,6 +1107,19 @@ function workshop_get_grade_logs($course, $timestart) {
}
+//////////////////////////////////////////////////////////////////////////////////////
+function workshop_get_student_submission($workshop, $user) {
+// Return a submission for a particular user
+ global $CFG;
+
+ $submission = get_record("workshop_submissions", "workshopid", $workshop->id, "userid", $user->id);
+ if (!empty($submission->timecreated)) {
+ return $submission;
+ }
+ return NULL;
+}
+
+
///////////////////////////////////////////////////////////////////////////////////////////////
function workshop_get_submit_logs($course, $timestart) {
// get the "submit" entries and add the first and last names...
View
@@ -27,14 +27,14 @@
workshop_delete_submitted_files($workshop, $submission) {
workshop_delete_user_files($workshop, $user, $exception) {
-workshop_file_area($workshop, $submission) {
-workshop_file_area_name($workshop, $submission) {
+workshop_file_area($workshop, $submission) { <--- in lib.php
+workshop_file_area_name($workshop, $submission) { <--- in lib.php
workshop_get_assessments($submission) {
workshop_get_comments($assessment) {
workshop_get_participants($workshopid) {
workshop_get_student_assessments($workshop, $user) {
-workshop_get_student_submission($workshop, $user) {
+workshop_get_student_submission($workshop, $user) { <--- in lib.php
workshop_get_student_submission_assessments($workshop) {
workshop_get_student_submissions($workshop) { <--- in lib.php
workshop_get_submission_assessment($submission, $user) {
@@ -474,21 +474,6 @@ function workshop_delete_user_files($workshop, $user, $exception) {
}
-//////////////////////////////////////////////////////////////////////////////////////
-function workshop_file_area($workshop, $submission) {
- return make_upload_directory( workshop_file_area_name($workshop, $submission) );
-}
-
-
-//////////////////////////////////////////////////////////////////////////////////////
-function workshop_file_area_name($workshop, $submission) {
-// Creates a directory file name, suitable for make_upload_directory()
- global $CFG;
-
- return "$workshop->course/$CFG->moddata/workshop/$submission->id";
-}
-
-
//////////////////////////////////////////////////////////////////////////////////////
function workshop_get_assessments($submission, $all = '') {
// Return assessments for this submission ordered oldest first, newest last
@@ -534,19 +519,6 @@ function workshop_get_student_assessments($workshop, $user) {
}
-//////////////////////////////////////////////////////////////////////////////////////
-function workshop_get_student_submission($workshop, $user) {
-// Return a submission for a particular user
- global $CFG;
-
- $submission = get_record("workshop_submissions", "workshopid", $workshop->id, "userid", $user->id);
- if (!empty($submission->timecreated)) {
- return $submission;
- }
- return NULL;
-}
-
-
//////////////////////////////////////////////////////////////////////////////////////
function workshop_get_student_submission_assessments($workshop) {
// Return all assessments on the student submissions, order by youngest first, oldest last

0 comments on commit 3f06c90

Please sign in to comment.