Introduction
GUnet’s open e-class is an e-learning platform written in PHP. It is used by most of the universities in Greece and my university as well.
The story
So, my Windows 10 app written for learning purposes needed to communicate with the e-class to show some information about the user. The user would log in, see information about the courses, in which he/she is enrolled, and logout. This process was implemented inside the app at that time.
I decided to write an external NuGet library and use it in my project. I wrote the first verion in 2018 and I updated the code with some improvements in the summer of 2019.
Wrapping app those changes in the summer of 2019 for the EclassMobileApi v1, I was working on improving the library’s fetch time and consistency for some extended data from eClass mobile api and the installations(demo installation here).
2nd version released on Aug 21, 2019
Available on nuget.org and GitHub Packages, the eClass API wrapper has simple yet powerful capabilities any developer can take advantage of in his/her application. The fact that anyone can use eClass for free as their e-learning platform, makes it even necessary to develop apps for their distros and with 0 effort.
In the current version, you can log in/log out, get Tools for each course and a data structure that saves the announcements, the directories(the download link and the link to the home page), the course description, and the generic description of each course, the user has registered to. These data are saved to a list of courses, each course as a name, an id, and a wrapper for the tools mentioned above.
An announcement
As you can see in the snippet below, the available data for an announcement is the title, the content(Description
property), the date published, and a link to the e-class page for the announcement.
class Announcement
+ Title: string
+ Link: Uri
+ Description: string
+ DatePublished: string
A simple session
//Init an Eclass Session for eclass.aueb.gr
EclassUser eclassUser = new EclassUser("aueb");
//Start a session with given usename and pass
await eclassUser.StartAsync("Username", "Password");
//Add courses
user.AddCourses();
//Add tools apart from announcements
await user.UserCourses.AddToolsAsync();
//Add Announcements
await user.AddAnnouncementsAsync();
//Print for all User Courses: Course Name, Course ID, Tools by Name
eclassUser.UserCourses.ForEach(course => {
Console.WriteLine(course.Name + " " + course.ID);
course.ToolViewModel.Tools.ForEach(tool=>Console.WriteLine(tool.Name));
});
//Logout
await eclassUser.DestroySessionAsync();
A JSON converter
A JSON converter for the main EclassUser
object is also available in the project.
Navigate to the unit tests, and see how easy is to store an EclassUser as a JSON object.
Targeting
Currently, the NuGet package is targeting .net core 2.0 and .NETStandard 1.4, but we can easily add other targets to the project.
Conclution
You can request features via GitHub Issues or even contribute to the project.
This was my effort to integrate eClass in my application back then and I wanted to spread the word about it, in case anyone needs to use it.