<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter�1.�DESIGN</title><meta name="generator" content="DocBook XSL Stylesheets V1.70.1"><link rel="start" href="index.html" title="dotlrn-Catalog Documentation"><link rel="up" href="index.html" title="dotlrn-Catalog Documentation"><link rel="prev" href="index.html" title="dotlrn-Catalog Documentation"><link rel="next" href="ch01s02.html" title="Content Folder"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter�1.�DESIGN</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="index.html">Prev</a>�</td><th width="60%" align="center">�</th><td width="20%" align="right">�<a accesskey="n" href="ch01s02.html">Next</a></td></tr></table><hr></div><div class="chapter" lang="en"><div class="titlepage"><div><div><h2 class="title"><a name="id787847"></a>Chapter�1.�DESIGN</h2></div></div></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="section"><a href="ch01.html#id901651">Data Model:</a></span></dt><dt><span class="section"><a href="ch01s02.html">Content Folder</a></span></dt><dt><span class="section"><a href="ch01s03.html">Roles</a></span></dt><dt><span class="section"><a href="ch01s04.html">Relations</a></span></dt><dt><span class="section"><a href="ch01s05.html">Privileges</a></span></dt><dt><span class="section"><a href="ch01s06.html">Category Tree</a></span></dt></dl></div><p>The dotLRN-Catalog package make use of various packages like
    acs-content-repository, categories, assessment dotLRN. It makes use of
    acs-content-repository API to create the data-table and store the data in
    the database. It is designed to provide professors a way to create courses
    that can have different versions (revisions) and than can be associated to
    dotLRN classes and communities, categorized in different categories, and
    also associate one assessment that will provide a way to the users to
    register to the system, enroll to different dotlrn classes, make member of
    communities, etc.</p><div class="section" lang="en"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="id901651"></a>Data Model:</h2></div></div></div><p>The basic table that has all the information about dotlrn-catalog
      courses is:</p><div class="screenshot"><div class="mediaobject"><img src="resources/dcat_table.JPG" alt="image showing dotlrn_catalog table"></div></div><p>I</p><p>Indexes: "dotlrn_catalog_pkey" primary key, 
      btree (course_id) Foreign-key constraints: "$1" FOREIGN KEY (course_id) 
      REFERENCES cr_revisions(revision_id)</p><p>The new content_type and attribute table are created with the
      after-install apm-callback-proc as follows:</p><pre class="programlisting">
        content::type::new -content_type "dotlrn_catalog" \
                           -pretty_name "DotLRN Catalog" \ 
                           -pretty_plural "DotLRN Catalog" \
                           -table_name "dotlrn_catalog" \
                           -id_column "course_id"
      </pre><pre class="programlisting">
      # now set up the attributes that by default we need for the course
      
      content::type::attribute::new -content_type "dotlrn_catalog" \
                                    -attribute_name "course_key" \
                                    -datatype "string" \
                                    -pretty_name "Course Key" \
                                    -pretty_plural "Course Key" \
                                    -sort_order 1 \ 
                                    -column_spec "varchar(50)"
      content::type::attribute::new -content_type "dotlrn_catalog" \
                                    -attribute_name "course_name" \
                                    -datatype "string" \
                                    -pretty_name "Course Name" \
                                    -sort_order 2 \
                                    -column_spec "varchar(200)"
      content::type::attribute::new -content_type "dotlrn_catalog" \
                                    -attribute_name "course_info" \
                                    -datatype "text" \
                                    -pretty_name "Course Information" \
                                    -sort_order 3 \
                                    -column_spec "text"
      content::type::attribute::new -content_type "dotlrn_catalog" \
                                    -attribute_name "assessment_id" \
                                    -datatype "integer" \
                                    -pretty_name "Assessment ID" \
                                    -sort_order 4 \
                                    -column_spec "integer"
      </pre></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="index.html">Prev</a>�</td><td width="20%" align="center">�</td><td width="40%" align="right">�<a accesskey="n" href="ch01s02.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">dotlrn-Catalog Documentation�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�Content Folder</td></tr></table></div></body></html>