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
7adcdb19
Commit
7adcdb19
authored
1 year ago
by
smmercuri
Browse files
Options
Downloads
Patches
Plain Diff
Update default headers based on orientation
parent
604f8265
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
stack/cas/castext2/blocks/parsons.block.php
+2
-2
2 additions, 2 deletions
stack/cas/castext2/blocks/parsons.block.php
with
2 additions
and
2 deletions
stack/cas/castext2/blocks/parsons.block.php
+
2
−
2
View file @
7adcdb19
...
@@ -219,7 +219,7 @@ class stack_cas_castext2_parsons extends stack_cas_castext2_block {
...
@@ -219,7 +219,7 @@ class stack_cas_castext2_parsons extends stack_cas_castext2_block {
if
(
$proofmode
)
{
if
(
$proofmode
)
{
$code
=
'var headers = ["'
.
stack_string
(
'stackBlock_parsons_used_header'
)
.
'"];'
.
"
\n
"
;
$code
=
'var headers = ["'
.
stack_string
(
'stackBlock_parsons_used_header'
)
.
'"];'
.
"
\n
"
;
}
else
{
}
else
{
$code
=
'var headers = ['
.
implode
(
', '
,
range
(
1
,
intval
(
$columns
)))
.
'];'
.
"
\n
"
;
$code
=
'var headers = ['
.
implode
(
', '
,
range
(
1
,
intval
(
$
og
columns
)))
.
'];'
.
"
\n
"
;
}
}
$code
.
=
'var available_header = "'
.
stack_string
(
'stackBlock_parsons_available_header'
)
.
'";'
.
"
\n
"
;
$code
.
=
'var available_header = "'
.
stack_string
(
'stackBlock_parsons_available_header'
)
.
'";'
.
"
\n
"
;
...
@@ -237,7 +237,7 @@ class stack_cas_castext2_parsons extends stack_cas_castext2_block {
...
@@ -237,7 +237,7 @@ class stack_cas_castext2_parsons extends stack_cas_castext2_block {
// More specific pieces of validation
// More specific pieces of validation
// Check typing of headers, it should be an array containing strings.
// Check typing of headers, it should be an array containing strings.
$code
.
=
'if (!(Array.isArray(headers)
&& headers.every((header) => typeof(header) === "string")
))
$code
.
=
'if (!(Array.isArray(headers)))
{stack_js.display_error("'
.
stack_string
(
'stackBlock_incorrect_header_type'
)
.
'");}'
.
"
\n
"
;
{stack_js.display_error("'
.
stack_string
(
'stackBlock_incorrect_header_type'
)
.
'");}'
.
"
\n
"
;
// If the length of headers does not match the number of columns expected throw an error.
// If the length of headers does not match the number of columns expected throw an error.
...
...
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