Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
User expired
tcexam_uibk
Commits
2f3119ab
Commit
2f3119ab
authored
Jun 21, 2017
by
Ewald
Browse files
warning text for mcma with radio buttons
parent
fbe033bb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
36 additions
and
4 deletions
+36
-4
public/code/tce_test_execute.php
public/code/tce_test_execute.php
+2
-1
public/config.default/tce_config.php
public/config.default/tce_config.php
+19
-0
shared/code/tce_functions_test.php
shared/code/tce_functions_test.php
+15
-3
No files found.
public/code/tce_test_execute.php
View file @
2f3119ab
...
...
@@ -38,6 +38,8 @@ $thispage_description = $l['hp_test_execute'];
require_once
(
'../../shared/code/tce_authorization.php'
);
require_once
(
'../../shared/code/tce_functions_form.php'
);
require_once
(
'../../shared/code/tce_functions_test.php'
);
require_once
(
'../../shared/code/tce_functions_tcecode.php'
);
require_once
(
'../../admin/code/tce_functions_tcecode_editor.php'
);
$formname
=
'testform'
;
...
...
@@ -174,7 +176,6 @@ if (isset($_REQUEST['testid']) AND ($_REQUEST['testid'] > 0)) {
// display questions + navigation menu
echo
F_questionForm
(
$test_id
,
$testlog_id
,
$formname
);
// the $finish variable is used to check if the form has been automatically submitted
// at the end of the time.
if
(
isset
(
$_REQUEST
[
'finish'
])
AND
(
$_REQUEST
[
'finish'
]
>
0
))
{
...
...
public/config.default/tce_config.php
View file @
2f3119ab
...
...
@@ -111,6 +111,25 @@ define ('K_ENABLE_PUBLIC_PDF', true);
*/
define
(
'K_HIDE_EXPIRED_TESTS'
,
false
);
/**
* Defines a serialized array of available fonts for PDF.
*/
define
(
'K_AVAILABLE_FONTS'
,
serialize
(
array
(
'courier'
=>
'courier'
,
'helvetica'
=>
'helvetica'
,
'times'
=>
'times'
,
'symbol'
=>
'symbol'
,
'zapfdingbats'
=>
'zapfdingbats'
,
'DejaVuSans'
=>
'dejavusans,sans'
,
'DejaVuSansCondensed'
=>
'dejavusanscondensed,sans'
,
'DejaVuSansMono'
=>
'dejavusansmono,monospace'
,
'DejaVuSerif'
=>
'dejavuserif,serif'
,
'DejaVuSerifCondensed'
=>
'dejavuserifcondensed,serif'
,
'FreeMono'
=>
'freemono,monospace'
,
'FreeSans'
=>
'freesans,sans'
,
'FreeSerif'
=>
'freeserif,serif'
)));
// --- INCLUDE FILES -----------------------------------------------------------
require_once
(
'../../shared/config/tce_db_config.php'
);
...
...
shared/code/tce_functions_test.php
View file @
2f3119ab
...
...
@@ -1651,13 +1651,24 @@ function F_questionForm($test_id, $testlog_id, $formname) {
if
(
K_ENABLE_VIRTUAL_KEYBOARD
)
{
$str
.
=
'<script src="'
.
K_PATH_SHARED_JSCRIPTS
.
'vk/vk_easy.js?vk_skin=default" type="text/javascript"></script>'
.
K_NEWLINE
;
}
$str
.
=
'<textarea cols="'
.
K_ANSWER_TEXTAREA_COLS
.
'" rows="'
.
K_ANSWER_TEXTAREA_ROWS
.
'" name="answertext" id="answertext" onchange="saveAnswer()"'
;
$str
.
=
'<script src="'
.
K_PATH_SHARED_JSCRIPTS
.
'inserttag.js" type="text/javascript"></script>'
.
K_NEWLINE
;
$str
.
=
'<textarea cols="'
.
K_ANSWER_TEXTAREA_COLS
.
'" rows="'
.
K_ANSWER_TEXTAREA_ROWS
.
'" name="answertext" id="answertext" onchange="saveAnswer()" onkeyup="textCounter(this,\'counter\');" id="message"'
;
if
(
K_ENABLE_VIRTUAL_KEYBOARD
)
{
$str
.
=
'keyboardInput '
;
}
$str
.
=
'answertext">'
;
$str
.
=
$m
[
'testlog_answer_text'
];
$str
.
=
'</textarea>'
.
K_NEWLINE
;
$str
.
=
'<script>
function textCounter(field,field2)
{
var countfield = document.getElementById(field2);
countfield.value = field.value.length;
}
</script>'
;
$str
.
=
'<input disabled value="0" id="counter">'
;
$str
.
=
"<br />"
;
$str
.
=
tcecodeEditorTagButtons
(
'testform'
,
'answertext'
);
}
else
{
// multiple-choice question
$checked
=
false
;
...
...
@@ -1667,6 +1678,9 @@ function F_questionForm($test_id, $testlog_id, $formname) {
}
else
{
$str
.
=
'<ol class="answer">'
.
K_NEWLINE
;
}
if
((
$m
[
'question_type'
]
==
2
)
&&
(
F_getBoolean
(
$testdata
[
'test_mcma_radio'
])))
{
$str
.
=
'<div style="color:red; text-align:center;">Bitte treffen Sie für jede Antwortmöglichkeit eine Auswahl!</div>'
;
}
if
(
$m
[
'question_type'
]
==
4
)
{
// get max positions for odering questions
$max_position
=
F_count_rows
(
K_TABLE_LOG_ANSWER
,
'WHERE logansw_testlog_id='
.
$testlog_id
.
''
);
...
...
@@ -1704,7 +1718,6 @@ function F_questionForm($test_id, $testlog_id, $formname) {
// MCMA - multiple-answer question
if
(
F_getBoolean
(
$testdata
[
'test_mcma_radio'
]))
{
// radiobuttons
// no-answer option
$str
.
=
'<span style="background-color:#DDDDDD;"'
.
$noanswer_hidden
.
'> '
;
$str
.
=
'<label for="answerid_'
.
$ma
[
'answer_id'
]
.
'u" title="'
.
$l
[
'm_unanswered'
]
.
'">'
.
$l
[
'w_unanswered_acronym'
]
.
'</label>'
;
...
...
@@ -1791,7 +1804,6 @@ function F_questionForm($test_id, $testlog_id, $formname) {
$str
.
=
'</label>'
;
$str
.
=
'</li>'
.
K_NEWLINE
;
}
$str
.
=
'</ol>'
.
K_NEWLINE
;
}
// end multiple answers
$str
.
=
'</div>'
.
K_NEWLINE
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment