# This is my first attempt to post a example of a test using Concerto 4 beta.
# This is an extremely simple test. Too simple to be useful to most people yet I believe it is didactically helpful.
The Following is the HTML code for Template 9. It is the form that the user first inputs answers to the three questions.
Template Description/Name: FixedSimpleQuestions
<p>Please Answer:</p>
<!--This displays each question. The important thing to notice is the name of each text box, txt_1, txt_2, and txt_3-->
<p>1. 1+1=<input name="txt_1" type="text" /></p>
<p>2. 2+2=<input name="txt_2" type="text" /></p>
<p>3. 3+3=<input name="txt_3" type="text" /></p>
<p><input name="done" type="button" value="done" /></p>
The Following is the HTML code for Template 10. It is the form that the user receives feedback from.
Template Description/Name: FixedSimpleResults
<p>You got questions:</p>
<!-- Notice the values in {{}}. These are the parameters passed to this template -->
<p>1. {{score1}}</p>
<p>2. {{score2}}</p>
<p>3. {{score3}}</p>
# The Following is the R code that the test actually uses to run.
# We can see how R controls the flow of the user interface.
# Concerto Simple Test 1
# We call template 9, FixedSimpleQuestions, to be shown. It can either be referenced by the template number of the name of the template.
items = concerto.template.show("FixedSimpleQuestions")
# Check if the items results are correct. We can see that the responses to the items from the first template are saved within the list object item with the names txt_1, txt_2, and txt_3.
TF1 = items$txt_1==2
TF2 = items$txt_2==4
TF3 = items$txt_3==6
# Show the results to the user by feeding our item values as parameters back into the second template.
concerto.template.show("FixedSimpleResults", params=list(score1=TF1, score2=TF2, score3=TF3))
# I hope this gives you a feel for how easy it is to use Concerto to handle web based inputs.
# A powerful feature of Concerto is that it has functions that and query and modify tables using My SQL.
# More in future posts.
# I used an HTML encoder to translate my html code to post into blogger.
Showing posts with label Content Management System. Show all posts
Showing posts with label Content Management System. Show all posts
Thursday, May 2, 2013
Tuesday, April 23, 2013
Concerto v4.b web-based Content Management System for R Users
Concerto is a open source R Content Management System for developing online applications. The primary purpose of Concerto is for the designing of online tests. However, the hard working programmers at the University of Cambridge Psychometrics Centre have created a program that is flexible enough to address a wide range of applications such as the development of statistical learning tools, client management systems, as well as large scale survey deployment. Future plans for Concerto would include the integration of it and the Psychometric's Center's facebook App which has collected detailed information for millions of respondents spanning a number of fascinating surveys.
The real beauty of Concerto is that it provides an interface that builds on the vast resources of R in order to seamlessly integrate a powerful environment capable of managing the enormous contributions of web developers.
Well, enough advertising. Let's see how v4b works.
In this post I will map out the logic of Concerto environment as I understand it now. I will flesh out more in future posts as I get a better grasp of the Concerto environment.
For this post and all future posts I will look only at version 4b of Concerto or higher.
For the test developer the base operating system is R. For now I will use pseudo R-like code. Pseudo code is useful at explaining coding concepts.
First we start with an initialization of a “test”. Tests are made up of R code.
# START – pseudo code random item survey
# The first thing a test might do is have a user input demographic information.
1.> intro = Concerto.html.tempate(Introduction)
# The responses from the Introduction page are returned as a list assigned to the Intro object.
# This responses might include any kind of information like: age, name, gender, ect. We can target the values the same way as any list object.
2> print(intro$age)
# Interestingly this command does not actually do anything as far as the user is concerned because the screen output from R is suppressed. However in debugging mode screen returns from R are displayed in the testing window.
# We may write the information we have gathered so far to our user information table which is a sql table. Concerto R is able to send commands to sql. Remember this is only pseudo-code.
3> Concerto.sql.send(user_table, user_name=intro$user.name, user_age=intro$user.age)
# Now let’s administer our test items. Let’s say we have all of our items in a table.
4> items = concerto.sql.get(items)
# We can figure out how many we are by counting the rows.
5> nitems = nrows(items)
# We want to select 20 items randomly so that almost nobody shares item sets.
6> item.choice = sample(1:nitems, 20)
# Now to administer the items we simply send them to the user by looping through all of them.
7> response.vector = NULL
8> for (i in item.choice) response=c(response, Concerto.html.tempate(item.admin, params=list(text=items$text[i]))
# Now we have two vectors. A vector of item responses and a vector of items administered.
# All that is left is to save this response pattern
9> Concerto.sql.send(response_table, items=item.choice, responses=response.vector)
# And provide the user with some feedback
10> feedback = feedback.analysis(item.choice, response.vector)
# Now we simply display the results of this feeback analysis (this of course would be a function that we have already coded.
11> concerto.html.template(Feedback)
# END – pseudo code random item survey
In future posts I will strive to post functioning code and functioning tests. To learn more about Concerto check out the development website:
https://code.google.com/p/concerto-platform/
Subscribe to:
Posts (Atom)
