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
iena
iena-path-block
Commits
70e006e2
Commit
70e006e2
authored
Jul 06, 2021
by
Lea
Browse files
Merge version
parents
68850bf9
600fe966
Changes
2
Hide whitespace changes
Inline
Side-by-side
db/upgrade.php
0 → 100644
View file @
70e006e2
<?php
function
xmldb_block_career_upgrade
(
$oldversion
)
{
global
$DB
;
$dbman
=
$DB
->
get_manager
();
if
(
$oldversion
<
2021070101
)
{
// Define table block_career_groups to be created.
$table
=
new
xmldb_table
(
'block_career_groups'
);
// Adding fields to table block_career_groups.
$table
->
add_field
(
'id'
,
XMLDB_TYPE_INTEGER
,
'10'
,
null
,
XMLDB_NOTNULL
,
XMLDB_SEQUENCE
,
null
);
$table
->
add_field
(
'group_id'
,
XMLDB_TYPE_INTEGER
,
'8'
,
null
,
XMLDB_NOTNULL
,
null
,
'0'
);
$table
->
add_field
(
'career'
,
XMLDB_TYPE_INTEGER
,
'8'
,
null
,
XMLDB_NOTNULL
,
null
,
'0'
);
$table
->
add_field
(
'timeadded'
,
XMLDB_TYPE_INTEGER
,
'10'
,
null
,
XMLDB_NOTNULL
,
null
,
null
);
// Adding keys to table block_career_groups.
$table
->
add_key
(
'primary'
,
XMLDB_KEY_PRIMARY
,
[
'id'
]);
$table
->
add_key
(
'career'
,
XMLDB_KEY_FOREIGN
,
[
'career'
],
'block_career'
,
[
'id'
]);
$table
->
add_key
(
'group_id'
,
XMLDB_KEY_FOREIGN
,
[
'group_id'
],
'groups'
,
[
'id'
]);
// Conditionally launch create table for block_career_groups.
if
(
!
$dbman
->
table_exists
(
$table
))
{
$dbman
->
create_table
(
$table
);
}
// Career savepoint reached.
upgrade_block_savepoint
(
true
,
2021070101
,
'career'
);
}
return
true
;
}
?>
version.php
View file @
70e006e2
...
...
@@ -27,8 +27,9 @@
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
*/
defined
(
'MOODLE_INTERNAL'
)
||
die
();
$plugin
->
version
=
2021070500
;
$plugin
->
requires
=
2014051200
;
$plugin
->
component
=
'block_career'
;
$plugin
->
release
=
'v1.1'
;
...
...
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