iLite’s Weblog

July 11, 2009

What’s the score

Filed under: Moodle, dashboard — ilite @ 4:56 pm

The Dashboard makes viewing a Users scores very easy. In the image below you can see that the iLite Dashboard course has two quizzes. When selecting this course from the list of courses the student has done, both scores are immediately displayed, both as a percentage and graphically. Had a score or more than 80% been achieved, the bar would have been in green. Just another way using the Dashboard makes tracking your users easier.

Two Quiz Results

June 29, 2009

Filed under: General — ilite @ 6:22 pm

Moodle Mobile

A while ago we were working on a mobile solution for Moodle. One of the problems we faced was getting the images to load. Well, that problem has been solved, and we also managed to add a Flash lite quiz to one of our course (Whales). So if you are keen to see what we have been up to take a look at http://www.ilite.co.za/mlearn/ (mary, password)

Basically it works as follows. In Moodle we created a category called Mobile. Any course in this category will be available when you log into the mobile site. We did not do anything to Moodle, but instead opted to write a little PHP to format the content for a small screen. We used a small work-around for the images and Flash file. Getting the results from Flash written back to Moodle is on our wish list. It’s easy enough to do, but getting our developer to sit down and do it is the problem. Maybe more stick and less carrot is what is needed.


Menu

Mobile Login screen


Menu

Menu


Whales - Overview screen

Whales - Overview screen


Whales  - content

Whales - content

Dashboard testing

Filed under: AMFPHP, General, Moodle, PHP, dashboard — ilite @ 6:01 pm

Where are looking for a few beta testers for our Moodle dashboard application. If there are any of you out there running Moodle 1.9 and would like to deploy and test the dashboard, drop us a mail.

UserID to view the demo dashboard:

Username: mary
Password: password

Requirements:

  1. Basic knowledge of PHP. You will have to update the config file, and copy some folders to the root of your server. The Dashboard uses the PHP files to access the Moodle DB and return data. This is only a READ, and nothing will be touched, modified or changed in your DB.
  2. A userID

What to do:

  1. Copy the PHP folder to your server
  2. Copy the Flash folder to your server
  3. Create an ID at iLite (or we can send you one)
  4. Update the config.php file with your Moodle details

How the Dashboard works.
The Dashboard uses the PHP files on your server to retrieve the data from your Moodle database. AMFPHP is used, which gives us a little more performance. Use the icons at the top to navigate between the different screens.

If you would like more information, or have some ideas about how we can improve it, please drop me a mail at kirsten@ilite.co.za

If your idea is good enought, we’ll use it and give you a copy of the Dashboard free.

All that we would like from you is a little feedback on how the Dashboard is preforming. Things you do like and things you don’t like. Information like the OS you are using, the number of users and courses you have and whether you are using SCORM Activities.

Kirsten

May 14, 2009

Dashboard Demo

Filed under: Flash, Flex, General, Moodle, PHP, dashboard, eLearning — ilite @ 5:15 am
Tags: , , , , , ,

homepageAfter a long process of development we are finally at a point where we can showcase a demo!

Log into http://www.ilite.co.za/eDash/#

User name:   james

Password: password

Remember guys, feedback is always welcome and appreciated.

- Kirsten

April 28, 2009

Stored Procedures

Filed under: AMFPHP, Flex, General, PHP — ilite @ 9:29 am
Tags: , , , , ,

I am working on a Flex application that needs to call a Stored Procedure using PHP. This proved to be a real challenge, and since I could not find a lot of information on how it was done, I thought that I would post it here. It might not be the best way of doing it, but it works for me.
The code is at the bottom so you can scroll down and skip the next bit out, I would.

For those of you that are still reading… wow! The library application required you to login into it using your domain username. This was passed to the application in the URL (http:\\mylibrary\index.php#username=MyGroup\Sean). When the application loads, it takes the username, passes it to a PHP page on the server that calls the MSSQL Stored Procedure and returns the users details.

The first step for me was to install the correct DLL’s and switch on the MSSQL extension. This proved to be quiet easy on WAMP, but a real pain on XAMPP. For some reason I could not get the extensions to register. My testing server runs WAMP, and the production server runs XAMPP. It was really annoying when it worked on WAMP but not XAMPP. Anyway, the problem was the DLL’s, so if you get a white screen, look there first.

Once that was working, I tested the PHP code, making sure that it returned values correctly. The PHP code is for AMFPHP.  It took a fair bit of testing to get it to work. In hind-site it might have been easier to do it in plain old vanilla PHP, but since the rest of the site is AMFPHP, I stuck to that route.

Part of the problem was the slash (\) in the username, and knowing how to escape it properly.

Once I got the data back from PHP, I moved on to the Flex side. Here the hardest part for me was how to read the URL and how to get the username from it. The code comes straight out of the help file, so for once Copy/Paste was an option.

I know it is not much, but I hope it helps.

Sean

Solution:

Make a few changes to your php.ini file.
allow_call_time_pass_reference = on
extension=php_mssql.dll (enable this extension)
extension=ntwdblib.dll

Place the php_mssql.dll file in the php extensions folder. Mine I placed in the php\ext folder.
Place the ntwdblib.dll file in the Windows\System32 folder

PHP Code to call the Stored Procedure – using AMFPHP:
//login.php
methodTable = array(
“byName” => array(
“description” => “User details by NAME”,
“access” => “remote”,
)
);
}

