Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
f55b45d4
Commit
f55b45d4
authored
Sep 07, 2009
by
Nigel McNie
Browse files
Allow callers of ensure_composite_values for resume items to set the display_order.
Signed-off-by:
Nigel McNie
<
nigel@catalyst.net.nz
>
parent
5d90ec47
Changes
1
Hide whitespace changes
Inline
Side-by-side
htdocs/artefact/resume/lib.php
View file @
f55b45d4
...
...
@@ -409,8 +409,13 @@ abstract class ArtefactTypeResumeComposite extends ArtefactTypeResume {
update_record
(
$table
,
(
object
)
$values
,
'id'
);
}
else
{
$max
=
get_field
(
$table
,
'MAX(displayorder)'
,
'artefact'
,
$values
[
'artefact'
]);
$values
[
'displayorder'
]
=
is_numeric
(
$max
)
?
$max
+
1
:
0
;
if
(
isset
(
$values
[
'displayorder'
]))
{
$values
[
'displayorder'
]
=
intval
(
$values
[
'displayorder'
]);
}
else
{
$max
=
get_field
(
$table
,
'MAX(displayorder)'
,
'artefact'
,
$values
[
'artefact'
]);
$values
[
'displayorder'
]
=
is_numeric
(
$max
)
?
$max
+
1
:
0
;
}
insert_record
(
$table
,
(
object
)
$values
);
}
}
...
...
Write
Preview
Supports
Markdown
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