Creating Percentage Bar question type

At Learnosity, we have some pretty creative clients. The need for them to be able to create their own question types is increasing. We want to give third party developers the ability to create their own custom question while utilising the power of the Learnosity Platform for Authoring, Assessment and Reporting. This is exactly what the recently released Custom question is for. With the Custom question, developers have full control over the look and feel of the question, the user interaction and the scoring of the responses.

The Custom question is designed to be very simple to extend. To test drive it, I was asked to follow our knowledge base article creating a percentage bar question, where the student is able to drag the slider on the bar to change the input value.

16904417729603.vkPJXcUSJaLfjeqKtBgY_height640

View Demo

A Custom question is defined by passing a JSON object to the Questions API, just like any other other question type. I figured I could use HTML5′s range input to do this, and style its Shadow DOM using CSS to get the user interface I wanted. In the JSON object, I passed in my custom attributes:

  • js – URL to the question’s JavaScript file
  • css – URL to the question’s CSS file
  • prepend_unit – unit that gets prepended to the value
  • append_unit – unit that gets appended to the value
  • step – the value between incremental points along the slider range
  • min_value – minimum value
  • max_value – maximum value
  • min_percentage – minimum percentage
  • max_percentage – maximum percentage
  • init_value – value of the question when it’s first loaded
  • color – color of the bar
  • valid_response – valid response
  • score – the score students get if the response is valid
{
    "response_id": "custom-range-slider-response-1",
    "type": "custom",
    "js": "//docs.learnosity.com/demos/products/questionsapi/questiontypes/custom_percentagebar.js",
    "css": "//docs.learnosity.com/demos/products/questionsapi/questiontypes/custom_percentagebar.css",
    "prepend_unit": "$",
    "append_unit": "",
    "min_value": "0",
    "max_value": "150",
    "step": "10",
    "min_percentage": 0,
    "max_percentage": 100,
    "init_value": "20",
    "bar_color": "#80D3B4",
    "valid_response": "120",
    "score": 1,
    "stimulus": "If Luke has $150 and he spends $30 on beer, how much money has he got left?" 
}

I passed in the stimulus attribute as well, which is available in all question types.

After that, I created a JavaScript module with the init function of the question, where I specified the markup of the question to be rendered. Once this is completed, I used the ready event to notify Questions API that my question was ready:

var PercentageBar = function (options) {
    var template = '//My custom question HTML';

    ...

    this.$el = options.$el;
    this.$el.html(template);

    ....

    options.events.trigger('ready');
}

In order for responses to be saved, I needed to let Questions API know when the response to the question had changed. To do this, I created a listener for the input event. For it to work in IE10, I needed a listener for the change event as well. When the events were triggered, I could call the changed event and pass in the current input value:

$bar.on('input change', function() {
    options.events.trigger('changed', $response.val());
});

Next I had to implement the scoring function. I simply needed to define a scorer function and pass in the question object and response data:

function PercentageBarScorer(question, response) {
    this.question = question;
    this.response = response;
}

Then following the structure of the scoring interface as specified in the knowledge base article, I defined methods to determine if the response was correct, what was the score for the current response and the maximum score of the question.

function PercentageBarScorer(question, response) {
    this.question = question;
    this.response = response;
}

PercentageBarScorer.prototype.isValid = function() {
    return this.response === this.question.valid_response;
};

PercentageBarScorer.prototype.score = function() {
    return this.isValid() ? this.maxScore() : 0;
};

PercentageBarScorer.prototype.maxScore = function () {
    return this.question.score || 1;
};

When the validation button was clicked, it triggered Questions API’s public method validateQuestions. In my JavaScript module, I listened for the validate event which would trigger the validate function I created:

var scorer = new PercentageBarScorer(options.question, $response.val());
function validate() {
    if (self.scorer.updateResponse($bar.val()).isValid()) {
        $percentageBarWrapper.addClass('percentage-bar-valid');
    } else {
        $percentageBarWrapper.addClass('percentage-bar-invalid');
    }
}

options.events.on('validate', function() {
    validate();
});

The last step in creating the JavaScript module was to return the its object containing Question and Scorer properties:

return {
    Question: PercentageBar,
    Scorer:   PercentageBarScorer
};

Embedding the question on the page was just like any of our existing core question types. I followed the guide on Questions API documentation and voilà! We have a new percentage bar custom question! Since I was utilising HTML5 range input and Shadow DOM, this will only work in latest Chrome, Firefox, Safari and IE10+.

