Creating a homework hand-in icon on student desktops

From K12LTSP Wiki

Jump to: navigation, search

This procedure describes how to create an icon on all users' desktops onto which they can drag files, which will then be copied to a folder where the teacher can pick them up.

  • Create group called 'teachers' and put all teacher's logins in it
  • Create /home/inbox directory (folder):
mkdir /home/inbox
  • Set the group to teachers for inbox
chown :teachers /home/inbox
  • Set the permissions on /home/inbox so that any files placed in it are in the teachers group, and so that students can place files into it but can't see other students files already in there:
chmod 3773 /home/inbox
  • Create /usr/local/bin/handin and put the following into it:
#!/bin/sh
umask 027
chmod g+rw "$1"
cp "$1" /home/inbox \
 || zenity --error --text "There was an error copying the file (perhaps one already exists by that name?)"

Since students cannot overwrite each other's files in the inbox folder(a good thing), handin will display an error if a student tries to hand in a file with the same name of a file that has already been handed in.

  • Make handin executable:
chmod +x /usr/local/bin/handin
  • Login as root on console, create icon/launcher on the desktop that calls handin
  • Push that icon out to all user's desktops by dragging it onto the "Push icon to all users" icon.

Students can drag files onto the icon and the files will be copied to /home/inbox where teachers can access them . A given user will not have access to any files within /home/inbox except his own although he/she won't be able to see them since the read permission is turned off. Teachers will have read & write permissions on all the files placed in /home/inbox.

Personal tools