bozoh / moodle-mod_simplecertificate

It's NOT RECOMMENDED to install version below 2.2.6 (MOODLE_31), due a security issues See more in README
17 stars 44 forks source link

Simplecertificate - Can't Install Plugin on moodle 3.7 #264

Open MarcoMag68 opened 7 months ago

MarcoMag68 commented 7 months ago

Describe the bug during plugin setup received error

Debug info: Table 'mdl_simplecertificate' already exists CREATE TABLE mdl_simplecertificate ( id BIGINT(10) NOT NULL auto_increment, course BIGINT(10) NOT NULL DEFAULT 0, name VARCHAR(255) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '', intro LONGTEXT COLLATE utf8mb4_general_ci NOT NULL, introformat SMALLINT(4) DEFAULT 0, timecreated BIGINT(10) NOT NULL DEFAULT 0, timemodified BIGINT(10) DEFAULT 0, width SMALLINT(4) NOT NULL DEFAULT 297, height SMALLINT(4) NOT NULL DEFAULT 210, certificateimage LONGTEXT COLLATE utf8mb4_general_ci, certificatetext LONGTEXT COLLATE utf8mb4_general_ci NOT NULL, certificatetextformat LONGTEXT COLLATE utf8mb4_general_ci NOT NULL, certificatetextx SMALLINT(4) NOT NULL DEFAULT 10, certificatetexty SMALLINT(4) NOT NULL DEFAULT 50, coursename VARCHAR(255) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '', outcome BIGINT(10) NOT NULL DEFAULT 0, certdate BIGINT(10) NOT NULL DEFAULT -2, certdatefmt VARCHAR(255) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '', certgrade BIGINT(10) NOT NULL DEFAULT 0, gradefmt BIGINT(10) NOT NULL DEFAULT 0, emailfrom VARCHAR(255) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '', emailothers LONGTEXT COLLATE utf8mb4_general_ci, emailteachers TINYINT(1) NOT NULL DEFAULT 0, reportcert TINYINT(1) DEFAULT 0, delivery TINYINT(1) NOT NULL DEFAULT 0, requiredtime BIGINT(10) NOT NULL DEFAULT 0, printqrcode TINYINT(1) NOT NULL DEFAULT 1, qrcodefirstpage TINYINT(1) NOT NULL DEFAULT 0, codex SMALLINT(4) NOT NULL DEFAULT 10, codey SMALLINT(4) NOT NULL DEFAULT 10, enablesecondpage TINYINT(1) NOT NULL DEFAULT 0, secondpagex SMALLINT(4) DEFAULT 10, secondpagey SMALLINT(4) DEFAULT 50, secondpagetext LONGTEXT COLLATE utf8mb4_general_ci, secondpagetextformat LONGTEXT COLLATE utf8mb4_general_ci, secondimage LONGTEXT COLLATE utf8mb4_general_ci, timestartdatefmt VARCHAR(255) COLLATE utf8mb4_general_ci, CONSTRAINT PRIMARY KEY (id) ) ENGINE = InnoDB DEFAULT COLLATE = utf8mb4_general_ci ROW_FORMAT=Compressed COMMENT='Simple Certificate' ; CREATE TABLE mdl_simplecertificate_issues ( id BIGINT(10) NOT NULL auto_increment, certificateid BIGINT(10) NOT NULL DEFAULT 0, userid BIGINT(10) NOT NULL DEFAULT 0, certificatename LONGTEXT COLLATE utf8mb4_general_ci NOT NULL, code VARCHAR(36) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '', timecreated BIGINT(10) NOT NULL DEFAULT 0, timedeleted BIGINT(10), haschange TINYINT(1) NOT NULL DEFAULT 0, pathnamehash VARCHAR(40) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '', coursename VARCHAR(255) COLLATE utf8mb4_general_ci NOT NULL DEFAULT '--', CONSTRAINT PRIMARY KEY (id) ) ENGINE = InnoDB DEFAULT COLLATE = utf8mb4_general_ci ROW_FORMAT=Compressed COMMENT='Issues of simplecertificate module' Error code: ddlexecuteerror ×Stack trace: line 492 of /lib/dml/moodle_database.php: ddl_change_structure_exception thrown line 1070 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end() line 77 of /lib/ddl/database_manager.php: call to mysqli_native_moodle_database->change_database_structure() line 425 of /lib/ddl/database_manager.php: call to database_manager->execute_sql_arr() line 370 of /lib/ddl/database_manager.php: call to database_manager->install_from_xmldb_structure() line 782 of /lib/upgradelib.php: call to database_manager->install_from_xmldb_file() line 524 of /lib/upgradelib.php: call to upgrade_plugins_modules() line 1869 of /lib/upgradelib.php: call to upgrade_plugins() line 694 of /admin/index.php: call to upgrade_noncore()

Moodle Version(s) The moodle version (Moodle 3.7)

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.