Category Archives: PHP

How to Build an E-Learning Website – 5-Point evaluation


Create your e-learning website, and use VdoCipher for secure video hosting

In this blogpost I discuss how you can build an E-learning website. I make the recommendations on the basis of the following five parameters:

  1. Technical Skills required to create the website
  2. Features and Customization available
  3. Cost of solution for building website
  4. Time to build solution
  5. Expected Number of students and scaling with increasing numbers

The four methods that you can use to create your E-learning website are:

  1. Coding using PHP/ ASP/Jave/ Node.JS
  2. Content Management Systems – WordPress, Joomla, Drupal, Moodle
  3. Website Builders – Weebly, Wix, SquareSpace
  4. E-Learning Website builders – Teachable, WebAnywhere

Create e-website website, and secure videos using VdoCipher

Here is a video explaining in full detail all the options. A text version of video is also included below.

Coding Using PHP/ ASP/ Node.JS

Technical Skills required

A website may be built from scratch using PHP, ASP and Node.Js. Naturally building these websites would either require an in-house website developer or should be outsourced to web designer. Which of the coding platforms – PHP, ASP or Node.JS you opt for would depend largely on the preferences and comfort levels of the developer in your team/ the web designer that you hire. PHP is one of the most popular scripting languages, while Node.JS is the newest website runtime environment which has seen massive adoption for websites. Alongside choosing the language, you would need to setup the server and database as well. For building a large website you can use a custom solution with a dedicated server on Amazon Web Services. For single-website usages (the more likely scenario) for E-learning websites, you can opt for shared web server hosting, using for example GoDaddy.

Features and Customization

Since your website is being built from the ground up, you have the widest possible options for customization for features that you wish to incorporate. For instance, as a security mechanism against sharing of login credentials, you may set an upper limit on overall time a student may be logged in to the system. Such a solution can be implemented while building the website code.

One thing that you should make clear is to ensure that the code is well documented. Good documentation ensures continuity between different developer teams.

Cost of Solution

Such a solution would require a dedicated development team to build. Support and maintenance are also additional issues that you would need to work on.

Time to Build Solution

Keep a time period of 2-3 months for such a website to build. To minimize site development time you should have developed a good understanding of the design and structure of your website, and communicated that to the developer. This would ensure minimal confusion in the website development process

Scale of website and Expected Number

1,000+ expected annual users – You would be able to incorporate features specifically on the basis of user requirements. It is important to make sure that appropriate security features are installed in the website framework.

Content Management Systems – WordPress, Joomla, Drupal, Moodle

Technical Skills required

Such an option mainly requires familiarity with the CMS interface. These skills can be learnt quite easily by beginners. A number of our clients – independent artists and individual teachers – have easily setup their WordPress and Moodle websites for hosting their E-learning courses. There would be a one-time effort in setting up the server though.

Features and Customization

Moodle is an LMS, and is therefore designed as an E-learning platform. WordPress on the other hand is a Content Management System, to which you can add LMS functionality through WordPress plugins.

Cost of Solution

Costs of building websites on Content Management Systems include cost of plugins for adding functionalities. WordPress and Joomla offer plugins such as Sensei, Guru and eMember, which simplify the process of course-creation considerably. Many of the useful plugins available are paid, while a lot of them are free as well (generally free plugins offer specific solutions, while paid plugins bundle a whole lot of useful features together). Cost-wise this is the cheapest solution, as the CMS itself is free – the only costs are the plugins and the server hosting.

Sensei plugin for eLearning - use VdoCipher for secure video hosting

Time to Build Solution

Expect a time to launch between 15 to 30 days for a fully functional CMS hosted site.

Scale of website and Expected Number

Such a solution would work pretty good upto a number of 10,000 students. There is no lower limit to the number of students, as costs are low.

Website Builders – Weebly, Wix, SquareSpace

Technical Skills required

In this solution the website hosting company uses a basic website template that they use.

Features and Customization

Such a website would follow a basic template, and there are not many options to customize additional features.

Cost of Solution

The cost of building such a website include purchasing the website template and server hosting.

Time to Build Solution

Fast – You need very little time to deploy such a video hosting solution. Server setup and configuration of the website would take time between 7-10 days.

Scale of website and Expected Number

