[Building Sakai] Code for Create Course Site - Academic term

Matthew Jones jonespm at umich.edu
Fri Jul 29 15:46:30 PDT 2011


I don't think there *is* an API for setting the term, these are just
properties on the site.

In site-manage/../SiteAction.java it adds PROP_SITE_TERM (term) and
PROP_SITE_TERM_EID (term_eid) during course creation.
. . .
      // for course sites
      String siteType = (String) state.getAttribute(STATE_SITE_TYPE);
      if (siteType != null && siteType.equalsIgnoreCase((String)
state.getAttribute(STATE_COURSE_SITE_TYPE))) {
        AcademicSession term = null;
        if (state.getAttribute(STATE_TERM_SELECTED) != null) {
          term = (AcademicSession) state
              .getAttribute(STATE_TERM_SELECTED);
          rp.addProperty(Site.PROP_SITE_TERM, term.getTitle());
          rp.addProperty(Site.PROP_SITE_TERM_EID, term.getEid());
        }

There are a number of random properties that are just added that don't have
any API in front of them. :/ This is an example of what a course site
created through site-manage looks like:

[image: term properties.png]

On Fri, Jul 29, 2011 at 7:42 AM, Paul Mungai <paulwando at gmail.com> wrote:

> Kindly advise how I also set the academic term for the site programatically
> (I have the records already, and they appear in worksite setup as expected).
>
>
> I can create a site and add the other parameters except the academic term.
>
> --
> Regards,
> Paul Mungai
>
> "Ability is what youre capable of doing. Motivation determines what you do.
> Attitude determines how well you do it" By Lou Holtz, Notre Dame Football
> Coach
>
> _______________________________________________
> sakai-dev mailing list
> sakai-dev at collab.sakaiproject.org
> http://collab.sakaiproject.org/mailman/listinfo/sakai-dev
>
> TO UNSUBSCRIBE: send email to
> sakai-dev-unsubscribe at collab.sakaiproject.org with a subject of
> "unsubscribe"
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20110729/b231b992/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/png
Size: 29892 bytes
Desc: not available
Url : http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20110729/b231b992/attachment.png 


More information about the sakai-dev mailing list