Source for file settings.php

Documentation is available at settings.php

  1. <?php
  2.  
  3. require_once($CFG->dirroot.'/mod/sloodle/sl_config.php');
  4.  
  5.  
  6. // // VERSION INFO // //
  7.  
  8. // Construct the version info
  9. // Sloodle version
  10. $str print_heading(get_string('sloodleversion','sloodle').': '.(string)SLOODLE_VERSION'center'4'main'true);
  11. // Release number
  12. $sloodlemodule get_record('modules''name''sloodle');
  13. $releasenum 0;
  14. if ($sloodlemodule !== FALSE$releasenum $sloodlemodule->version;
  15. $str .= print_heading(get_string('releasenum','sloodle').': '.(string)$releasenum'center'5'main'true);
  16.  
  17. // Construct a help button to
  18. $hlp helpbutton('version_numbers'get_string('help:versionnumbers''sloodle')'sloodle'truefalse''true);
  19.  
  20. // Add the version info section
  21. $settings->add(new admin_setting_heading('sloodle_version_header'"Version Info ".$hlp$str));
  22.  
  23.  
  24.  
  25. // // GENERAL SETTINGS // //
  26.  
  27. // General settings section
  28. $settings->add(new admin_setting_heading('sloodle_settings_header'"Sloodle Settings"''));
  29.  
  30. // Get some localization strings
  31. $stryes get_string('yes');
  32. $strno get_string('no');
  33.  
  34.     
  35. // This selection box determines whether or not auto-registration is allowed on the site
  36. $settings->addnew admin_setting_configselect(
  37.                 'sloodle_allow_autoreg',
  38.                 '',
  39.                 get_string('autoreg:allowforsite','sloodle').helpbutton('auto_registration'get_string('help:autoreg','sloodle')'sloodle'truefalse''true),
  40.                 0,
  41.                 array(=> $strno=> $stryes)
  42. ));
  43.  
  44.     
  45. // This selection box determines whether or not auto-enrolment is allowed on the site
  46. $settings->addnew admin_setting_configselect(
  47.                 'sloodle_allow_autoenrol',
  48.                 '',
  49.                 get_string('autoenrol:allowforsite','sloodle').helpbutton('auto_enrolment'get_string('help:autoenrol','sloodle')'sloodle'truefalse''true),
  50.                 0,
  51.                 array(=> $strno=> $stryes)
  52. ));
  53.  
  54. // This text box will let the user set a number of days after which active objects should expire
  55. $settings->addnew admin_setting_configtext(
  56.                 'sloodle_active_object_lifetime',
  57.                 get_string('activeobjectlifetime''sloodle'),
  58.                 get_string('activeobjectlifetime:info''sloodle').helpbutton('object_authorization'get_string('activeobjects','sloodle')'sloodle'truefalse''true),
  59.                 7));
  60.                 
  61.  
  62. // This text box will let the user set a number of days after which user objects should expire
  63. $settings->addnew admin_setting_configtext(
  64.                 'sloodle_user_object_lifetime',
  65.                 get_string('userobjectlifetime''sloodle'),
  66.                 get_string('userobjectlifetime:info''sloodle').helpbutton('user_objects'get_string('userobjects','sloodle')'sloodle'truefalse''true),
  67.                 21));
  68.  
  69. ?>

Documentation generated on Fri, 17 Jul 2009 11:02:26 +0100 by phpDocumentor 1.4.0