Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
moodle-qtype_stack
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_stack
Commits
373b51b2
Commit
373b51b2
authored
2 years ago
by
Chris Sangwin
Browse files
Options
Downloads
Patches
Plain Diff
Improve layout of answer test results.
parent
e5ae7076
No related branches found
No related tags found
No related merge requests found
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
cli/answertests_docs.php
+16
-6
16 additions, 6 deletions
cli/answertests_docs.php
doc/en/Authoring/Answer_tests_results.md
+5165
-6633
5165 additions, 6633 deletions
doc/en/Authoring/Answer_tests_results.md
with
5181 additions
and
6639 deletions
cli/answertests_docs.php
+
16
−
6
View file @
373b51b2
...
@@ -51,8 +51,6 @@ foreach ($availabletests as $anstest) {
...
@@ -51,8 +51,6 @@ foreach ($availabletests as $anstest) {
'teacheranswer'
=>
stack_string
(
'teacheranswer'
),
'teacheranswer'
=>
stack_string
(
'teacheranswer'
),
'options'
=>
stack_string
(
'options_short'
),
'options'
=>
stack_string
(
'options_short'
),
'rawmark'
=>
stack_string
(
'testsuitecolmark'
),
'rawmark'
=>
stack_string
(
'testsuitecolmark'
),
'error'
=>
stack_string
(
'testsuitecolerror'
),
'feedback'
=>
stack_string
(
'testsuitefeedback'
),
'answernote'
=>
stack_string
(
'answernote'
),
'answernote'
=>
stack_string
(
'answernote'
),
);
);
...
@@ -85,7 +83,7 @@ foreach ($availabletests as $anstest) {
...
@@ -85,7 +83,7 @@ foreach ($availabletests as $anstest) {
reset
(
$columns
);
reset
(
$columns
);
$firstcol
=
key
(
$columns
);
$firstcol
=
key
(
$columns
);
// This is a slight cludge to get multiple columns in a row.
// This is a slight cludge to get multiple columns in a row.
$notes
=
html_writer
::
tag
(
'td'
,
$test
->
notes
,
array
(
'colspan'
=>
'
8
'
));
$notes
=
html_writer
::
tag
(
'td'
,
$test
->
notes
,
array
(
'colspan'
=>
'
6
'
));
$table
->
add_data
(
array
(
$notes
),
'notes'
);
$table
->
add_data
(
array
(
$notes
),
'notes'
);
}
}
...
@@ -130,9 +128,6 @@ foreach ($availabletests as $anstest) {
...
@@ -130,9 +128,6 @@ foreach ($availabletests as $anstest) {
'teacheranswer'
=>
html_writer
::
tag
(
'pre'
,
$tans
),
'teacheranswer'
=>
html_writer
::
tag
(
'pre'
,
$tans
),
'options'
=>
$topt
,
'options'
=>
$topt
,
'rawmark'
=>
$mark
,
'rawmark'
=>
$mark
,
'error'
=>
$error
,
'feedback'
=>
format_text
(
$feedback
),
'feedback'
=>
$feedback
,
'answernote'
=>
$ansnote
,
'answernote'
=>
$ansnote
,
);
);
if
(
!
$passed
)
{
if
(
!
$passed
)
{
...
@@ -141,6 +136,21 @@ foreach ($availabletests as $anstest) {
...
@@ -141,6 +136,21 @@ foreach ($availabletests as $anstest) {
}
}
$table
->
add_data_keyed
(
$row
,
$class
);
$table
->
add_data_keyed
(
$row
,
$class
);
// Add errors as a separate row for better spacing.
$row
=
[];
$row
[]
=
html_writer
::
tag
(
'td'
,
''
,
array
(
'colspan'
=>
'2'
));
$row
[]
=
html_writer
::
tag
(
'td'
,
$error
,
array
(
'colspan'
=>
'4'
));
if
(
$error
!=
''
)
{
$table
->
add_data
(
$row
,
$class
);
}
// Add feeback as a separate row for better spacing.
$row
=
[];
$row
[]
=
html_writer
::
tag
(
'td'
,
''
,
array
(
'colspan'
=>
'2'
));
$row
[]
=
html_writer
::
tag
(
'td'
,
$feedback
,
array
(
'colspan'
=>
'4'
));
if
(
$feedback
!=
''
&&
$feedback
!=
$error
)
{
$table
->
add_data
(
$row
,
$class
);
}
}
}
$table
->
finish_output
();
$table
->
finish_output
();
...
...
This diff is collapsed.
Click to expand it.
doc/en/Authoring/Answer_tests_results.md
+
5165
−
6633
View file @
373b51b2
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