All this from start to finish took less than 2 days to implement and we think it will open up a lot of doors for developers out there to do some pretty cool things with our APIs.

View Demo

Learnosity VP, Jim Ruddy, appointed to SIIA Education Division Board of Directors

siia_education

New York,  November 19, 2014 Learnosity, an educational technology company, providing innovative assessment solutions to educational publishers worldwide, today announced that Vice President of Business Development, Jim Ruddy has been appointed to the Board of Directors of the Software & Information Industry Association’s (SIIA) Education Division.

Made up of 21 executives from SIIA member companies that provide educational software applications, digital content, online learning services and related technologies across the K-20 sector, the Board brings together selected executives to represent a broad spectrum of interests within the educational technology industry. The new Board members will help develop initiatives and determine the projects, activities, and events the Education Division will undertake in 2015 and beyond.

I am delighted to be joining the Education Division’s Board of Directors” says Jim “and look forward to working closely with my fellow board members to bring innovation and industry best practices to the educational technology industry.

A results-driven executive, Jim Ruddy has over 15 years experience in the education industry and will bring a wealth of experience and insight to the Board. Prior to joining Learnosity he held senior executive roles at both Houghton Mifflin Harcourt and Riverdeep; including SVP of Business Development, Chief Revenue Officer and SVP of School Sales. He joins the Board alongside leaders from Intel, Scholastic, Follett Schools, Adobe, Academic Business Advisors, Promethean, Pearson, McGraw Hill Education, Renaissance Learning, HMH and Knovation.

Vice President for the SIIA Education Division, Karen Billings says “We are very pleased to welcome Jim Ruddy to our Board. With his extensive business and leadership experience he will add a valuable perspective to the Board. We appreciate his willingness to serve and look forward to benefiting from his insight and counsel.

About Learnosity  Learnosity is a rapidly expanding educational technology company. The company offers a set of tools and services that allow clients to incorporate powerful interactive assessment into their digital products quickly and easily. Run by a talented group of people who are passionate about transforming learning and assessment, Learnosity is committed to designing market-leading software to allow developers to create exceptional assessment products, make teachers’ lives easier, and above all, instill a love of learning in students. The Company is seeing an annual doubling of revenues, and works with some of the leading names in the Education industry. The Learnosity Toolkit was recently named the Best K-12 Enterprise Solution by the SIIA, and National Champion for Innovation in the European Business Awards. Learnosity has offices in NYC, Dublin and Sydney. For more information contact Learnosity on +353 (0) 1 4498789, info@learnosity.com or visit http://www.learnosity.com.

About SIIA  The Software & Information Industry Association (SIIA) is the principal trade association for the software and digital content industry. SIIA provides global services in government relations, business development, corporate education, and intellectual property protection to more than 800 leading software and information companies. The SIIA Education Division serves and represents more than 200 member companies that provide software, digital content, and other technologies that address educational needs. The Division shapes and supports the industry by providing leadership, advocacy, business development opportunities, and critical market information. For more information, visit http://www.siia.net/education.

 

Bar Chart – Read only bars

We have added the ability to make bars in our Simple Chart Bar Question Type ‘read only’ for students.

The addition of a interactive toggle makes choosing this option very easy for authors.

Untitled drawing (9)

 

 

 

 

 

 

 

Your own parser possible with PEG.js

There are many parser generators out there, but the vast majority of them only run in shells on the server side and are usually written in C. What if you need a solution that not only understands JavaScript syntax but can also generate ready to use JavaScript code in the form of a function?

Example use case

But why did I need a parser? A few weeks ago I was looking for the possibility of parsing LaTeX math expressions. My black box model required a valid LaTeX string as an input, and a JavaScript function as an output, e.g.

LaTeX:

x+4

Returns:

function (x) {
    return x + 4;
}

Looking for a solution

After spending some time researching various parser generators out there, I concluded that PEG.js was one of the most appropriate solutions to this problem. There are two other able to output results in JavaScript, but Waxeye works only from command line, and OMetaJS while very powerful, it doesn’t have proper documentation.

