Index: lams_central/web/qb/collection.jsp
===================================================================
diff -u -r1dcc990ddb1ab499f9afb8435f9b9e6fdb0481a7 -r28f74fe44f679cfe7305cb1ddf42150f2de4c52c
--- lams_central/web/qb/collection.jsp (.../collection.jsp) (revision 1dcc990ddb1ab499f9afb8435f9b9e6fdb0481a7)
+++ lams_central/web/qb/collection.jsp (.../collection.jsp) (revision 28f74fe44f679cfe7305cb1ddf42150f2de4c52c)
@@ -47,6 +47,11 @@
margin-right: 50px;
}
+ #collection-name-row {
+ min-height: 20px;
+ margin-top: 20px;
+ }
+
#collection-name:hover+span+i {
visibility:visible
}
@@ -75,8 +80,7 @@
iconSet: 'fontAwesome',
caption: "Questions",
datatype: "xml",
- // data comes from data-collection-* attributes of
tag which is a base for the grid
- url: "qb/collection/getCollectionGridData.do?showUsage=true&collectionUid=" + collectionGrid.data('collectionUid'),
+ url: "qb/collection/getCollectionGridData.do?showUsage=true&collectionUid=${collection.uid}",
height: "100%",
autowidth:true,
shrinkToFit: true,
@@ -89,6 +93,7 @@
rowNum: 10,
viewrecords: true,
recordpos: "left",
+ hidegrid: false,
colNames:[
"ID",
"Name",
@@ -223,15 +228,14 @@
// share a collection with authors of an organisation
function shareCollection() {
var grid = $('#collection-grid'),
- collectionUid = grid.data('collectionUid'),
organisationId = $('#targetOrganisationSelect').val();
$.ajax({
'url' : 'qb/collection/shareCollection.do',
'type' : 'POST',
'dataType' : 'text',
'data' : {
- 'collectionUid' : collectionUid,
+ 'collectionUid' : ${collection.uid},
'organisationId': organisationId
},
'cache' : false
@@ -242,29 +246,50 @@
// stop sharing a collection with authors of an organisation
function unshareCollection(organisationId) {
- var grid = $('#collection-grid'),
- collectionUid = grid.data('collectionUid');
+ var grid = $('#collection-grid');
$.ajax({
'url' : 'qb/collection/unshareCollection.do',
'type' : 'POST',
'dataType' : 'text',
'data' : {
- 'collectionUid' : collectionUid,
+ 'collectionUid' : ${collection.uid},
'organisationId': organisationId
},
'cache' : false
}).done(function(){
document.location.reload();
});
}
+
+ function importQTI(){
+ window.open('questions/questionFile.jsp',
+ 'QuestionFile','width=500,height=240,scrollbars=yes');
+ }
+ function saveQTI(formHTML, formName) {
+ var form = $($.parseHTML(formHTML));
+ $.ajax({
+ type: "POST",
+ url: '?contentFolderID=${contentFolderID}&collectionUid=${collection.uid}',
+ data: form.serializeArray(),
+ success: function() {
+ location.reload();
+ }
+ });
+ }
+
+ function exportQTI(){
+ var frame = document.getElementById("downloadFileDummyIframe");
+ frame.src = '?collectionUid=${collection.uid}';
+ }
+
//create proper href for "Create question" button
- function initLinkHref(collectionUid) {
+ function initLinkHref() {
var questionType = document.getElementById("question-type").selectedIndex + 1;
$("#create-question-href").attr("href",
"?questionType=" + questionType
- + "&collectionUid=" + collectionUid
+ + "&collectionUid=${collection.uid}"
+ "&KeepThis=true&TB_iframe=true&modal=true");
};
@@ -283,20 +308,37 @@
-
-
-
-
-
+
-
-
- Private collection
+
+
+
+
+
-
+
-
-
+
+
+ Private collection
+
+
+
+
+
-
+
<%-- jqGrid placeholder with some useful attributes --%>
-
+
There are no questions in this collection
@@ -387,6 +427,8 @@
+
+