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
5fce03dd
"README.md" did not exist on "feb8b6e8df497f80b0c294c2222d730d2e1b9f21"
Commit
5fce03dd
authored
12 years ago
by
srosse
Browse files
Options
Downloads
Patches
Plain Diff
OO-570: hardened the method and implement the solution without knowing that the user is an invitee
parent
a91c4c23
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/org/olat/core/commons/fullWebApp/BaseFullWebappController.java
+25
-30
25 additions, 30 deletions
...lat/core/commons/fullWebApp/BaseFullWebappController.java
with
25 additions
and
30 deletions
src/main/java/org/olat/core/commons/fullWebApp/BaseFullWebappController.java
+
25
−
30
View file @
5fce03dd
...
...
@@ -135,18 +135,12 @@ public class BaseFullWebappController extends BasicController implements Generic
private
Panel
initialPanel
;
private
DTabs
myDTabsImpl
;
private
static
Integer
MAX_TAB
;
private
boolean
invitee
=
false
;
public
BaseFullWebappController
(
UserRequest
ureq
,
WindowControl
ouisc_wControl
,
BaseFullWebappControllerParts
baseFullWebappControllerParts
)
{
// only-use-in-super-call, since we define our own
super
(
ureq
,
null
);
if
(
ureq
.
getUserSession
()
!=
null
&&
ureq
.
getUserSession
().
getRoles
()
!=
null
)
{
invitee
=
ureq
.
getUserSession
().
getRoles
().
isInvitee
();
}
this
.
baseFullWebappControllerParts
=
baseFullWebappControllerParts
;
guiMessage
=
new
GUIMessage
();
...
...
@@ -772,33 +766,33 @@ public class BaseFullWebappController extends BasicController implements Generic
}
private
void
popTheTabState
(
UserRequest
ureq
)
{
if
(
siteAndTabs
.
isEmpty
())
{
if
(
siteAndTabs
.
isEmpty
()
&&
sites
!=
null
)
{
SiteInstance
home
=
sites
.
get
(
0
);
BornSiteInstance
bs
=
siteToBornSite
.
get
(
home
);
doActivateSite
(
home
,
bs
.
getGuiStackHandle
());
}
TabState
state
=
siteAndTabs
.
remove
(
siteAndTabs
.
size
()
-
1
);
if
(
state
.
getSite
()
!=
null
)
{
// latest selected static tab
// activate previous chosen static site -> this site has already been
// constructed and is thus in the cache
SiteInstance
si
=
state
.
getSite
();
BornSiteInstance
bs
=
siteToBornSite
.
get
(
si
);
// bs != null since clicked previously
GuiStack
gsh
=
bs
.
getGuiStackHandle
();
doActivateSite
(
si
,
gsh
);
if
(
siteToBusinessPath
.
containsValue
(
si
))
{
ureq
.
getUserSession
().
addToHistory
(
ureq
,
siteToBusinessPath
.
get
(
si
));
}
}
else
if
(
state
.
getDtab
()
!=
null
&&
!
state
.
getDtab
().
getController
().
isDisposed
())
{
DTab
tab
=
state
.
getDtab
();
doActivateDTab
(
tab
);
if
(
dtabToBusinessPath
.
containsKey
(
tab
))
{
ureq
.
getUserSession
().
addToHistory
(
ureq
,
dtabToBusinessPath
.
get
(
tab
));
}
else
if
(!
siteAndTabs
.
isEmpty
())
{
TabState
state
=
siteAndTabs
.
remove
(
siteAndTabs
.
size
()
-
1
);
if
(
state
.
getSite
()
!=
null
)
{
// latest selected static tab
// activate previous chosen static site -> this site has already been
// constructed and is thus in the cache
SiteInstance
si
=
state
.
getSite
();
BornSiteInstance
bs
=
siteToBornSite
.
get
(
si
);
// bs != null since clicked previously
GuiStack
gsh
=
bs
.
getGuiStackHandle
();
doActivateSite
(
si
,
gsh
);
if
(
siteToBusinessPath
.
containsValue
(
si
))
{
ureq
.
getUserSession
().
addToHistory
(
ureq
,
siteToBusinessPath
.
get
(
si
));
}
}
else
if
(
state
.
getDtab
()
!=
null
&&
!
state
.
getDtab
().
getController
().
isDisposed
())
{
DTab
tab
=
state
.
getDtab
();
doActivateDTab
(
tab
);
if
(
dtabToBusinessPath
.
containsKey
(
tab
))
{
ureq
.
getUserSession
().
addToHistory
(
ureq
,
dtabToBusinessPath
.
get
(
tab
));
}
}
else
{
popTheTabState
(
ureq
);
}
}
else
{
popTheTabState
(
ureq
);
}
}
...
...
@@ -1051,7 +1045,8 @@ public class BaseFullWebappController extends BasicController implements Generic
* @return
*/
public
boolean
isCanCloseDTab
(
DTab
dtab
)
{
return
!
invitee
&&
!(
sites
==
null
||
sites
.
isEmpty
());
//can close
return
(
sites
!=
null
&&
!
sites
.
isEmpty
())
||
(
dtabs
!=
null
&&
dtabs
.
size
()
>
1
);
}
private
void
setCurrent
(
SiteInstance
site
,
DTab
tab
)
{
...
...
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