PEG.js describes itself as “a simple parser generator for JavaScript that produces fast parsers with excellent error reporting.” As I found out, it is indeed a simple parser generator with the biggest advantage being a very low entry barrier (If you navigate to http://pegjs.majda.cz/online, you’ll see an example grammar that recognises basic arithmetic expressions like addition and multiplication).

The project is in its early stages, and still under development, so, it may take some time to see v1.0 next to the name. Though, I must admit, even the early release is cool.

Simple calculator extended

Based on the earlier mentioned example provided on their website I was playing around and quickly found a way to offer much more than it was on the example page (check this Gist). It simply takes a LaTeX expression and evaluates it returning a value, e.g.

LaTeX:

\frac{1}{2}*\abs{-10}

Returns:

5

But it wasn’t exactly something I wanted, as you see in the Example Use Case section. To plot a function on a graph I needed a JavaScript function which I could pass a variable to (most commonly x).

Real parser

The parser I was writing had to be able to decompose passed LaTeX, i.e. for each portion of the LaTeX, generate a function that accepts any defined parameter, evaluate the LaTeX, and return the result.. Here’s a diagram of a concept I came up with:

LaTeX:

\frac{x}{2}*\abs{-10}

A given LaTeX expression could be divided into blocks as follows:

Screen Shot 2014-10-28 at 4.03.17 pm

Returns:

var func = function (x) {
    return (function (x) { // multiply
        return (function (x) { // fraction
            return (function (x) { // x
                return x;
            })(x) / (function (x) { // 2
                return 2;
            })(x);
        })(x) * (function (x) { // absolute
            return Math.abs((function (x) { // -10
                return -10;
            })(x));
        })(x);
    })(x);
};

func(5); // outputs 25
func(4); // outputs 20
func(1); // outputs 5
func(0); // outputs 0

Now returned function can be plotted on a graph, using e.g. JSXGraph library:

plotted

OK – it all looks pretty, but now the hard part. It’s like I invited you to watch a game, but instead of watching it, you’re constantly staring at a website with live scores being refreshed every few minutes. I promised a parser that can convert LaTeX expression to executable JavaScript function but all you see are hardcoded snippets of code, and nothing automated. Well – you just have to be patient.

Let’s be even more ambitious

One of our unwritten rules of thumb is to make our solutions as sweet as possible, so, I made few tweaks to this task to sweeten the pot a bit.

There can be many occasions when you want to plot a set of variations of the same functions, e.g. slightly changing the position of a graph. To achieve this, your function needs to accept more parameters than only x. Let me give you an example:

LaTeX:

a*x+b

Returns:

var func = function (obj) { … };
func({x:5,a:1,b:2}); // outputs 7
func({x:6,a:3,b:4}); // outputs 22

You can see that our parameterized LaTeX defines more than one variable – now we have a, b and x. It requires our parser to be able to recognise all variables, and let us pass their values on execution to a generated function. I don’t want to bore you with going through the solution step by step, as this article is not a tutorial (nevertheless, the parser is available here).

Summary

One of the design decisions in PEG.js is avoidance of recursion. It’s up to you to decide whether this decision will prevent you from using this tool or not. There are problems which are much easier to solve using recursion, and can really mess up your parser grammar if you decide to take a path around it. In case of PEG.js, a path around recursion is mandatory.

I think PEG.js is a great tool, and worthy of attention. I hope it grows and that someday we will see v1.0.

How it all Started: Gavin Cooney, CEO Learnosity

Screen Shot 2014-10-28 at 17.21.16
The below interview with Gavin originally featured in the Q3 2014 issue of the In Business magazine.

IB: How did you fund your business initially?

GC: While the dream was always to be a product company, we were fortunate to have a very close relationship with the Board of Studies in New South Wales. They’re the government body responsible for the State exams in New South Wales. Consulting revenue from bespoke e-learning projects helped to support us in the earlier years while we got up and running.

IB: What’s the best advice you were given?

GC:You really need to listen to your customers. As an entrepreneur it can become too easy to fall in to the trap of going in all guns blazing, full of innovative ideas telling customers that you have exactly what they need when really it was by listening to exactly what they wanted (and delivering) that we managed to make the break.

IB: What was the most important lesson you learned starting out?

GC:After doing both a business degree and a Masters in business I realised very quickly that I knew absolutely nothing about running my own business. It was definitely a baptism of fire. Turned out there were lots of things to learn about funding and the traditional ways of growing a business. We eventually discovered that going the VC route wasn’t necessary and we ended up going it alone.

IB: Your biggest make or break moment?

GC:The development of an embeddable “record button” for one of our clients in 2011. All they wanted us to do was to develop one record button which could be placed within their existing e-books. Initially we had pitched a full solution, convinced that was what they needed. But they didn’t want that. They wanted a single button. This was a pivotal moment for us, we found our niche and this paved the way for our strategic shift into SaaS where we give our clients the ability to build education’s next big thing using our tools and services.

IB: Would you change anything in hindsight?

GC:Its very easy to look back in hindsight and see how things could have been easier. We made a lot of mistakes, slept on lots of sofas went to lots of conferences we didn’t really need to be at. Really, lots of trial and error. Course it would be great if we could take our current business plan and implement it back in 2008 but it wasn’t possible – in fact the market might not have even been ready back then. But if I had to change one thing, it would be the amount of time we spent on doing the rounds with VCs. Concentrate on the product, make it awesome and they’ll come knocking – even if you no longer need them!

Amazon Web Services Recognizes Learnosity with Amazon Partner Network Membership

aws

New York, 27th October: Learnosity, a Software as a Service (SaaS) educational technology company, today announced its membership with Amazon Web Services’ (AWS) Partner Network (APN) as a Standard Technology Partner. This award is a testament to Learnosity’s commitment to provide the most flexible, scalable and reliable cloud-based, educational solutions.

“We are delighted to join the Amazon Partner Network” says Learnosity CTO Mark Lynch. “The K-12 educational sector has many technology challenges including scale, cost sensitivity and security. AWS enables us to scale our systems dynamically by scaling up during demand spikes and down during demand lulls, in a way that is cost efficient and effective.  By leveraging multiple geographic locations we can get the best performance for our users, and the advanced security features available on AWS such as encrypted volumes and rotating authentication keys help to keep student data safe and secure. ”

Learnosity offers a set of tools and services that allow clients – educational publishers and testing organizations – to quickly and easily add Common Core-aligned, interactive assessments to their digital products. Complementary authoring and reporting tools are also available.

About Learnosity

Learnosity is a rapidly expanding educational technology company. The company offers a set of tools and services that allow clients to incorporate powerful interactive assessment into their digital products quickly and easily. Run by a talented group of people who are passionate about transforming learning and assessment, Learnosity is committed to designing market-leading software to allow developers to create exceptional assessment products, make teachers’ lives easier, and above all, instill a love of learning in students. The Company is seeing an annual doubling of revenues, and works with some of the leading names in the Education industry.  The Learnosity Toolkit was recently named the Best K-12 Enterprise Solution by the SIIA, and National Champion for Innovation in the European Business Awards.  Learnosity has offices in NYC, Dublin and Sydney. For more information contact Learnosity on +353 (0) 1 4498789, info@learnosity.com or visit www.learnosity.com.

About AWS APN

APN is a global program that offer solutions providers technical information as well as sales and marketing support to accelerate their business on AWS. Technology Partners provide software solutions that are either hosted on, or integrated with, the AWS platform. Technology Partners include Independent Software Vendors (ISVs), SaaS, PaaS, developer tools, management and security vendors.

Learnosity wins SIIA CODiE

What Winning a CODiE Award means to Learnosity

While we always knew that SIIA and the CODiE Awards were influential, we did not anticipate the incredible impact that winning a CODiE Award has had for Learnosity.

Learnosity was thrilled to be nominated for a CODiE.  The evening event itself was a fantastic opportunity for us to meet C-level execs from some of the biggest companies in the education space, as well as from some smaller companies which are creating some really exciting EdTech products.

In our award category (Best K-12 Enterprise Solution) we were up against some fantastic products from both big and small companies.  Having our product named “the best” by independent judges was a great honor. For Learnosity, a relatively small company, to win is a true validation that this award is not based on past reputations, but rather on the strength of the product and the value that it brings to the industry.

What has really been impressive is the impact the award has made.  Since being named “the best”, the award has helped bring in new business, reopened previously shut doors and, of course, provided affirmation to our existing clients. Winning the CODiE has given us exposure on a national level and has delivered tangible sales and marketing benefits; we have definitely seen an increase in inbound leads since winning. The CODiE Awards have great brand recognition and immediately let people know that we are recognized as a key player in our field and that we are successfully providing innovative solutions for the difficult Common Core assessment challenges faced by our clients.

And we certainly haven’t been shy about telling the world about our CODiE Award; not only does the award itself take pride of place in our Dublin office, the CODiE Winner logo is front and center on our website and features heavily in our new marketing materials.  The visibility of our CODiE Award likely played a key role in Learnosity being named a “National Champion for Ireland”, by the European Business Awards.

Internally too, the CODiE Award has been a great recognition of the hard work and achievements of our insanely talented development team in Australia. The guys down under are that step removed from the market and don’t always hear the positive feedback from our clients. The award has really helped to motivate them and proves that what they are working on is truly helping shape education around the world. Making a difference is why most of us are in this business.  As “the best”, it’s clear that our work and vision are making a difference.

We continue to be grateful to SIIA and everyone who voted for The Learnosity Toolkit. We are constantly working to improve our product.  For us, being “the best” isn’t about a one-time award – it’s a constant commitment to deliver value and impact for our customers. We are looking forward to not only defending our title next year, but entering a couple more categories!

About Learnosity

Headquartered in Dublin and Sydney, Learnosity are a group of people who are passionate about transforming learning and assessment. We are committed to designing market-leading software which lets developers create exceptional assessment products; makes teachers’ lives easier and above all instills a love of learning in students.

The Learnosity Toolkit is comprised of a suite of APIs which enable clients to easily incorporate interactive assessment, as well as authoring and reporting capabilities into their applications, eBooks and websites. By providing the the core building blocks of any digital assessment product yet leaving the end design decisions in the hands of our clients we help our partners to build better products with less time and money.

This blog originally featured as a guest post on: http://www.siia.net/blog/index.php/2014/10/what-winning-a-codie-award-means-to-learnosity/

Shading Question Type

We have released the draft Simple Shading Question Type.

The Shading Question provides a visual representation of functions and calculations including fractions and ratios. Authors are able to generate a set of cells which can be shaded by a student.

The canvas and shading options can be configured to suit many question variations. Configurable options include:

  • Row and column count
  • Row and column size
  • Border
  • Insert background image
  • Author hidden or shaded areas
  • Insert cell image

Triumph Learning Launches Waggle SBAC

Waggle Logo

New online learning platform addresses Common Core assessment needs

New York, October 16, 2014: Triumph Learning, producer of critically acclaimed K-12 instructional materials and interactive digital tools, announces Waggle for the Smarter Balance Assessment Consortium (SBAC). The SBAC assessments in Waggle include 26 different item types that students will see on the SBAC assessments including Part A and Part B problems and performance tasks.

The Smarter Balance Assessment Consortium is a state-led consortium working to develop next-generation assessments that measure student progress toward college- and career-readiness. Smarter Balance is one of two multistate consortia awarded funding from the U.S. Department of Education in 2010 to develop an assessment system aligned to the Common Core State Standards (CCSS) by the 2014-15 school year.

“With Waggle, SBAC states can gain a greater understanding about Common Core State Standards and assessments,” said Aoife Dempsey, chief technology officer of Triumph Learning. “Our personalized learning platform provides students with the practice and instruction to build the skills and critical thinking that they need for college- and career-readiness.”

Triumph Learning has also partnered with Learnosity, which offers tools and services that incorporate powerful interactive assessment into digital products quickly and easily. Learnosity is committed to designing market-leading software to allow developers to create exceptional assessment products, make teachers’ lives easier, and above all, instill a love of learning in students.

“Our partnership with Triumph Learning is a natural fit,” said Gavin Cooney, co-founder and CEO of Learnosity. “By using the Learnosity tools and services Triumph Learning is able to provide Common Core Coach content in an even wider variety of online interactive item types than are in the SBAC assessments.”

Triumph Learning recently received three Education Software Review (EDDIE) Awards for its online learning platform, Waggle. The company took home the top prize for its new learning solution in the following categories: Online English Language Arts Courseware, Online Math Courseware and Online Classroom Management System.

About Triumph Learning 
Triumph Learning, LLC, is a leading educational content company and publisher of print and digital K-12 resources, standards-aligned instructional materials and effective literacy programs, serving more than 6 million students in 36,000 schools in 2013. Triumph Learning offers unique student solutions, robust teacher support, and professional development opportunities. Triumph Learning is committed to serving all students with a mix of interactive digital tools and innovative student texts with products such as Coach, Buckle Down, and Waggle. For more information, visit http://www.triumphlearning.com.

About Learnosity 
Learnosity is a rapidly expanding educational technology company. The company offers a set of tools and services that allow clients to incorporate powerful interactive assessment into their digital products quickly and easily. Run by a talented group of people who are passionate about transforming learning and assessment, Learnosity is committed to designing market-leading software to allow developers to create exceptional assessment products, make teachers’ lives easier, and above all, instil a love of learning in students. The Company is seeing an annual doubling of revenues, and works with some of the leading names in the Education industry. The Learnosity Toolkit was recently named the Best K-12 Enterprise Solution by the SIIA, and National Champion for Innovation in the European Business Awards. Learnosity has offices in NYC, Dublin and Sydney. For more information, visit http://www.learnosity.com.

The original press release is accessible at: http://www.prweb.com/releases/2014/10/prweb12252922.htm