Index: lams_central/web/includes/javascript/jquery.blockUI.js
===================================================================
diff -u -rb0e43d3189749133af52bc2e225ce1533a33a11a -rfb9b47215dd9680e3bc2cc45fecb0458a51b88f8
--- lams_central/web/includes/javascript/jquery.blockUI.js (.../jquery.blockUI.js) (revision b0e43d3189749133af52bc2e225ce1533a33a11a)
+++ lams_central/web/includes/javascript/jquery.blockUI.js (.../jquery.blockUI.js) (revision fb9b47215dd9680e3bc2cc45fecb0458a51b88f8)
@@ -1,6 +1,6 @@
/*!
* jQuery blockUI plugin
- * Version 2.38 (29-MAR-2011)
+ * Version 2.39 (23-MAY-2011)
* @requires jQuery v1.2.3 or later
*
* Examples at: http://malsup.com/jquery/block/
@@ -65,7 +65,7 @@
});
};
-$.blockUI.version = 2.38; // 2nd generation blocking at no extra cost!
+$.blockUI.version = 2.39; // 2nd generation blocking at no extra cost!
// override these in your code to change the default behavior and style
$.blockUI.defaults = {
@@ -217,6 +217,7 @@
data.parent.removeChild(node);
}
+ $(el).data('blockUI.onUnblock', opts.onUnblock);
var z = opts.baseZ;
// blockUI uses 3 layers for blocking, for simplicity they are all used on every platform;
@@ -234,22 +235,22 @@
var lyr3, s;
if (opts.theme && full) {
- s = '
' +
+ s = '
';
}
else if (opts.theme) {
- s = '
' +
+ s = '
';
}
else if (full) {
- s = '
';
- }
+ s = '
';
+ }
else {
- s = '
';
+ s = '
';
}
lyr3 = $(s);
@@ -386,7 +387,12 @@
}
opts = $.extend({}, $.blockUI.defaults, opts || {});
bind(0, el, opts); // unbind events
-
+
+ if (opts.onUnblock === null) {
+ opts.onUnblock = $el.data('blockUI.onUnblock');
+ $el.removeData('blockUI.onUnblock');
+ }
+
var els;
if (full) // crazy selector to handle odd field errors in ie6/7
els = $('body').children().filter('.blockUI').add('body > .blockUI');
Index: lams_central/web/includes/javascript/jquery.cookie.js
===================================================================
diff -u
--- lams_central/web/includes/javascript/jquery.cookie.js (revision 0)
+++ lams_central/web/includes/javascript/jquery.cookie.js (revision fb9b47215dd9680e3bc2cc45fecb0458a51b88f8)
@@ -0,0 +1,96 @@
+/**
+ * Cookie plugin
+ *
+ * Copyright (c) 2006 Klaus Hartl (stilbuero.de)
+ * Dual licensed under the MIT and GPL licenses:
+ * http://www.opensource.org/licenses/mit-license.php
+ * http://www.gnu.org/licenses/gpl.html
+ *
+ */
+
+/**
+ * Create a cookie with the given name and value and other optional parameters.
+ *
+ * @example $.cookie('the_cookie', 'the_value');
+ * @desc Set the value of a cookie.
+ * @example $.cookie('the_cookie', 'the_value', { expires: 7, path: '/', domain: 'jquery.com', secure: true });
+ * @desc Create a cookie with all available options.
+ * @example $.cookie('the_cookie', 'the_value');
+ * @desc Create a session cookie.
+ * @example $.cookie('the_cookie', null);
+ * @desc Delete a cookie by passing null as value. Keep in mind that you have to use the same path and domain
+ * used when the cookie was set.
+ *
+ * @param String name The name of the cookie.
+ * @param String value The value of the cookie.
+ * @param Object options An object literal containing key/value pairs to provide optional cookie attributes.
+ * @option Number|Date expires Either an integer specifying the expiration date from now on in days or a Date object.
+ * If a negative value is specified (e.g. a date in the past), the cookie will be deleted.
+ * If set to null or omitted, the cookie will be a session cookie and will not be retained
+ * when the the browser exits.
+ * @option String path The value of the path atribute of the cookie (default: path of page that created the cookie).
+ * @option String domain The value of the domain attribute of the cookie (default: domain of page that created the cookie).
+ * @option Boolean secure If true, the secure attribute of the cookie will be set and the cookie transmission will
+ * require a secure protocol (like HTTPS).
+ * @type undefined
+ *
+ * @name $.cookie
+ * @cat Plugins/Cookie
+ * @author Klaus Hartl/klaus.hartl@stilbuero.de
+ */
+
+/**
+ * Get the value of a cookie with the given name.
+ *
+ * @example $.cookie('the_cookie');
+ * @desc Get the value of a cookie.
+ *
+ * @param String name The name of the cookie.
+ * @return The value of the cookie.
+ * @type String
+ *
+ * @name $.cookie
+ * @cat Plugins/Cookie
+ * @author Klaus Hartl/klaus.hartl@stilbuero.de
+ */
+jQuery.cookie = function(name, value, options) {
+ if (typeof value != 'undefined') { // name and value given, set cookie
+ options = options || {};
+ if (value === null) {
+ value = '';
+ options.expires = -1;
+ }
+ var expires = '';
+ if (options.expires && (typeof options.expires == 'number' || options.expires.toUTCString)) {
+ var date;
+ if (typeof options.expires == 'number') {
+ date = new Date();
+ date.setTime(date.getTime() + (options.expires * 24 * 60 * 60 * 1000));
+ } else {
+ date = options.expires;
+ }
+ expires = '; expires=' + date.toUTCString(); // use expires attribute, max-age is not supported by IE
+ }
+ // CAUTION: Needed to parenthesize options.path and options.domain
+ // in the following expressions, otherwise they evaluate to undefined
+ // in the packed version for some reason...
+ var path = options.path ? '; path=' + (options.path) : '';
+ var domain = options.domain ? '; domain=' + (options.domain) : '';
+ var secure = options.secure ? '; secure' : '';
+ document.cookie = [name, '=', encodeURIComponent(value), expires, path, domain, secure].join('');
+ } else { // only name given, get cookie
+ var cookieValue = null;
+ if (document.cookie && document.cookie != '') {
+ var cookies = document.cookie.split(';');
+ for (var i = 0; i < cookies.length; i++) {
+ var cookie = jQuery.trim(cookies[i]);
+ // Does this cookie string begin with the name we want?
+ if (cookie.substring(0, name.length + 1) == (name + '=')) {
+ cookieValue = decodeURIComponent(cookie.substring(name.length + 1));
+ break;
+ }
+ }
+ }
+ return cookieValue;
+ }
+};
\ No newline at end of file
Index: lams_gradebook/src/java/org/lamsfoundation/lams/gradebook/web/action/GradebookMonitoringAction.java
===================================================================
diff -u -rd9bba88902d84e240e6449b62980469091f6a6e2 -rfb9b47215dd9680e3bc2cc45fecb0458a51b88f8
--- lams_gradebook/src/java/org/lamsfoundation/lams/gradebook/web/action/GradebookMonitoringAction.java (.../GradebookMonitoringAction.java) (revision d9bba88902d84e240e6449b62980469091f6a6e2)
+++ lams_gradebook/src/java/org/lamsfoundation/lams/gradebook/web/action/GradebookMonitoringAction.java (.../GradebookMonitoringAction.java) (revision fb9b47215dd9680e3bc2cc45fecb0458a51b88f8)
@@ -27,6 +27,7 @@
import java.util.LinkedHashMap;
import javax.servlet.ServletOutputStream;
+import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
@@ -359,6 +360,14 @@
String fileName = organisation.getName().replaceAll(" ", "_") + ".xls";
response.setContentType("application/x-download");
response.setHeader("Content-Disposition", "attachment;filename=" + fileName);
+
+ //downloadTokenValue will have been provided when requesting excel export
+ String downloadTokenValue = WebUtil.readStrParam(request, "downloadTokenValue");
+ Cookie fileDownloadTokenCookie = new Cookie("fileDownloadToken", downloadTokenValue);
+ fileDownloadTokenCookie.setPath("/");
+ response.addCookie(fileDownloadTokenCookie);
+
+ //Code to generate file and write file contents to response
ServletOutputStream out = response.getOutputStream();
GradebookUtil.exportGradebookLessonToExcel(out, gradebookService.getMessage("gradebook.export.dateheader"),
dataToExport);
Index: lams_gradebook/web/gradebookCourseMonitor.jsp
===================================================================
diff -u -rd9bba88902d84e240e6449b62980469091f6a6e2 -rfb9b47215dd9680e3bc2cc45fecb0458a51b88f8
--- lams_gradebook/web/gradebookCourseMonitor.jsp (.../gradebookCourseMonitor.jsp) (revision d9bba88902d84e240e6449b62980469091f6a6e2)
+++ lams_gradebook/web/gradebookCourseMonitor.jsp (.../gradebookCourseMonitor.jsp) (revision fb9b47215dd9680e3bc2cc45fecb0458a51b88f8)
@@ -27,11 +27,52 @@
+
+