function byName ($username) {

$myServer = “myserver”;
$myUser = “myUser”;
$myPass = “myPassword”;
$myDB = “myDatabase”;

$s = @mssql_connect($myServer, $myUser, $myPass)
or die(”Couldn’t connect to SQL Server on $myServer”);

$d = @mssql_select_db($myDB, $s)
or die(”Couldn’t open database $myDB”);

//$username = $_GET['username'];

$partA = substr($username, 0,6);
$partB = substr($username, 6);
$username = $partA.”\\”.$partB;

$query = mssql_init(”GetEmployeeDetailsFromUsername”, $s);

mssql_bind($query , “@Username”, $username, SQLVARCHAR, FALSE, FALSE, 57);
mssql_bind($query, “@EmployeeNo”, &$Userno, SQLINT4, TRUE, FALSE);
mssql_bind($query, “@FirstName”, &$First, SQLVARCHAR, TRUE, FALSE, 50);
mssql_bind($query, “@LastName”, &$Last, SQLVARCHAR, TRUE, FALSE, 50);
mssql_bind($query, “@Email”, &$Email, SQLVARCHAR, TRUE, FALSE, 100);

mssql_bind($query, “RETVAL”, &$SQL_Count, SQLINT2);
$result = mssql_execute($query, FALSE);

echo $return = “”.$Userno.”".$First.”".$Last.”".$Email.”\n\r”;

return ($return);

}
}
?>

The code for the Flex file: (I have trimmed the code to only show the bit for the Stored Procedure)

