[LON-CAPA-cvs] cvs: loncom /html/res/adm/pages menu.html
matthew
lon-capa-cvs@mail.lon-capa.org
Mon, 13 May 2002 18:32:11 -0000
matthew Mon May 13 14:32:11 2002 EDT
Modified files:
/loncom/html/res/adm/pages menu.html
Log:
Bug 227, CRST button took user to stupid page if they have a specific version
of a resource in their sequence (example: exam_1_2.4.problem). Now we check
for /\.(\d+)\.(\w+)$/ and head to the default construction space instead.
Index: loncom/html/res/adm/pages/menu.html
diff -u loncom/html/res/adm/pages/menu.html:1.49 loncom/html/res/adm/pages/menu.html:1.50
--- loncom/html/res/adm/pages/menu.html:1.49 Mon May 6 17:59:29 2002
+++ loncom/html/res/adm/pages/menu.html Mon May 13 14:32:11 2002
@@ -4,7 +4,7 @@
Remote Control
//
-// $Id: menu.html,v 1.49 2002/05/06 21:59:29 matthew Exp $
+// $Id: menu.html,v 1.50 2002/05/13 18:32:11 matthew Exp $
//
// Copyright Michigan State University Board of Trustees
//
@@ -209,7 +209,10 @@
function cstrgo(currenturl,defaulturl) {
windowcheck();
var url;
+ var reg = /\.(\d+)\.(\w+)$/;
if (currenturl == null || currenturl == '') {
+ url = defaulturl;
+ } else if (reg.test(currenturl)) {
url = defaulturl;
} else {
url = currenturl;