[samigo-team] Question pool: wrong display for questions' list

RAUL SANCHEZ VEGAS raulsv at um.es
Wed Jan 29 04:41:48 PST 2014


Hi all

We have found an issue.

The question pool's questions list is being displayed wrong when the 
question text includes any html table. I've attached an image to show 
this. The steps to reproduce
the issue:

1. Create a question pool called "qpA".
2. Add 2 questions(e.g.) to qpA.
3. Create a new question whose question text has any table. Add it to qpA.
4. View qpA's questions list. 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). Has anyone 
noticed this?

Thanks,
Raúl

-------------- next part --------------
A non-text attachment was scrubbed...
Name: wrong display.JPG
Type: image/jpeg
Size: 343938 bytes
Desc: not available
Url : http://collab.sakaiproject.org/pipermail/samigo-team/attachments/20140129/1cab22a7/attachment-0001.jpe 
-------------- next part --------------
Index: samigo-services/src/java/org/sakaiproject/tool/assessment/facade/ItemFacade.java
===================================================================
--- samigo-services/src/java/org/sakaiproject/tool/assessment/facade/ItemFacade.java	(revision 133801)
+++ samigo-services/src/java/org/sakaiproject/tool/assessment/facade/ItemFacade.java	(working copy)
@@ -921,7 +921,7 @@
    */
   public String getTextHtmlStripped() throws DataFacadeException
   {
-    String regex = "\\<.*?\\>";
+	String regex = "\\<[^<]+?\\>";
     return getText().replaceAll(regex," ");
   }
 
@@ -938,7 +938,7 @@
    */
   public String getTextHtmlStrippedAll() throws DataFacadeException
   {
-    String regex = "\\<.*?\\>|\\n|\\r\\n";
+	String regex = "\\<[^<]+?\\>|\\n|\\r\\n";
     return getText().replaceAll(regex,"");
   }
   


More information about the samigo-team mailing list