install.php 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /**
  3. * This script is included by main/admin/settings.lib.php and generally
  4. * includes things to execute in the main database (settings_current table)
  5. */
  6. $t_settings = Database::get_main_table(TABLE_MAIN_SETTINGS_CURRENT);
  7. $t_options = Database::get_main_table(TABLE_MAIN_SETTINGS_OPTIONS);
  8. $sql = "INSERT INTO $t_settings
  9. (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable)
  10. VALUES
  11. ('bbb_plugin', '', 'radio', 'Extra', 'false', 'BigBlueButtonEnableTitle','BigBlueButtonEnableComment',NULL,NULL, 1)";
  12. Database::query($sql);
  13. $sql = "INSERT INTO $t_options (variable, value, display_text) VALUES ('bbb_plugin', 'true', 'Yes')";
  14. Database::query($sql);
  15. $sql = "INSERT INTO $t_options (variable, value, display_text) VALUES ('bbb_plugin', 'false', 'No')";
  16. Database::query($sql);
  17. $sql = "INSERT INTO $t_settings
  18. (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable)
  19. VALUES
  20. ('bbb_plugin_host', '', 'textfield', 'Extra', '192.168.0.100', 'BigBlueButtonHostTitle','BigBlueButtonHostComment',NULL,NULL, 1)";
  21. Database::query($sql);
  22. $sql = "INSERT INTO $t_settings
  23. (variable, subkey, type, category, selected_value, title, comment, scope, subkeytext, access_url_changeable)
  24. VALUES
  25. ('bbb_plugin_salt', '', 'textfield', 'Extra', '', 'BigBlueButtonSecuritySaltTitle','BigBlueButtonSecuritySaltComment',NULL,NULL, 1)";
  26. Database::query($sql);
  27. // update existing courses to add conference settings
  28. $t_courses = Database::get_main_table(TABLE_MAIN_COURSE);
  29. $sql = "SELECT id, code, db_name FROM $t_courses ORDER BY id";
  30. $res = Database::query($sql);
  31. while ($row = Database::fetch_assoc($res)) {
  32. $t_course = Database::get_course_table(TABLE_COURSE_SETTING,$row['db_name']);
  33. $sql_course = "INSERT INTO $t_course (variable,value,category) VALUES ('big_blue_button_meeting_name','','plugins')";
  34. $r = Database::query($sql_course);
  35. $sql_course = "INSERT INTO $t_course (variable,value,category) VALUES ('big_blue_button_attendee_password','','plugins')";
  36. $r = Database::query($sql_course);
  37. $sql_course = "INSERT INTO $t_course (variable,value,category) VALUES ('big_blue_button_moderator_password','','plugins')";
  38. $r = Database::query($sql_course);
  39. $sql_course = "INSERT INTO $t_course (variable,value,category) VALUES ('big_blue_button_welcome_message','','plugins')";
  40. $r = Database::query($sql_course);
  41. $t_tool = Database::get_course_table(TABLE_TOOL_LIST,$cdb);
  42. $sql_course = "INSERT INTO $t_tool VALUES ((NULL, 'videoconference','../../plugin/bbb/start.php','visio.gif','".string2binary(api_get_setting('course_create_active_tools', 'videoconference'))."','0','squaregrey.gif','NO','_self','plugin','0'))";
  43. $r = Database::query($sql_course);
  44. }