Implementing such a website is best for the case of fast-deployment of your e-learning platform. Because time of launch and costs are priority in this, such a solution would be appropriate for upto 100 users paying for the course. Beyond this number this solution fails to add the customizations you need to cater to the growing list of users.

E-Learning Website builders – Teachable, WebAnywhere

Technical Skills required

There is no coding required. Most features can be implemented using drag-and-drop

Features and Customisation

Teachable and WebAnywhere offer ready-to-use E-Learning themes, Student management options, Media and text addition, Membership Access, Server hosting and Database management.

The features that these sites offer are sufficient for most e-learning website creators. These sites however are not very customizable in terms of additional security features or tweaks in User Interface. UI additions such as adding comment sections to pages, and security restrictions such as restricting login time on page, are not available when you opt for this solution.

Cost of Solution

Costs are dependent on the features you integrate, and the number of students enrolled. Because the websites are designed specifically for e-learning such a solution is somewhat more expensive than the case of ready-to-make websites.

Time to Build Solution

7-10 days

Scale of website and Expected Number

Such a website solution would be appropriate for upto 1000 annual users. This is the approximate number of students you can manage without the need to alter your User Interface and backend. Beyond this number you should explore CMS hosting or creating your own website.

Suggestions

When you set about creating an e-learning website I recommend that you check other websites in similar areas. You can use the tool BuiltWith to analyze the tech stack on which any website is made. If you find that 8 out of 10 of your competitors use a particular tech stack, then implementing that stack would be the most reliable way to build an e-learning site.

Streaming E-Learning Videos And Protection From Piracy

The reasons I am specifically writing a different section on video streaming for e-Learning is because:

  1. Video courses are typically the lifeline of any e-Learning portal and second
  2. Video streaming and safeguarding the video content from piracy is a major technical challenge, which the 4 options discussed do not solve inherently themselves. Most of E-Learning sites use some premium video streaming provider to cater to their streaming needs.

Streaming bufferless for HD worldwide and ensuring smooth delivery to regions in Africa and India with slow connections is a major problem. YouTube is quite good in this aspect, but lacks business friendly customization. Vimeo has a B2B offering that is quite popular and is okay in terms of streaming experience. YouTube and Vimeo use standard streaming protocols to deliver video content, and thus a lot of free plugins and downloaders are able to grab and download the videos. For this reason, a more custom video player, providing higher security and flexibility to manage video related features, is needed for premium videos. Here is the link to implement and compare secure technologies used in video hosting for education. Many of the top e-Learning companies either go for a combination of the above solutions or build proprietary systems of their own (for example Udemy and BYJU’s).

Aspect of Comparison Code from Raw: PHP, ASP, NodeJS, JAVA Moodle, WordPress, Joomla, Drupal + LMS themes + Plugins Ready to launch E-learning site – Teachable, Thinkfic etc Ready to Launch Generic Website – Weebly, Wix
Coding Skills Required Every functionality is full coded, require full stack development team One Time server setup required Nil Nil
Features & Customization All customizations are possible, but takes time and cost Most of Elearning functionalities available, Decent customizable. Have to give up on 10-20% of your custom needs Common Elearning functionalities available, except some themes, major customizations not possible. Elearning feature set integration not so varied – suitable for start simple cases
Cost One time considerable cost, recommended for long term control and stability Quite affordable, themes plugins have one time costs Charges monthly basis, not much burden in form of upfront costs Quite affordable , one time costs
Time 2-3 months to go live, each new feature takes time 1 month typically to go live, additional features doable through plugins , not much time taken Go live in a day, not much feature addition can be done, so no time addition Go live in a day, not much feature addition can be done, so no time addition
Scale Effects Good for large user base companies Good if number of students not going more then 10,000 Good till scale of 1000 Good for starting and testing up , upto 500 paid users
Conclusion Choice of technology depends on comfort of your dev team, ideal for large custom required sites Optimizes cost , features and control of all the options- Most popular option I have seen Good for individual teachers. Have to give up on customizations. Affordable Good for experimentation, Better to choose amongst other 3 for full elearning portal

I will be happy to have feedback and questions in the comments section below or on my LinkedIn profile. You can also share your experience with above technologies and any interesting insights.

A version of this blog was first published on E-learningIndustry.com

PHP sample video upload from browser to VdoCipher

[This article is based on API v2 as document here.]

The Upload API workflow and overview can be found here.

Please find below a sample code for enabling video upload from your PHP website’s users. Note that this is sample code and you will need to configure it according to the controller-view structure in your application. It is not a recommended to put Controller logic and HTML output in a single file.

When setting up your front-end, you will like to enable better interface with AJAX upload such that your user’s can have a seamless experience. For this it is recommended to use one of the available libraries(angularjs, jquery or standalone, etc.) . Note that all these can be modified to be used in this set up. You can also see a sample implementation of the angular’s ng-file-upload library in your vdocipher dashboard itself.

Video upload from website or server to vdocipher API

[The following article on video upload is based on vdocipher API v2 which is the latest version]

We use Amazon aws storage to store original user videos securely in AWS S3. With an intent to automate their online business, many of our customers wish to allow their users to upload videos directly from their website. To enable this, we have a API call that returns an authenticated policy document which is used video upload into a S3 bucket allotted to your account.

Step 1 (Obtain authorized access):

Create authorized video upload request with your API secret key.

Request
Endpoint: https://api.vdocipher.com/v2/uploadPolicy
Content type: application/x-www-form-urlencoded
Method: POST
PostData: clientSecretKey=API_SECRET_KEY&title=newTitle
Response
Content-Type: application/json

{
 policy:
 key:
 x-amz-signature: 
 x-amz-algorithm: ,
 x-amz-date:
 x-amz-credential: 
 policy:
 upload_link_secure:
 video_id:
}

The API call has returned a set of parameters that must go with the video upload call to the AWS S3 endpoint. We shall refer to this JSON object returned above as uploadData.

The policy document is valid only for the next 1 hour. It is recommended to make the video upload immediately after creating the authorized access. There is also a soft restriction on the number of upload calls every hour, so it is advised to create it only after the user has chosen to upload the video. It should not be made every time somebody loads their dashboard or mobile app.

This call must be made from a secure environment such as your server. This should not be called from a mobile device or the browser to protect your API key. The uploadData should then be passed to user’s device (mobile or browser) to do the file upload.

Step 2 (Video upload via S3 API):

Upload the file to amazon s3 directly. This upload can be made using server code or using an HTML5 form. You can use any third party upload library to make the upload script. The famous ones already have tutorials on setting it up with S3 upload.

application Request
Endpoint: https://{bucket}.s3.amazonaws.com/
Method: POST
PostData:
 'x-amz-credential': uploadData['x-amz-credential'],
 'x-amz-algorithm': uploadData['x-amz-algorithm'],
 'x-amz-date' : uploadData['x-amz-date'],
 'x-amz-signature': uploadData['x-amz-signature'],
 key : uploadData['key'],
 policy : uploadData['policy'],
 success_action_status : 201,
 success_action_redirect : 'http://example.com'
 file: <file content>
  • upload_link_secure string – The vdocipher storage location on S3 that has been allocated for this file
  • x-amz-credential string – These must be accompanied in the upload request.
  • x-amz-algorithm string
  • x-amz-date string
  • x-amz-signature string – A signature value that authorizes the form and proves that only vdocipher could have created it.
  • key string – A name for the S3 object that will store the uploaded file’s data
  • policy string – authorization string
  • success_action_status integer – The status code returned upon successful upload if success_action_redirect is not specified.
  • success_action_redirect string(optional) – Specifies if to redirect to a URL after a successful post instead of issuing a 201.

If everything goes right, the response from the above request should be:

Response
<?xml version="1.0" encoding="UTF-8"?>
<PostResponse>
  <Location>https://vdo-ap-southeast.s3.amazonaws.com/orig%2F5555555555555</Location>
  <Bucket>vdo-ap-southeast</Bucket><Key>orig/5555555555555</Key>
  <ETag>xxxxxxxxxxxxxxxxxx</ETag>
</PostResponse>

You can ignore the content of this response. Now, the video status should be shown as Queued or Processing in the API or on your dashboard. The video will get processed after some time. You can poll the API or configure the web hooks(coming soon) to know the time when video is ready. You should only load the video player if the video is ready.

 

Some sample code for the above operations:

PHP implementation of VdoCipher API

Here is a classic PHP code to use VdoCipher API along with dynamic watermarking. You need to simply put in the right client_secret_key and the correct video_id ( the phrase in caps in both files )

 

The code should work out of the box after extracting inside PHP running server and replacing secret_key and video_id.

The structure of annotation JSON is described in the link : Add text to videos with watermark