Index: lams_central/web/qb/collection.jsp
===================================================================
diff -u -r755a9acfee63e78d1297e13557ce6b9c8de8443e -r1dcc990ddb1ab499f9afb8435f9b9e6fdb0481a7
--- lams_central/web/qb/collection.jsp (.../collection.jsp) (revision 755a9acfee63e78d1297e13557ce6b9c8de8443e)
+++ lams_central/web/qb/collection.jsp (.../collection.jsp) (revision 1dcc990ddb1ab499f9afb8435f9b9e6fdb0481a7)
@@ -92,12 +92,16 @@
colNames:[
"ID",
"Name",
+ "questionType",
+ "questionVersion",
"Used in
lessons",
"Actions"
],
colModel:[
{name:'id', index:'uid', sortable:true, hidden:true, width: 10},
- {name:'name', index:'name', sortable:true, search:true, autoencode:true},
+ {name:'name', index:'name', sortable:true, search:true, autoencode:true, formatter: questionNameFormatter},
+ {name:'questionType', index:'questionType', width:0, hidden: true},
+ {name:'questionVersion', index:'questionVersion', width:0, hidden: true},
{name: 'usage', index: 'usage', sortable:false, width: 10, align: "center"},
// formatter gets just question uid and creates a button
{name:'actions', index:'actions', classes: "stats-cell", sortable:false, width: 13, align: "center", formatter: actionsFormatter}
@@ -144,7 +148,7 @@
});
});
- // Creates a button to display question statistics
+ // auxiliary formatter for jqGrid's question statistics column
function actionsFormatter(cellvalue){
var cellhtml = "";
@@ -155,6 +159,49 @@
return cellhtml;
}
+ //auxiliary formatter for jqGrid's question column
+ function questionNameFormatter (cellvalue, options, rowObject) {
+ var questionTypeInt = rowObject[2].textContent;
+ var questionType;
+ switch (questionTypeInt) {
+ case '1':
+ questionType = "";
+ break;
+ case '2':
+ questionType = "";
+ break;
+ case '3':
+ questionType = "";
+ break;
+ case '4':
+ questionType = "";
+ break;
+ case '5':
+ questionType = "";
+ break;
+ case '6':
+ questionType = "";
+ break;
+ case '7':
+ questionType = "";
+ break;
+ case '8':
+ questionType = "";
+ break;
+ }
+
+ var questionVersion = rowObject[3].textContent;
+
+ var text = cellvalue;
+ text += "";
+ text += "v. " + questionVersion;
+ text += "";
+ text += "";
+ text += questionType;
+ text += "";
+
+ return text;
+ }
// remove a collection
function removeCollection() {