definition.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. $sloodleconfig = new SloodleObjectConfig();
  3. $sloodleconfig->primname = 'SLOODLE Scoreboard';
  4. $sloodleconfig->group = 'activity';
  5. $sloodleconfig->collections= array('SLOODLE 2.0');
  6. $sloodleconfig->aliases = array();
  7. // If this happens on the server side, tell me about it.
  8. $sloodleconfig->notify = array('awards_points_change', 'awards_points_deletion', 'awards_points_round_change'); // If this happens on the server side, tell me about it.
  9. // The original scoreboard sends a simple message per score change
  10. // ...but we want a complete page full of scores, so we define a callback that knows how to send it.
  11. $sloodleconfig->notify_callbacks = array(
  12. 'awards_points_change'=>'SloodleModuleAwards::PageScoreMessage',
  13. 'awards_points_deletion'=>'SloodleModuleAwards::PageScoreMessage',
  14. 'awards_points_round_change'=>'SloodleModuleAwards::PageScoreMessage'
  15. );
  16. $sloodleconfig->field_sets = array(
  17. 'generalconfiguration' => array(
  18. //'sloodlegroupid' => new SloodleConfigurationOptionText( 'sloodlegroupid', 'awards:group', '', 0, 4 ), // feature disabled
  19. //'sloodleshowallcontrollers' => new SloodleConfigurationOptionYesNo( 'sloodleshowallcontrollers', 'awards:showallcontrollers', 0 ), //feature disabled
  20. 'sloodlerefreshtime' => new SloodleConfigurationOptionText( 'sloodlerefreshtime', 'refreshtimeseconds', '', 600, 8 ),
  21. 'sloodlecurrencyid' => new SloodleConfigurationOptionCurrencyChoice( 'sloodlecurrencyid', 'awards:currency', '', '', 0),
  22. 'sloodleobjecttitle' => new SloodleConfigurationOptionText( 'sloodleobjecttitle', 'awards:scoreboardtitle', '', 'Scoreboard', 40 ),
  23. 'sloodleactivepage' => new SloodleConfigurationOptionText( 'sloodleactivepage', 'activepage', '', 1, 2 ),
  24. ),
  25. 'accesslevel' => array(
  26. 'sloodleobjectaccesslevelctrl' => $sloodleconfig->access_level_object_control_option()
  27. )
  28. );
  29. // The following array is for parameters that aren't supposed to be configured by the end user
  30. // ...but depend on the object definition.
  31. // In this case the code in our callback, SloodleModuleAwards::PageScoreMessage, needs to know this stuff.
  32. $sloodleconfig->fixed_parameters = array(
  33. //'maxlinesperpage' => 15, // How many lines are shown if we have more than one page full of scores
  34. 'linesperpage' => 20, // How many lines are shown if we have more than one page full of scores
  35. 'charactersperline' => 40, // How many lines are shown if we have more than one page full of scores
  36. );
  37. ?>