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
181ac51b
Commit
181ac51b
authored
9 years ago
by
dfurrer
Browse files
Options
Downloads
Patches
Plain Diff
OO-1698: added name argument for locked message
parent
025722df
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/org/olat/modules/iq/IQManager.java
+7
-5
7 additions, 5 deletions
src/main/java/org/olat/modules/iq/IQManager.java
with
7 additions
and
5 deletions
src/main/java/org/olat/modules/iq/IQManager.java
+
7
−
5
View file @
181ac51b
...
@@ -175,7 +175,9 @@ public class IQManager implements UserDataDeletable {
...
@@ -175,7 +175,9 @@ public class IQManager implements UserDataDeletable {
// -- VERY RARE CASE -- 1) qti is open in an editor session right now on the screen (or session on the way to timeout)
// -- VERY RARE CASE -- 1) qti is open in an editor session right now on the screen (or session on the way to timeout)
// -- 99% of cases -- 2) qti is ready to be run as test/survey
// -- 99% of cases -- 2) qti is ready to be run as test/survey
if
(
CoordinatorManager
.
getInstance
().
getCoordinator
().
getLocker
().
isLocked
(
res
,
null
)){
if
(
CoordinatorManager
.
getInstance
().
getCoordinator
().
getLocker
().
isLocked
(
res
,
null
)){
GenericMainController
glc
=
createLockedMessageController
(
ureq
,
wControl
);
LockResult
lockEntry
=
CoordinatorManager
.
getInstance
().
getCoordinator
().
getLocker
().
aquirePersistentLock
(
res
,
ureq
.
getIdentity
(),
null
);
String
fullName
=
userManager
.
getUserDisplayName
(
lockEntry
.
getOwner
());
GenericMainController
glc
=
createLockedMessageController
(
ureq
,
wControl
,
fullName
);
return
glc
;
return
glc
;
}
else
{
}
else
{
Controller
controller
=
new
IQDisplayController
(
resolver
,
type
,
secCallback
,
ureq
,
wControl
);
Controller
controller
=
new
IQDisplayController
(
resolver
,
type
,
secCallback
,
ureq
,
wControl
);
...
@@ -185,14 +187,14 @@ public class IQManager implements UserDataDeletable {
...
@@ -185,14 +187,14 @@ public class IQManager implements UserDataDeletable {
}
}
}
}
private
GenericMainController
createLockedMessageController
(
UserRequest
ureq
,
WindowControl
wControl
)
{
private
GenericMainController
createLockedMessageController
(
UserRequest
ureq
,
WindowControl
wControl
,
String
fullName
)
{
//wrap simple message into mainLayout
//wrap simple message into mainLayout
GenericMainController
glc
=
new
GenericMainController
(
ureq
,
wControl
)
{
GenericMainController
glc
=
new
GenericMainController
(
ureq
,
wControl
)
{
@Override
@Override
public
void
init
(
UserRequest
ureq
)
{
public
void
init
(
UserRequest
ureq
)
{
Panel
empty
=
new
Panel
(
"empty"
);
Panel
empty
=
new
Panel
(
"empty"
);
setTranslator
(
Util
.
createPackageTranslator
(
this
.
getClass
(),
ureq
.
getLocale
()));
setTranslator
(
Util
.
createPackageTranslator
(
this
.
getClass
(),
ureq
.
getLocale
()));
Controller
contentCtr
=
MessageUIFactory
.
createInfoMessage
(
ureq
,
getWindowControl
(),
translate
(
"status.currently.locked.title"
),
translate
(
"status.currently.locked"
));
Controller
contentCtr
=
MessageUIFactory
.
createInfoMessage
(
ureq
,
getWindowControl
(),
translate
(
"status.currently.locked.title"
),
translate
(
"status.currently.locked"
,
fullName
));
listenTo
(
contentCtr
);
// auto dispose later
listenTo
(
contentCtr
);
// auto dispose later
Component
resComp
=
contentCtr
.
getInitialComponent
();
Component
resComp
=
contentCtr
.
getInitialComponent
();
LayoutMain3ColsController
columnLayoutCtr
=
new
LayoutMain3ColsController
(
ureq
,
getWindowControl
(),
empty
,
resComp
,
/*do not save no prefs*/
null
);
LayoutMain3ColsController
columnLayoutCtr
=
new
LayoutMain3ColsController
(
ureq
,
getWindowControl
(),
empty
,
resComp
,
/*do not save no prefs*/
null
);
...
...
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