Hi, Kirthi.
Just a warning: selling online content to children is illegal, at least in the part of the world (EU) I live in. You can of course sell on-line courses to adults. Also, seeing your question makes me wonder if you are already well enough acquinted with Xerte to start selling content with it, seems you're just starting.
Now, Xerte was build on the philosophy of giving good stuff away and collectively work on keeping it good stuff (the Open Source movement). So, by nature commercial reasoning is not really part of the genetic structure of Xerte. And many here are teachers and teacher tend to teach, payed or not.
That being said, yes, it can be done. There are a number of scenario's I can think of:
- can sell your LO as hardware, e.g. put the LO on some media (USB stick, DVD, CD), put some T&C / contract out that ensures that the user is not allowed to copy the contents (copyright) and you're done. The user can then put the media in his computer and click on the index to start the course. This even works in situations where there is no live Internet connection available. Be aware that if there is no live Internet connection, you need to provide all the stuff that you may have included from the Internet locally on that medium
- you encrypt all of your LO and put that out there and only provide the decryption key to legit buyers. You should have a key for each buyer. A simple way of doing this is to provide a zip (e.g. WinZip for Window uses AES256 to password protect the contents of an archive)
- you publish your LO on-line and put some type of authentication layer around it
I believe you want to put your content online, so I will elaborate a bit on that.
- the most common method is to embed your LO in a framework that requires authentication. I haven't worked with it myself, but Xerte integrates well with Moodle for example (from what I read at least) and Moodle has an authentication layer. So, students log in into Moodle and then have access to your LO(s). You give out usernames and passwords to those that pay for the privilege. Be aware that these usernames and passwords can be shared, so you probably need to do some additional checking, e.g. whitelisting of IP address(es). Also ensure that Xerte is configured such that it only will accept requests stemming from the website you have embedded your LO in. There is an option in Xerte to do that, which you can see if you click the orange (I) button for your project. A quote from there:
Using this setting restricts access to your content. Your content will only be visible to people following links to your content from the sites you provide. Enter the site URLs below, separating individual URLs with commas.
- you can also set up something yourself, e.g. using a simple webpage that has just an iframe in it (the code to put in there is actually show in the center section of the project details view) and use "Basic Auth" for authentication. BA is a feature of at least the Apache webserver. It requires using a password file which you can set up and maintain over the CLI (in case of Apache: the password file is called .htpasswd by default and the command to maintain it is "htpasswd").
- If you are savvy in some web programming language (e.g. PHP) you can of course set up something similar to the previous option yourself and use anything you can imagine. e.g. the standard PHP session mechanisms, or something you craft yourself.
- Xerte offers ways of including your own Javascript code in the LO. That can be (mis)used for all kinds of stuff, e.g. you can have it check for a cookie each time a pagetype loads and if that's missing or does not contain the proper content, you simply terminate the LO. You could also have the Javascript connect to your website to verify that the user really (still) has access rights, e.g. AJAX. Xerte has jquery built in, so it's quite easy, e.g.
see the W3schools site for an example
.
I hope this helps.