Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
Moodle Qtype Moopt
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elc
Moodle Qtype Moopt
Commits
7317aaac
Commit
7317aaac
authored
1 year ago
by
Isabel Uffinger
Browse files
Options
Downloads
Plain Diff
Merge branch 'dev/isabel_50' into develop
parents
64f8450b
5c8e9567
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
classes/output/renderer.php
+11
-6
11 additions, 6 deletions
classes/output/renderer.php
with
11 additions
and
6 deletions
classes/output/renderer.php
+
11
−
6
View file @
7317aaac
...
...
@@ -410,6 +410,8 @@ class qtype_moopt_renderer extends qtype_renderer {
$defaultproglang
=
$questionoptions
->
ftsstandardlang
;
$fixedfilenames
=
false
;
for
(
$i
=
0
;
$i
<
(
int
)
$questionoptions
->
ftsmaxnumfields
;
$i
++
)
{
$customoptions
=
$DB
->
get_record
(
'qtype_moopt_freetexts'
,
[
'questionid'
=>
$qa
->
get_question
()
->
id
,
'inputindex'
=>
$i
]);
...
...
@@ -451,6 +453,7 @@ class qtype_moopt_renderer extends qtype_renderer {
// readonly is used instead of disabled because the data in this field would not be submitted if it is disabled
$inputoptions
[
'readonly'
]
=
true
;
$inputoptions
[
'style'
]
.
=
"color: grey;"
;
$fixedfilenames
=
true
;
}
// Adjust the height of the textarea based on the content of the textarea
...
...
@@ -476,12 +479,14 @@ class qtype_moopt_renderer extends qtype_renderer {
$PAGE
->
requires
->
js_call_amd
(
'qtype_moopt/userinterfacewrapper'
,
'newUiWrapper'
,
[
'ace'
,
$answertextid
]);
}
if
(
!
(
$fixedfilenames
&&
!
has_capability
(
'mod/quiz:grade'
,
$PAGE
->
context
))){
$renderedarea
.
=
html_writer
::
start_div
(
''
,
[
'style'
=>
'display:flex;justify-content:flex-end;'
]);
$renderedarea
.
=
html_writer
::
tag
(
'button'
,
get_string
(
'addanswertext'
,
'qtype_moopt'
),
[
'id'
=>
'addAnswertextButton_'
.
$qa
->
get_question_id
()]);
$renderedarea
.
=
html_writer
::
tag
(
'button'
,
get_string
(
'removelastanswertext'
,
'qtype_moopt'
),
[
'id'
=>
'removeLastAnswertextButton_'
.
$qa
->
get_question_id
(),
'style'
=>
'margin-left: 10px'
]);
$renderedarea
.
=
html_writer
::
end_div
();
}
$PAGE
->
requires
->
js_call_amd
(
'qtype_moopt/manage_answer_texts'
,
'init'
,
[(
int
)
$questionoptions
->
ftsmaxnumfields
,
max
(
$maxindexoffieldwithcontent
,
(
int
)
$questionoptions
->
ftsnuminitialfields
),
$qa
->
get_question_id
()]);
...
...
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