<![CDATA[

import com.LoginUsername;

import mx.managers.BrowserManager;
import mx.managers.IBrowserManager;
import mx.utils.URLUtil;

private var bm:IBrowserManager;

[Bindable]
public var username:String;

private function init(e:Event):void
{
//Get Users
bm = BrowserManager.getInstance();
bm.init(”", “Library”);

var o:Object = URLUtil.stringToObject(bm.fragment, “#”);
username = o.username;

fullname.text = username;

dispatchEvent(new LoginUsername(username));

}

[Event(name="LoginUsername", name="flash.events.Event")]

//Login.mxml

[Event(name="LoginDetails", name="flash.events.Event")]

//LoginUsername.as
package com
{
import flash.events.Event;

public class LoginUsername extends Event
{
public var uname:String;

public static const LOGINUSERNAME:String = “LoginUsername”;

public function LoginUsername(username:String)
{
super(LOGINUSERNAME, true, true);
uname = username;
}

override public function clone():Event
{
return new LoginUsername(uname);
}

}
}

April 4, 2009

F1 Mobile is LIVE!!!

Yip, it’s official… the new F1 season has commenced. And what an exciting start to the season it has been. Surprise, surprise the Brawn is leading the pack…

This year we have not built the typical Flash Lite F1 application that you are used to seeing from us, but rather, we have built a PHP version which can be used by any device, anywhere and at anytime.

We realized that the F1 Application was a huge hit, and as such we needed to diversify and get it out there for more users on different platforms other than just Nokia handsets. Check out the site, let me know your feelings, comments and if you would like something added that will make the site better.

-Kirsten

www.f1mobile.co.za

January 16, 2009

It’s been a while…

Time fly’s…Can you believe that we are heading into the middle on the first month of 2009. I thought to myself that I have all the time in the world to get down and write a paragraph or two about what is happening, and then I look again and the month is almost finished. I wonder to myself, how did that happen and where did all the time go too.

We ended 2008 off with a bang and are very happy with the results that iLite has achieved during the year. Now our focus shifts towards the new year and how we can make more of an impact and push ourselves further. We have a couple of projects that need to be completed within the first three months of this year. One of them being a new version of the iLite Moodle Dashboard.

We have been playing with various options for the iLite Moodle Dashboard for a while now, and seeing which way we would like to take the application. We know that our existing clients are due for an upgrade, and are eagerly awaiting the new version. So we have a deadline, and hopefully the project plan runs smoothly and we are ready to roll version 2 out the door.

Wazzok is another project that needs to come to an end now. Sean has been building this site since the end of December and it has taken a lot of energy, endurance and perserverance on his part to roll this one out. We are hoping to have this one done by the end of January at the latest and hopefully pursuing more avenues that this project will deliver.

For me, the beginning of a new year entails the start of a busy season. Yes its tax time again, and I will need to get everything sorted out so that we can start off the new financial year on a positive note.

What makes this time of year even more interesting, is that we only have about 70 days until the start of the formula one season and a very important decision needs to be made regarding our progress forward with our signature Mobile Application. We will be putting together a mobile version of the F1 application, but this year we are taking a different approach.  We are going to let loose an application that is not a Flash Application, but rather a PHP based application/website that can be used by all Mobile users and not just the Symbian devices that we usually develop for.

This is an interesting time at iLite and I will be posting blogs on upcoming events as the transpire. So stay tuned and you will be amazed at all that we accomplish in 2009. I hope that you are as excited about the prospects that this year will bring as we at iLite are.

-Kirsten

December 9, 2008

The art of being lazy

Filed under: General, Moodle, dashboard — ilite @ 3:56 am

So, it’s been a while since my last post. Since falling off the radar, I set about rebuilding Dashboard, and adding in features I think  it needs. I think I am on version 3 now, and I know this is not the last version.

As a developer I will look at a problem, or a task we need to perform in Moodle, and ask, “How can I make that easier?” This then is the start of some long nights, which sometimes even result in a solution. I read somewhere that being lazy is a good thing, if you are a developer. Or should that be  an ‘application architect’. By definition a developer develops, but an architect plans first. Anyway, it’s because we are lazy, that we find solutions to problems.

Case in point. We needed to know all the results of a particular user in Moodle. Oddly, or not, Moodle does not have the ability to do this. So I fiddled about and come up with a solution which will show all the scores of all the courses for a user in a nice little graph.

All scores

All scores

On the left are the Users details. A grid below show the Courses and Groups for that User. On the right is the fruit of my labour. All scores less than 80% are indicated in red. If you hover your mouse over the chart (no not this image) a tooltip will show the actual percentage.

And so there you have it. It’s all about being lazy.

Sean

October 29, 2008

iLite Casino Ready For Release Soon

The iLite Casino is in its final stage of development: The Bug Testing phase.

We want this application to be entertaining and fun to play. The type of application that you would enjoy playing while riding on the tube or waiting at the dentist. We are very confident that this application will have a huge impact of the gaming market for mobile phones.

But enough about what we hope to achieve from this application, lets get down to the good stuff. For a limited time offer  we are giving away a free application. To qualify for the application, you need to mail me at kirsten@ilite.co.za and send me through the handsets IMEI number. The application was built for Nokia S60 handsets with the following specification:

  • Screen size 240 by 32
  • Flash Lite 2

Now let me tell you a bit about the application. The iLite Casino is like any other Casino game, the only difference is that it was designed for the mobile phone. We have Texas Hold’em, Poker, Slots and of course Blackjack. What’s even better is that with our application, we have a leader board where you can see where you are ranked against other players out there. If your stack of chips is the biggest then you get to sit in our coverted number one position, the best of the best.

Select an avatar and enter your alias.

This is the Casino Lobby. Here you choose which game you want to play, view the top 10 players and buy more chips if you have run out.

Black Jack

Texas Hold’em

Poker

Slots

Top Ten Players with the highest chip stack

- Kirsten

October 17, 2008

What’s the score

Filed under: General, Moodle, PHP, dashboard — ilite @ 3:53 am
Tags: , , ,

That’s what I asked myself. How many unique hits has our e-learning site had in the past month, or since the first of January this year. I know there is a block in Moodle that shows this information, but I wanted to see it on the Dashboard I am building.

So I set about fiddling with the date function in PHP, and wiped up the following to graphs

Hits per Month

Hits per Month

Hits per Year

Hits per Year

It’s not rocket science from a coding point, but visually it does help to immediately get an idea of how active the site is. I guess the next thing would be to click on a bar and view the users for that day, or the course. Or maybe view the most active courses……

Looks like I might be adding another graph to my Dashboard.

Next Page »

Blog at WordPress.com.