While making your own might be a worthwhile experience it's probably unnecessary work unless you have very special requirements.
Perhaps Moodle will work for you?
Moodle is a software package for
producing Internet-based courses and
web sites. It is a global development
project designed to support a social
constructionist framework of
education.
Moodle is provided freely as Open
Source software (under the GNU Public
License). Basically this means Moodle
is copyrighted, but that you have
additional freedoms. You are allowed
to copy, use and modify Moodle
provided that you agree to: provide
the source to others; not modify or
remove the original license and
copyrights, and apply this same
license to any derivative work. Read
the license for full details and
please contact the copyright holder
directly if you have any questions.
Moodle can be installed on any
computer that can run PHP, and can
support an SQL type database (for
example MySQL). It can be run on
Windows and Mac operating systems and
many flavors of linux (for example Red
Hat or Debian GNU). There are many
knowledgable Moodle Partners to assist
you, even host your Moodle site.
The word Moodle was originally an
acronym for Modular Object-Oriented
Dynamic Learning Environment, which is
mostly useful to programmers and
education theorists. It's also a verb
that describes the process of lazily
meandering through something, doing
things as it occurs to you to do them,
an enjoyable tinkering that often
leads to insight and creativity. As
such it applies both to the way Moodle
was developed, and to the way a
student or teacher might approach
studying or teaching an online course.
Anyone who uses Moodle is a Moodler.