Skip to content
GitLab
Explore
Sign in
formatest
FormATest_QuestionSetPool
Compare revisions
f8398e71a36f1e668b6b5154c87074f9e99d3d9e to 74da46193fb47858d76ef2f9c3100e64cf7dee3b
Commits on Source (4)
Remove obsoleter require directives
· 5e3a9044
Michael Jansen
authored
Oct 16, 2020
5e3a9044
Remove obsoleter require directives
· 442c3b14
Michael Jansen
authored
Oct 16, 2020
442c3b14
Remove obsoleter require directives
· 2916b73c
Michael Jansen
authored
Oct 16, 2020
2916b73c
Handle condition editing with fixed field on question preview
· 74da4619
Michael Jansen
authored
Oct 16, 2020
74da4619
Hide whitespace changes
Inline
Side-by-side
classes/controllers/abstract.ilQuestionSetPoolConditionGUI.php
View file @
74da4619
...
...
@@ -43,7 +43,6 @@ abstract class ilQuestionSetPoolConditionGUI extends ilPluginControllerFormGUI
$this
->
controller
->
populateContentStyleBlock
();
$this
->
controller
->
populateSyntaxStyleBlock
();
include_once
"./Services/Administration/classes/class.ilSetting.php"
;
$mathJaxSetting
=
new
ilSetting
(
"MathJax"
);
if
(
$mathJaxSetting
->
get
(
"enable"
))
{
...
...
@@ -72,7 +71,6 @@ abstract class ilQuestionSetPoolConditionGUI extends ilPluginControllerFormGUI
$template
->
setVariable
(
"TXT_QUESTION"
,
$this
->
controller
->
lng
->
txt
(
'question'
));
$template
->
setVariable
(
"TXT_ACTIONS"
,
$this
->
controller
->
lng
->
txt
(
'actions'
));
$template
->
setVariable
(
"PREVIEW_LINK"
,
$this
->
ctrl
->
getLinkTarget
(
$this
->
controller
,
get_class
(
$this
)
.
".showPreview"
,
""
,
true
));
include_once
"Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php"
;
$template
->
setVariable
(
'CLOSE_IMG_SRC'
,
ilGlyphGUI
::
get
(
ilGlyphGUI
::
CLOSE
));
$template
->
setVariable
(
'CLOSE_IMG_ALT'
,
$this
->
controller
->
lng
->
txt
(
'close'
));
}
...
...
classes/controllers/class.ilQuestionSetPoolInitialConditionGUI.php
View file @
74da4619
...
...
@@ -20,9 +20,7 @@ class ilQuestionSetPoolInitialConditionGUI extends ilQuestionSetPoolConditionGUI
public
function
edit
()
{
include_once
'Services/jQuery/classes/class.iljQueryUtil.php'
;
iljQueryUtil
::
initjQuery
();
include_once
'Services/YUI/classes/class.ilYuiUtil.php'
;
ilYuiUtil
::
initPanel
();
ilYuiUtil
::
initOverlay
();
$this
->
tpl
->
addJavascript
(
'./Services/UIComponent/Overlay/js/ilOverlay.js'
);
...
...
@@ -39,7 +37,6 @@ class ilQuestionSetPoolInitialConditionGUI extends ilQuestionSetPoolConditionGUI
$template
->
setVariable
(
"FORM"
,
$this
->
form
->
getHTML
());
$template
->
setVariable
(
"INFO"
,
ilQuestionSetPoolInfoBox
::
render
(
$this
->
plugin
));
require_once
'Services/UIComponent/Button/classes/class.ilLinkButton.php'
;
$button
=
ilLinkButton
::
getInstance
();
$button
->
addCSSClass
(
'toggle_feedback'
);
$button
->
setCaption
(
$this
->
plugin
->
txt
(
'hide_feedback_form_parts'
),
false
);
...
...
@@ -127,8 +124,6 @@ class ilQuestionSetPoolInitialConditionGUI extends ilQuestionSetPoolConditionGUI
*/
protected
function
initForm
(
$model
)
{
require_once
"./Services/Form/classes/class.ilPropertyFormGUI.php"
;
$this
->
form
=
new
ilPropertyFormGUI
();
$this
->
form
->
setName
(
'condition_form'
);
$this
->
form
->
setTableWidth
(
"100%"
);
...
...
@@ -250,8 +245,6 @@ class ilQuestionSetPoolInitialConditionGUI extends ilQuestionSetPoolConditionGUI
{
foreach
(
$this
->
feedback_types
as
$type
)
{
// remove usage of deleted media objects
include_once
'Services/MediaObjects/classes/class.ilObjMediaObject.php'
;
$oldMediaObjects
=
ilObjMediaObject
::
_getMobsOfObject
(
'x_'
.
$type
[
'obj_type'
]
.
':html'
,
$model
->
getId
());
$curMediaObjects
=
ilRTE
::
_getMediaObjects
(
$this
->
form
->
getInput
(
$type
[
'post_var'
]),
0
);
foreach
(
$oldMediaObjects
as
$oldMob
)
...
...
classes/controllers/class.ilQuestionSetPoolJumpConditionGUI.php
View file @
74da4619
...
...
@@ -27,9 +27,7 @@ class ilQuestionSetPoolJumpConditionGUI extends ilQuestionSetPoolConditionGUI
public
function
edit
()
{
include_once
'Services/jQuery/classes/class.iljQueryUtil.php'
;
iljQueryUtil
::
initjQuery
();
include_once
'Services/YUI/classes/class.ilYuiUtil.php'
;
ilYuiUtil
::
initPanel
();
ilYuiUtil
::
initOverlay
();
$this
->
tpl
->
addJavascript
(
'./Services/UIComponent/Overlay/js/ilOverlay.js'
);
...
...
@@ -48,7 +46,6 @@ class ilQuestionSetPoolJumpConditionGUI extends ilQuestionSetPoolConditionGUI
$template
->
setVariable
(
"FORM"
,
$this
->
form
->
getHTML
());
$template
->
setVariable
(
"INFO"
,
ilQuestionSetPoolInfoBox
::
render
(
$this
->
plugin
));
require_once
'Services/UIComponent/Button/classes/class.ilLinkButton.php'
;
$button
=
ilLinkButton
::
getInstance
();
$button
->
addCSSClass
(
'toggle_feedback'
);
$button
->
setCaption
(
$this
->
plugin
->
txt
(
'hide_feedback_form_parts'
),
false
);
...
...
@@ -61,7 +58,6 @@ class ilQuestionSetPoolJumpConditionGUI extends ilQuestionSetPoolConditionGUI
public
function
update
()
{
include_once
'Services/MediaObjects/classes/class.ilObjMediaObject.php'
;
$this
->
model
=
$this
->
loadModel
();
$this
->
initForm
(
$this
->
model
);
...
...
@@ -193,8 +189,6 @@ class ilQuestionSetPoolJumpConditionGUI extends ilQuestionSetPoolConditionGUI
global
$DIC
;
$ilUser
=
$DIC
->
user
();
require_once
"./Services/Form/classes/class.ilPropertyFormGUI.php"
;
$this
->
form
=
new
ilPropertyFormGUI
();
$this
->
form
->
setName
(
'condition_form'
);
$this
->
form
->
setTableWidth
(
"100%"
);
...
...
templates/default/tpl.il_xqsp_condition.html
View file @
74da4619
...
...
@@ -39,8 +39,8 @@
var
$fbd_toggle
=
$
(
'
#il_center_col a.toggle_feedback
'
);
$
(
function
()
{
var
$
top
bar
=
$
(
"
.il
TopBa
r
"
);
var
$
main_menu
=
$
(
"
.il
MainHeader
"
);
var
$
meta
bar
=
$
(
"
.il
-layout-page heade
r
"
);
var
$
breadcrumbs
=
$
(
"
.il
-layout-page .breadcrumbs
"
);
var
$condition_container
=
$
(
"
#ilConditionFormContainer
"
);
var
$condition_add_on_container
=
$
(
"
#ilQuestionSetPoolConditionAddOnContainer
"
);
var
$panelcontainer
=
$
(
"
.ilQuestionSetPoolConditionInputQuestionPreviewContainer
"
);
...
...
@@ -58,8 +58,8 @@
$fbd_toggle
.
text
(
"
{TXT_SHOW_FEEDBACK}
"
);
};
if
(
$fbd_toggle
.
size
()
==
1
)
{
$fbd_toggle
.
on
(
'
click
'
,
function
(
e
)
{
if
(
$fbd_toggle
.
length
=
==
1
)
{
$fbd_toggle
.
on
(
"
click
"
,
function
(
e
)
{
e
.
preventDefault
();
e
.
stopPropagation
();
...
...
@@ -73,7 +73,7 @@
var
onScrollHandler
=
function
()
{
if
(
$panelcontainer
.
hasClass
(
'
ilPartialContainer
'
))
{
var
static_height
=
parseFloat
(
$
top
bar
.
height
())
+
parseFloat
(
$
main_menu
.
height
());
var
static_height
=
parseFloat
(
$
meta
bar
.
height
())
+
parseFloat
(
$
breadcrumbs
.
height
());
var
threshold_height
=
parseFloat
(
$
(
document
).
scrollTop
())
+
static_height
;
var
stcc
=
$condition_container
.
offset
().
top
;
...
...
@@ -118,6 +118,7 @@
$panelcontainer
.
removeClass
(
'
ilFixedMode
'
);
showFeedback
();
$fbd_toggle
.
show
();
e
.
preventDefault
();
});
...
...
@@ -127,6 +128,7 @@
var
$panel
;
hideFeedback
();
$fbd_toggle
.
hide
();
$condition_add_on_container
.
addClass
(
"
ilPartialContainer
"
);
$panelcontainer
.
addClass
(
"
ilPartialContainer
"
);
...
...