Welcome to the My Courses portlet home
The My Courses portlet is free software distributed under the terms and conditions of the GNU General Public License. A copy of this license is provided with the source code in a file named "COPYING" along with contact information and other portlet information contained in the "README" file. The terms of the GNU GPL can be found at http://www.gnu.org/licenses
Where can I get this portlet?
Source code can be checked out from the public Git repository at http://github.com/gnenc/My-Courses-Portlet. You may also download a bundled WAR file right on this page, below.
Tested on Liferay 6.0.6 GA.
Retrieves enrollments only from Moodle instances running on MySQL.
My Courses Portlet Files
Mockup for future feature - Add view for additional course information
Version 1.0.0 Beta 1 - September 15, 2011. Initial beta release for community review and testing
Version 1.0.0 Beta 2 - October 3, 2011. Github issues 4 and 5 fixed. Please view the change log for an important note!
Version 1.0.0 Beta 3 - December 9, 2011. Github issue 6 fixed.
Version 1.0.x - January/February 2012. Initial stable public release. Portlet will be submitted to Liferay Community plugins repository and the new Marketplace by this time
Version 2.0 - Spring/Summer 2012 - Major change in enrollment retrieval process. Use custom web services in Moodle and retrieve via REST or SOAP.
2. Add preferences in Admin portlet to allow customization of settings:
- Customize course enrollment refresh time, possibly allow scheduling
- Enable/Disable support for multiple entities (Some portal admins may only need support for one instance, so no reason to give users a "Change School" feature in these cases)
3. Add support for additional schools:
- Admin may specify whether additional schools should be "mnet" or "native" type authentication.
4. Add view for additional course information (See mockup at bottom left of page)
5. Support enrollment retrieval for Sakai and Blackboard.
6. Other TBD
There are 2 portlets as a part of the My Courses plugin: a user's portlet, "My Courses," and an admin portlet, "My Courses Admininistration."
The user's portlet, "My Courses," is where a user sees the courses they are enrolled in. The user's school name is shown in bold (shown above as "ESU 10") with a house icon next to it. The house icon is a link to the school's Moodle home page. The link also displays a user tooltip when hovered over.
The courses are then displayed with a hanging indent. Each course name links directly to the course page in Moodle. Unfortunately, because of the way Moodle handles logins and redirects, this portlet is not able to automatically pass the user through authentication before redirecting to the course page.
The last feature of this portlet is the "Change School" function. Users are associated with a particular school's Moodle instance based on their email domain. In some cases the user's email domain may not accurately reflect the school they actually go to. In this case, the user is free to choose another school. From that point forward they will be correctly associated with the chosen school.
The "My Courses Administration" portlet allows privileged administrators to manage the Moodle connections. The information required for a Moodle instance includes School Name, Moodle URL, Email Domain, Database Server URL, Database Server User, and Database Server Password. When a Moodle instance is added the portlet checks the ability to connect to the database and displays an error if it is unable to connect.
After an instance has been added it is displayed in the list at the bottom. From here, administrators have the ability to edit the connection or remove it.
How are enrollments retrieved?
Enrollments are retrieved directly from the Moodle database. When the portlet loads it completes the following workflow:
1. Determine if the user has previously set a "preferred" school through the "Change School" feature discussed above.
2. If the user has not specified a preferred school, we proceed to determine the school affiliation based on email domain.
3. Once we have a school affiliation, we check the local portlet database table for courses the user is enrolled in.
4. If courses are found in the local database, we check the timestamp on them.
5. If the time stamp is greater than one week old or there are no enrollments in the local database, we retrieve enrollments directly from the school's Moodle database.
Note: The reason we "cache" the courses in the Liferay database for a period of one week is to reduce the number of queries to the Moodle database. There is no reason to check the Moodle database each time the portlet loads since enrollments are not likely to change often after the first few weeks of the term. In the future, we plan to add the ability to change this one week refresh time.
Follow the code in MyCoursesPortlet.java to see how the above workflow is executed.