Course Schedule Portlet

Description

The purpose of the Course Schedule Portlet is to display a weekly schedule of courses for the authenticated visitor to your portal.
Its features include:

  • List view displays Course title, day of week, class time, and location using the Fluid pager
  • Larger Grid view of course schedule
  • Drop down menu allows visitor to choose from "visible" semesters, page dynamically updates via AJAX

The Course Schedule Portlet currently resides in the JASIG sandbox. The default configuration is setup with mock implementations of
the portlet's data access objects - no configuration changes are needed to try it out in your environment.

Screenshots

List View:

Grid View:

Source

The source can be obtained from the JASIG subversion repository:

 svn co https://source.jasig.org/sandbox/CourseSchedulePortlet/trunk CourseSchedulePortlet

Build/Deploy

The portlet is a Maven project. Once you've checked out the project, head into the directory and execute:

 mvn clean package

Once complete, change directories to your uPortal project and execute:

 ant deployPortletApp -DportletApp=/path/to/CourseSchedulePortlet/target/CourseSchedulePortlet.war

Data Model and Service APIs

The data model for this portlet resides in the org.jasig.portlet.courseschedule.model package. This model was developed for and is tightly coupled to the javascript used to render the interface.

There are 2 key Service APIs that the controllers interact with to retrieve the course data:

  • org.jasig.portlet.courseschedule.service.ICourseMeetingDao provides CourseMeetings for the authenticated user and their selected year/season
  • org.jasig.portlet.courseschedule.service.ISemesterDao provides the "current" Semester and a list of "visible" semesters the visitor may choose from

Customization

The Course Schedule Portlet is best extended by creating an "overlay" portlet project that depends on the CourseSchedulePortlet.

  1. Start by creating a new Maven portlet project.
  2. In the dependencies section of your pom.xml, add the CourseSchedulePortlet in the following fashion:
    <dependency>
      <groupId>org.jasig.portlet.courseschedule</groupId>
      <artifactId>CourseSchedulePortlet</artifactId>
      <version>1.0.0-M1</version>
      <classifier>classes</classifier>
      <type>jar</type>
    </dependency>
    <dependency>
      <groupId>org.jasig.portlet.courseschedule</groupId>
      <artifactId>CourseSchedulePortlet</artifactId>
      <type>war</type>
      <scope>runtime</scope>
      <version>1.0.0-M1</version>
    </dependency>
    
  3. In the build section of your pom.xml, add the maven-war-plugin:
    <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-war-plugin</artifactId>
      <configuration>
        <overlays>
          <overlay>
            <groupId>org.jasig.portlet.courseschedule</groupId>
            <artifactId>CourseSchedulePortlet</artifactId>
          </overlay>
        </overlays>
      </configuration>
    </plugin>
    

The code in your new project now will be laid over the top of the CourseSchedulePortlet when you run the maven package command.

It is likely that your university will model course data differently. The best way to integrate your curricular data is to take the following steps:

  1. Implement an ISemesterDao based on your Academic Calendar.
  2. Implement an ICourseMeetingDao that is backed with your SPIs for retrieving curricular data. This implementation will focus on translating a "Course Meeting" in your data model to a CourseSchedulePortlet's CourseMeeting object.