Skip to content

Commit

Permalink
MDL-69166 core_payment: Rename componentid to itemid
Browse files Browse the repository at this point in the history
  • Loading branch information
rezaies committed Oct 27, 2020
1 parent 2d7feb7 commit d5a9d6e
Show file tree
Hide file tree
Showing 22 changed files with 85 additions and 86 deletions.
4 changes: 2 additions & 2 deletions enrol/fee/templates/payment_region.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
Data attributes required for JS:
* data-component
* data-paymentarea
* data-componentid
* data-itemid
* data-cost
* data-description
Expand Down Expand Up @@ -60,7 +60,7 @@
id="gateways-modal-trigger-{{ uniqid }}"
data-component="enrol_fee"
data-paymentarea="fee"
data-componentid="{{instanceid}}"
data-itemid="{{instanceid}}"
data-cost="{{cost}}"
data-description={{# quote }}{{description}}{{/ quote }}
>
Expand Down
4 changes: 2 additions & 2 deletions lib/db/install.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4323,7 +4323,7 @@
<FIELD NAME="id" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="true"/>
<FIELD NAME="component" TYPE="char" LENGTH="100" NOTNULL="true" SEQUENCE="false" COMMENT="The plugin this payment belongs to."/>
<FIELD NAME="paymentarea" TYPE="char" LENGTH="50" NOTNULL="true" SEQUENCE="false" COMMENT="The name of payable area"/>
<FIELD NAME="componentid" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/>
<FIELD NAME="itemid" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/>
<FIELD NAME="userid" TYPE="int" LENGTH="10" NOTNULL="true" SEQUENCE="false"/>
<FIELD NAME="amount" TYPE="char" LENGTH="20" NOTNULL="true" SEQUENCE="false"/>
<FIELD NAME="currency" TYPE="char" LENGTH="3" NOTNULL="true" SEQUENCE="false"/>
Expand All @@ -4339,7 +4339,7 @@
</KEYS>
<INDEXES>
<INDEX NAME="gateway" UNIQUE="false" FIELDS="gateway"/>
<INDEX NAME="component-paymentarea-componentid" UNIQUE="false" FIELDS="component, paymentarea, componentid"/>
<INDEX NAME="component-paymentarea-itemid" UNIQUE="false" FIELDS="component, paymentarea, itemid"/>
</INDEXES>
</TABLE>
<TABLE NAME="infected_files" COMMENT="Table to store infected file details.">
Expand Down
4 changes: 2 additions & 2 deletions lib/db/upgrade.php
Original file line number Diff line number Diff line change
Expand Up @@ -2925,7 +2925,7 @@ function xmldb_main_upgrade($oldversion) {
$table->add_field('id', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, XMLDB_SEQUENCE, null);
$table->add_field('component', XMLDB_TYPE_CHAR, '100', null, XMLDB_NOTNULL, null, null);
$table->add_field('paymentarea', XMLDB_TYPE_CHAR, '50', null, XMLDB_NOTNULL, null, null);
$table->add_field('componentid', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, null);
$table->add_field('itemid', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, null);
$table->add_field('userid', XMLDB_TYPE_INTEGER, '10', null, XMLDB_NOTNULL, null, null);
$table->add_field('amount', XMLDB_TYPE_CHAR, '20', null, XMLDB_NOTNULL, null, null);
$table->add_field('currency', XMLDB_TYPE_CHAR, '3', null, XMLDB_NOTNULL, null, null);
Expand All @@ -2941,7 +2941,7 @@ function xmldb_main_upgrade($oldversion) {

// Adding indexes to table payments.
$table->add_index('gateway', XMLDB_INDEX_NOTUNIQUE, ['gateway']);
$table->add_index('component-paymentarea-componentid', XMLDB_INDEX_NOTUNIQUE, ['component', 'paymentarea', 'componentid']);
$table->add_index('component-paymentarea-itemid', XMLDB_INDEX_NOTUNIQUE, ['component', 'paymentarea', 'itemid']);

// Conditionally launch create table for payments.
if (!$dbman->table_exists($table)) {
Expand Down
2 changes: 1 addition & 1 deletion payment/amd/build/gateways_modal.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d5a9d6e

Please sign in to comment.