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
ff3e6c10
Commit
ff3e6c10
authored
11 years ago
by
Florian Gnaegi - frentix GmbH
Browse files
Options
Downloads
Patches
Plain Diff
OO-1012 implement dependencies of menu configuration and item / section display
parent
6122c71b
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/course/nodes/iq/IQ12EditForm.java
+15
-0
15 additions, 0 deletions
src/main/java/org/olat/course/nodes/iq/IQ12EditForm.java
with
15 additions
and
0 deletions
src/main/java/org/olat/course/nodes/iq/IQ12EditForm.java
+
15
−
0
View file @
ff3e6c10
...
@@ -211,12 +211,17 @@ public class IQ12EditForm extends FormBasicController {
...
@@ -211,12 +211,17 @@ public class IQ12EditForm extends FormBasicController {
renderSectionsOnly
=
(
Boolean
)
modConfig
.
get
(
IQEditController
.
CONFIG_KEY_RENDERMENUOPTION
);
renderSectionsOnly
=
(
Boolean
)
modConfig
.
get
(
IQEditController
.
CONFIG_KEY_RENDERMENUOPTION
);
}
}
menuRenderOptions
.
select
(
renderSectionsOnly
.
toString
(),
true
);
menuRenderOptions
.
select
(
renderSectionsOnly
.
toString
(),
true
);
menuRenderOptions
.
addActionListener
(
this
,
FormEvent
.
ONCLICK
);
// sequence type
// sequence type
sequence
=
uifactory
.
addRadiosVertical
(
"qti_form_sequence"
,
"qti.form.sequence"
,
formLayout
,
sequenceKeys
,
sequenceValues
);
sequence
=
uifactory
.
addRadiosVertical
(
"qti_form_sequence"
,
"qti.form.sequence"
,
formLayout
,
sequenceKeys
,
sequenceValues
);
String
confSequence
=
(
String
)
modConfig
.
get
(
IQEditController
.
CONFIG_KEY_SEQUENCE
);
String
confSequence
=
(
String
)
modConfig
.
get
(
IQEditController
.
CONFIG_KEY_SEQUENCE
);
if
(
confSequence
==
null
)
confSequence
=
AssessmentInstance
.
QMD_ENTRY_SEQUENCE_ITEM
;
if
(
confSequence
==
null
)
confSequence
=
AssessmentInstance
.
QMD_ENTRY_SEQUENCE_ITEM
;
sequence
.
select
(
confSequence
,
true
);
sequence
.
select
(
confSequence
,
true
);
sequence
.
addActionListener
(
this
,
FormEvent
.
ONCLICK
);
// when menu rendering is set to section only, show all question on the section otherwise not accessible
if
(
renderSectionsOnly
)
confSequence
=
AssessmentInstance
.
QMD_ENTRY_SEQUENCE_SECTION
;
sequence
.
setEnabled
(!
renderSectionsOnly
);
Boolean
bDisplayQuestionTitle
=
(
Boolean
)
modConfig
.
get
(
IQEditController
.
CONFIG_KEY_QUESTIONTITLE
);
Boolean
bDisplayQuestionTitle
=
(
Boolean
)
modConfig
.
get
(
IQEditController
.
CONFIG_KEY_QUESTIONTITLE
);
...
@@ -409,6 +414,16 @@ public class IQ12EditForm extends FormBasicController {
...
@@ -409,6 +414,16 @@ public class IQ12EditForm extends FormBasicController {
endDateElement
.
clearError
();
endDateElement
.
clearError
();
if
(!
endDateElement
.
isVisible
())
endDateElement
.
setValue
(
""
);
if
(!
endDateElement
.
isVisible
())
endDateElement
.
setValue
(
""
);
endDateElement
.
setVisible
(
startDateElement
.
isVisible
());
endDateElement
.
setVisible
(
startDateElement
.
isVisible
());
if
(
isDisplayMenu
()
&&
isEnableMenu
())
{
// when items not visible in menu, question sequence must be set to section to make items accessible
if
(
isMenuRenderSectionsOnly
())
{
sequence
.
select
(
AssessmentInstance
.
QMD_ENTRY_SEQUENCE_SECTION
,
true
);
sequence
.
setEnabled
(
false
);
}
else
{
sequence
.
setEnabled
(
true
);
}
}
flc
.
setDirty
(
true
);
flc
.
setDirty
(
true
);
}
}
...
...
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