Using Trac for Teaching
This is something I wrote up a while back (Trac 0.9). Now it's even easier since 0.10 doesn't need the svn backend.
Using Trac in a Teaching Environment
Obviously, some paths and usernames/groups etc may need to be changed…
- Install trac. I used 0.9.6.
- Create the repository (fake)
- svnadmin create /var/www/svn/teacher
- TMPDIR=`mktemp -d`
- svn import "${TMPDIR}" file:////var/www/svn/teacher -m "initial setup"
- rm -rf "${TMPDIR}"
- chown -R apache.apache /var/www/svn/teacher
- Create the trac project
- trac-admin /var/www/svn/teacher initenv "Mrs. M Web World" sqlite:db/trac.db /var/www/svn/teacher /usr/share/trac/templates
- chown -R apache.apache /var/www/trac/teacher
- trac-admin /var/www/svn/teacher permission add "Admin" "TRAC_ADMIN"
- Set up Apache as needed…
- htpasswd -cm /var/www/trac/teacher/.htpasswd Admin
- htpasswd -m /var/www/trac/teacher/.htpasswd Teacher
- htpasswd -m /var/www/trac/teacher/.htpasswd TestStudent [pwd: test]
- Create/modify trac.conf in Apache's conf.d directory (see below)
- (Test login at this point)
- Install some needed plugins
- Now we need to edit trac itself, to make it look nicer for student interface:
- Edit /usr/lib/python2.3/site-packages/trac/ticket/web_ui.py
- Search for "New Ticket" within a util.Markup() call and change it to "New Question"
- Edit /usr/lib/python2.3/site-packages/trac/ticket/roadmap.py
- Search for "Roadmap" within a Markup() call (with accesskey 3) and change it to "Syllabus"
- Edit trac.ini as needed:
- I changed the [header_logo] with an image of the county school system and associated link.
- Make sure the various plugins are enabled/disabled in [components] section of trac.ini (see below)
- Login again (as 'Admin'). You should have an 'Admin option'.
- Permissions. I made two groups "@teachers" and "@students".
- @students get TICKET_APPEND, TICKET_CREATE, TICKET_VIEW, ROADMAP_VIEW, MILESTONE_VIEW, WIKI_VIEW
- @teachers get TICKET_ADMIN, WIKI_ADMIN, MILESTONE_ADMIN, ROADMAP_VIEW
- At this point, we're done with the main server stuff (until the term starts and you need to add more users as above). Now the teacher can customize with that login (recommended).
- My recommendations:
- Milestones:
- These should be based on the syllabus (that's what the students see it as). I assume each major section of the class would get one. The "due date" could be the Monday of the Quiz week or something similar.
- Ticket types: General Question and Clarification Request
- Components: None (removed them all)
- Priorities: None (removed them all)
- Severities: None (removed them all)
- Versions: None (removed them all)
- Milestones:
httpd.conf
Alias /trac/ "/usr/share/trac/htdocs/" <Location /teacher> SetHandler mod_python PythonHandler trac.web.modpython_frontend PythonOption TracEnv /var/www/trac/teacher AuthType Basic AuthName "Mrs. M's Web World" AuthUserFile /var/www/trac/teacher/.htpasswd Require valid-user </Location>
trac.ini excerpts
[components] webadmin.* = enabled trac.wiki.macros.macrolistmacro = disabled trac.versioncontrol.web_ui.log.logmodule = disabled trac.about = disabled trac.search.searchmodule = disabled ticketdelete.* = enabled trac.versioncontrol.web_ui.changeset.changesetmodule = disabled trac.ticket.web_ui.updatedetailsfortimeline = disabled trac.mimeview.patch.patchrenderer = disabled trac.mimeview.rst.restructuredtextrenderer = disabled trac.wiki.macros.pageoutlinemacro = disabled trac.attachment.attachmentmodule = disabled trac.wiki.macros.imagemacro = disabled trac.versioncontrol.web_ui.browser.browsermodule = disabled trac.mimeview.php.phprenderer = disabled trac.timeline.timelinemodule = disabled
Comments
No comments.