Adding default email_alert_manager_on_new_quiz setting see BT#8736

1.9.x
Julio Montoya 10 years ago
parent c35f08a87c
commit 5a5e6bc518
  1. 11
      main/inc/lib/add_course.lib.inc.php
  2. 2
      main/install/configuration.dist.php

@ -2373,13 +2373,20 @@ function fill_db_course($course_id, $course_repository, $language, $fill_with_ex
Database::query("INSERT INTO $tbl_course_homepage VALUES ($course_id, NULL, '".TOOL_COURSE_SETTING . "','course_info/infocours.php','reference.gif','$visible_for_course_admin','1','', 'NO','_self','admin','0')");
Database::query("INSERT INTO $tbl_course_homepage VALUES ($course_id, NULL, '".TOOL_COURSE_MAINTENANCE."','course_info/maintenance.php','backup.gif','$visible_for_course_admin','1','','NO','_self', 'admin','0')");
/* course_setting table (courseinfo tool) */
$defaultEmailExerciseAlert = 1;
if (isset($_configuration['email_alert_manager_on_new_quiz']) &&
!empty($_configuration['email_alert_manager_on_new_quiz'])
) {
$defaultEmailExerciseAlert = $_configuration['email_alert_manager_on_new_quiz'];
}
/* course_setting table (courseinfo tool) */
Database::query("INSERT INTO $TABLESETTING (c_id, variable,value,category) VALUES ($course_id, 'email_alert_manager_on_new_doc',0,'work')");
Database::query("INSERT INTO $TABLESETTING (c_id, variable,value,category) VALUES ($course_id, 'email_alert_on_new_doc_dropbox',0,'dropbox')");
Database::query("INSERT INTO $TABLESETTING (c_id, variable,value,category) VALUES ($course_id, 'allow_user_edit_agenda',0,'agenda')");
Database::query("INSERT INTO $TABLESETTING (c_id, variable,value,category) VALUES ($course_id, 'allow_user_edit_announcement',0,'announcement')");
Database::query("INSERT INTO $TABLESETTING (c_id, variable,value,category) VALUES ($course_id, 'email_alert_manager_on_new_quiz',1,'quiz')");
Database::query("INSERT INTO $TABLESETTING (c_id, variable,value,category) VALUES ($course_id, 'email_alert_manager_on_new_quiz', $defaultEmailExerciseAlert,'quiz')");
Database::query("INSERT INTO $TABLESETTING (c_id, variable,value,category) VALUES ($course_id, 'allow_user_image_forum',1,'forum')");
Database::query("INSERT INTO $TABLESETTING (c_id, variable,value,category) VALUES ($course_id, 'course_theme','','theme')");
Database::query("INSERT INTO $TABLESETTING (c_id, variable,value,category) VALUES ($course_id, 'allow_learning_path_theme','1','theme')");

@ -209,3 +209,5 @@ $_configuration['system_stable'] = NEW_VERSION_STABLE;
//$_configuration['pdf_logo_header'] = false;
// Order inscription user list by official_code
//$_configuration['order_user_list_by_official_code'] = false;
// Default course setting "email_alert_manager_on_new_quiz"
//$_configuration['email_alert_manager_on_new_quiz'] = 1;

Loading…
Cancel
Save