Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OLAT CI-CD Testing Project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lars Oliver Dam
OLAT CI-CD Testing Project
Commits
fe818949
Commit
fe818949
authored
11 years ago
by
srosse
Browse files
Options
Downloads
Patches
Plain Diff
OO-689: escape the change log
parent
25b61c06
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
TESTING.README.LATEST
+3
-0
3 additions, 0 deletions
TESTING.README.LATEST
src/main/java/org/olat/course/nodes/iq/IQRunController.java
+9
-7
9 additions, 7 deletions
src/main/java/org/olat/course/nodes/iq/IQRunController.java
with
12 additions
and
7 deletions
TESTING.README.LATEST
+
3
−
0
View file @
fe818949
...
...
@@ -75,6 +75,9 @@ junit and integration tests in OpenOLAT 8
mvn -Parquillian surefire:test
You can add "clean-mysql-dbsetup" to the profils to drop / restore the database
The Selenium tests can be run with different browser but with some limitations:
- Chrome cannot do an upload
- Selenium need Firefox version 17
* Execute a single selenium functional integration test in Eclipse
-----------------------------------------
...
...
This diff is collapsed.
Click to expand it.
src/main/java/org/olat/course/nodes/iq/IQRunController.java
+
9
−
7
View file @
fe818949
...
...
@@ -54,6 +54,7 @@ import org.olat.core.logging.AssertException;
import
org.olat.core.logging.OLATRuntimeException
;
import
org.olat.core.logging.activity.ThreadLocalUserActivityLogger
;
import
org.olat.core.util.Formatter
;
import
org.olat.core.util.StringHelper
;
import
org.olat.core.util.UserSession
;
import
org.olat.core.util.event.EventBus
;
import
org.olat.core.util.event.GenericEventListener
;
...
...
@@ -184,14 +185,13 @@ public class IQRunController extends BasicController implements GenericEventList
RepositoryEntry
re
=
courseNode
.
getReferencedRepositoryEntry
();
//re could be null, but if we are here it should not be null!
Roles
userRoles
=
ureq
.
getUserSession
().
getRoles
();
boolean
showAll
=
false
;
showAll
=
userRoles
.
isAuthor
()
||
userRoles
.
isOLATAdmin
();
boolean
showAll
=
userRoles
.
isAuthor
()
||
userRoles
.
isOLATAdmin
();
//get changelog
Formatter
formatter
=
Formatter
.
getInstance
(
ureq
.
getLocale
());
ImsRepositoryResolver
resolver
=
new
ImsRepositoryResolver
(
re
.
getKey
());
QTIChangeLogMessage
[]
qtiChangeLog
=
resolver
.
getDocumentChangeLog
();
StringBuilder
qtiChangelog
=
new
StringBuilder
();
Date
msgDate
=
null
;
if
(
qtiChangeLog
.
length
>
0
){
//there are resource changes
Arrays
.
sort
(
qtiChangeLog
);
...
...
@@ -199,15 +199,17 @@ public class IQRunController extends BasicController implements GenericEventList
//show latest change first
if
(!
showAll
&&
qtiChangeLog
[
i
].
isPublic
()){
//logged in person is a normal user, hence public messages only
msgDate
=
new
Date
(
qtiChangeLog
[
i
].
getTimestmp
());
Date
msgDate
=
new
Date
(
qtiChangeLog
[
i
].
getTimestmp
());
qtiChangelog
.
append
(
"\nChange date: "
).
append
(
formatter
.
formatDateAndTime
(
msgDate
)).
append
(
"\n"
);
qtiChangelog
.
append
(
qtiChangeLog
[
i
].
getLogMessage
());
String
msg
=
StringHelper
.
escapeHtml
(
qtiChangeLog
[
i
].
getLogMessage
());
qtiChangelog
.
append
(
msg
);
qtiChangelog
.
append
(
"\n********************************\n"
);
}
else
if
(
showAll
){
//logged in person is an author, olat admin, owner, show all messages
msgDate
=
new
Date
(
qtiChangeLog
[
i
].
getTimestmp
());
Date
msgDate
=
new
Date
(
qtiChangeLog
[
i
].
getTimestmp
());
qtiChangelog
.
append
(
"\nChange date: "
).
append
(
formatter
.
formatDateAndTime
(
msgDate
)).
append
(
"\n"
);
qtiChangelog
.
append
(
qtiChangeLog
[
i
].
getLogMessage
());
String
msg
=
StringHelper
.
escapeHtml
(
qtiChangeLog
[
i
].
getLogMessage
());
qtiChangelog
.
append
(
msg
);
qtiChangelog
.
append
(
"\n********************************\n"
);
}
//else non public messages are not shown to normal user
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment