http://atutor.ca/atutor/mantis/view.php?id=3071
authorjoel kronenberg <joel.kronenberg@utoronto.ca>
Tue, 5 Jun 2007 16:11:14 +0000 (16:11 -0000)
committerjoel kronenberg <joel.kronenberg@utoronto.ca>
Tue, 5 Jun 2007 16:11:14 +0000 (16:11 -0000)
docs/file_storage/index.php
docs/include/lib/file_storage.inc.php

index e0e22bf..684fde4 100644 (file)
@@ -489,7 +489,7 @@ if (authenticate(AT_PRIV_ASSIGNMENTS, AT_PRIV_RETURN)) {
                <?php echo _AT('workspace'); ?> 
                <select name="ot" id="ot">
                        <option value="1" <?php if ($owner_type == WORKSPACE_COURSE) { echo 'selected="selected"'; } ?>><?php echo _AT('course_files'); ?></option>
-                       <?php if ($_SESSION['member_id']): ?>
+                       <?php if ($_SESSION['member_id'] && $_SESSION['enroll']): ?>
                                <option value="2" <?php if ($owner_type == WORKSPACE_PERSONAL) { echo 'selected="selected"'; } ?>><?php echo _AT('my_files'); ?></option>
                        <?php endif; ?>
                        <?php if ($file_storage_groups): ?>
index 29eef8c..902d1be 100644 (file)
@@ -39,7 +39,7 @@ define('WORKSPACE_AUTH_RW',    3); // to save time
  * returns WORKSPACE_AUTH_WRITE if the user can write\r
  */\r
 function fs_authenticate($owner_type, $owner_id) {\r
-       if (($owner_type == WORKSPACE_PERSONAL) && $_SESSION['member_id'] && ($owner_id == $_SESSION['member_id'])) {\r
+       if (($owner_type == WORKSPACE_PERSONAL) && $_SESSION['member_id'] && $_SESSION['enroll'] && ($owner_id == $_SESSION['member_id'])) {\r
 \r
                return WORKSPACE_AUTH_RW;\r
 \r