Details
-
Type:
New Feature
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 1.9.4
-
Fix Version/s: None
-
Component/s: Add a project here
-
Labels:None
-
Database:MySQL
-
Affected Branches:MOODLE_19_STABLE
Description
Public/Private:
This feature is known as Public/Private. It allows for any Resource, or Activity to either be public and open to everyone or private and available only to members of that course. This is accomplished by using groups and groupings, and modifying the database slightly. When a course is created, a group: Course Members and grouping: Private Course Material is created..
Only member of the group "Course Members" (which belongs to Grouping) will now be allowed to access course material that is designated as private.
A common use for this feature is where you want the syllabus to be public so that students can browse, or shop for classes, while leaving all the course material private.
Attachments
-
$i18n.getText("admin.common.words.hide")
- public_private.zip
- 02/Oct/09 3:22 AM
- 384 kB
- Nick Thompson
-
- public_private/admin/index.php 34 kB
- public_private/admin/settings/misc.php 3 kB
- public_private/backup/backuplib.php 157 kB
- public_private/backup/restorelib.php 460 kB
- public_private/.../block_news_items.php 5 kB
- public_private/calendar/lib.php 71 kB
- public_private/course/edit_form.php 26 kB
- public_private/course/lib.php 126 kB
- public_private/course/mod.php 31 kB
- public_private/course/modedit.php 19 kB
- public_private/course/rest.php 8 kB
- public_private/course/view.php 10 kB
- public_private/group/assign.php 6 kB
- public_private/group/group.php 4 kB
- public_private/group/grouping.php 4 kB
- public_private/group/lib.php 35 kB
- public_private/group/members.php 11 kB
- public_private/lang/en_utf8/admin.php 91 kB
- public_private/lang/.../groupautoassign.html 0.3 kB
- public_private/.../grouppublicprivate.html 0.5 kB
- public_private/lang/en_utf8/moodle.php 97 kB
- public_private/lang/en_utf8/role.php 11 kB
- public_private/lib/accesslib.php 210 kB
- public_private/lib/ajax/ajaxlib.php 8 kB
- public_private/lib/.../section_classes.js 35 kB
- public_private/lib/db/access.php 33 kB
- public_private/lib/db/install.xml 178 kB
- public_private/lib/db/upgrade.php 157 kB
- public_private/lib/db/upgradelib.php 30 kB
- public_private/lib/grouplib.php 27 kB
-
$i18n.getText("admin.common.words.hide")
- PublicPrivate.zip
- 06/Aug/09 2:32 AM
- 28 kB
- Nick Thompson
-
- PublicPrivate.patch 105 kB
- moodle/pix/i/warning.png 0.7 kB
- moodle/pix/t/private.png 3 kB
- moodle/pix/t/public.png 3 kB
Activity
- All
- Comments
- History
- Activity
- Source
- Test Sessions
Nick - Just upload what you have when you are ready and then I can determine how best to handle the code and where to place it in CONTRIB. Then we can handle your CVS write request and get you access to the appropriate path(s). Peace - Anthony
Included in the .zip is a .patch file, and 3 graphics used by public/private
In order to install this just do the following:
1) apply the patch to a fresh install of moodle
2) copy the files over to the new install
3) either upgrade, or perform a 1st-time setup of your moodle instance
Nick - Thanks for sharing the code and sorry for the delayed response to this issue as I have been overwhelmed (which I suppose is a good thing). I slightly renamed the folder and patch file to public_private (all lowercase with underscore between words). In any case, if I might ask you to review http://docs.moodle.org/en/Development:Guidelines_for_contributed_code and make sure that you have covered all of the standard procedures like adding an entry into the Modules and Plugins database, sharing news about this patch in the Moodle.org forums, creating a page in Moodle Docs, etc. All of these little steps help provide a consistency between contributed code that make them easier to share. In addition when you create the modules and plugins database entry you can use the Moodle download server to give folks access to the code. I believe the link will be http://download.moodle.org/download.php/patches19/public_private.zip and then we can get some basic download stats to get an idea of how many folks are downloading the code. In the Docs I would suggest giving a little bit more of a detailed description about how to upgrade or do the 1st-time setup (i.e. are you referring going to the Notifications page?). I'll create the component for tracker issues and assign you as component lead. I have also assigned your CVS write access privileges to contrib/patches/public_private/ but keep in mind that I placed the code specifically in the 19STABLE branch since this patch is for Moodle 1.9. If you want a HEAD branch we can create that too which you could use for testing/development purposes to begin working on preparing a patch for Moodle 2.0. Let me know if you have any questions or if you need anything else. Peace - Anthony
Nick - Just a couple standard reminders. Typically commits to CVS begin with a tracker number. Obviously if you are just correcting a typo that is not required but it is good practice as it will link back to the appropriate issue. Also I have bumped your privileges in the tracker so that you can manage the issues assigned to you that are related to the public private patch. I am going to go ahead and resolve this issue but feel free to comment back here if I have overlooked anything or if you need anything else. Thanks again for sharing your time and talent with the Moodle community. Peace - Anthony
Added code to CVS, bumped privileges in tracker, created tracker component, and granted write access to CVS path - resolving as fixed. Peace - Anthony
Anthony, I've modified the contents of the cvs repository (as seen here: http://cvs.moodle.org/contrib/patches/public_private/),
but the zip file has yet to reflect those changes:
http://download.moodle.org/download.php/patches19/public_private.zip
I waited a few days now. Any idea what I'm doing wrong?
Thanks!
Nick
Nick - Could you tell me what file(s) you modified so I can check them and see what happened? Peace - Anthony
Oops, I just realized what I did worng. I committed the code to HEAD, instead of MOODLE_19_STABLE. I'll go ahead and fix it.
Nick - Keep in mind that you are working with two different branches. It looks like the files you added were to HEAD and not the MOODLE_19_STABLE branch. As such they will not show up in the patches19 download I suspect if you look in http://download.moodle.org/download.php/patches/public_private.zip you will find what you are looking for. Keep in mind the goal of patches is to not have a specific version of the files but the patch files that can be used to modify someone's code base. It looks like you are uploading whole files rather than patches which while acceptable is not ideal as it limits the version and is more likely to cause problems for folks using different versions. Peace - Anthony
Nick - If you are going to provide the php files for a particular version, make sure to document that in your installation instructions and warn folks that they may run into any number of issues and strange behavior should they install it the code with a later version. By taking this approach, to a certain degree you are committing yourself to update any of the files in the patch that are updated in core so keep a close eye on security issues. Peace - Anthony
We are in the process of picking up all the pieces and getting them together. Once we are approved for CVS commit access to the contrib branch and get all the pieces together we will begin committing it.