[samigo-team] "Table of Contents" button: wrong display for questions' list

RAUL SANCHEZ VEGAS raulsv at um.es
Fri Feb 7 03:44:08 PST 2014


Hi

The "Table of contents" link is displaying wrong the questions list when 
the question text includes any html table. I've attached an image to 
show this. The steps to reproduce this issue:

1. Create an assessment with several questions one of which has any html 
table. The assessment has the option "Random access to questions" selected.

2. Preview the assessment and take it.

3. If you click on the "Table of contents" button, the questions list is 
being displayed wrong as you can see on the screenshot attached to this 
mail.

It happens either in 2.9.3 or trunk.

We have a patch to solve it in trunk(attached to this mail). We have 
tested this patch and it works fine.

Cheers,
Raúl

-------------- next part --------------
Index: samigo-app/src/java/org/sakaiproject/tool/assessment/ui/bean/delivery/ItemContentsBean.java
===================================================================
--- samigo-app/src/java/org/sakaiproject/tool/assessment/ui/bean/delivery/ItemContentsBean.java	(revision 134064)
+++ samigo-app/src/java/org/sakaiproject/tool/assessment/ui/bean/delivery/ItemContentsBean.java	(working copy)
@@ -1232,7 +1232,7 @@
 
 	public String strip(String text) {
 		if (text != null)
-			text = text.replaceAll("<.*?>", " ");
+			text = text.replaceAll("<[^<]+?>", " ");
 		return text;
 
 	}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: table of contents.JPG
Type: image/jpeg
Size: 311037 bytes
Desc: not available
Url : http://collab.sakaiproject.org/pipermail/samigo-team/attachments/20140207/17db8620/attachment-0001.jpe 


More information about the samigo-team mailing list