Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-38590 data: Reformat settings form

AMOS BEGIN
 CPY [allowcomments,mod_glossary],[allowcomments,mod_data]
AMOS END
  • Loading branch information...
commit 8783e17b0fca49c066adeddc78f695b112a2c8ce 1 parent 8963212
@FMCorz FMCorz authored
Showing with 24 additions and 17 deletions.
  1. +5 −4 mod/data/lang/en/data.php
  2. +19 −13 mod/data/mod_form.php
View
9 mod/data/lang/en/data.php
@@ -29,6 +29,7 @@
$string['addentries'] = 'Add entries';
$string['addtemplate'] = 'Add template';
$string['advancedsearch'] = 'Advanced search';
+$string['allowcomments'] = 'Allow comments on entries';
$string['alttext'] = 'Alternative text';
$string['approve'] = 'Approve';
$string['approved'] = 'Approved';
@@ -204,7 +205,7 @@
$string['mapexistingfield'] = 'Map to {$a}';
$string['mapnewfield'] = 'Create a new field';
$string['mappingwarning'] = 'All old fields not mapped to a new field will be lost and all data in that field will be removed.';
-$string['maxentries'] = 'Maximum entries';
+$string['maxentries'] = 'Maximum number of entries';
$string['maxentries_help'] = 'The maximum number of entries a student is allowed to submit for this activity.';
$string['maxsize'] = 'Maximum size';
$string['menu'] = 'Menu';
@@ -262,7 +263,7 @@
$string['notinjectivemap'] = 'Not an injective map';
$string['notopenyet'] = 'Sorry, this activity is not available until {$a}';
$string['number'] = 'Number';
-$string['numberrssarticles'] = 'RSS articles';
+$string['numberrssarticles'] = 'Entries in the RSS feed';
$string['numnotapproved'] = 'Pending';
$string['numrecords'] = '{$a} entries';
$string['ods'] = '<acronym title="OpenDocument Spreadsheet">ODS</acronym> (OpenOffice)';
@@ -287,9 +288,9 @@
$string['recorddeleted'] = 'Entry deleted';
$string['recordsnotsaved'] = 'No entry was saved. Please check the format of the uploaded file.';
$string['recordssaved'] = 'entries saved';
-$string['requireapproval'] = 'Require approval?';
+$string['requireapproval'] = 'Approval required';
$string['requireapproval_help'] = 'If enabled, entries require approving by a teacher before they are viewable by everyone.';
-$string['requiredentries'] = 'Required entries';
+$string['requiredentries'] = 'Entries required for completion';
$string['requiredentries_help'] = 'The number of entries a student is required to submit before the activity can be considered complete.';
$string['requiredentriestoview'] = 'Entries required before viewing';
$string['requiredentriestoview_help'] = 'The number of entries a student is required to submit before they can view entries from other students.
View
32 mod/data/mod_form.php
@@ -25,18 +25,17 @@ function definition() {
$this->add_intro_editor(true, get_string('intro', 'data'));
- $mform->addElement('date_selector', 'timeavailablefrom', get_string('availablefromdate', 'data'), array('optional'=>true));
-
- $mform->addElement('date_selector', 'timeavailableto', get_string('availabletodate', 'data'), array('optional'=>true));
-
- $mform->addElement('date_selector', 'timeviewfrom', get_string('viewfromdate', 'data'), array('optional'=>true));
+ // ----------------------------------------------------------------------
+ $mform->addElement('header', 'entrieshdr', get_string('entries', 'data'));
- $mform->addElement('date_selector', 'timeviewto', get_string('viewtodate', 'data'), array('optional'=>true));
+ $mform->addElement('selectyesno', 'approval', get_string('requireapproval', 'data'));
+ $mform->addHelpButton('approval', 'requireapproval', 'data');
+ $mform->addElement('selectyesno', 'comments', get_string('allowcomments', 'data'));
$countoptions = array(0=>get_string('none'))+
- (array_combine(range(1, DATA_MAX_ENTRIES),//keys
- range(1, DATA_MAX_ENTRIES)));//values
+ (array_combine(range(1, DATA_MAX_ENTRIES), // Keys.
+ range(1, DATA_MAX_ENTRIES))); // Values.
$mform->addElement('select', 'requiredentries', get_string('requiredentries', 'data'), $countoptions);
$mform->addHelpButton('requiredentries', 'requiredentries', 'data');
@@ -46,13 +45,20 @@ function definition() {
$mform->addElement('select', 'maxentries', get_string('maxentries', 'data'), $countoptions);
$mform->addHelpButton('maxentries', 'maxentries', 'data');
- $ynoptions = array(0 => get_string('no'), 1 => get_string('yes'));
- $mform->addElement('select', 'comments', get_string('comments', 'data'), $ynoptions);
+ // ----------------------------------------------------------------------
+ $mform->addElement('header', 'availibilityhdr', get_string('availability'));
- $mform->addElement('select', 'approval', get_string('requireapproval', 'data'), $ynoptions);
- $mform->addHelpButton('approval', 'requireapproval', 'data');
+ $mform->addElement('date_selector', 'timeavailablefrom', get_string('availablefromdate', 'data'), array('optional'=>true));
+
+ $mform->addElement('date_selector', 'timeavailableto', get_string('availabletodate', 'data'), array('optional'=>true));
+
+ $mform->addElement('date_selector', 'timeviewfrom', get_string('viewfromdate', 'data'), array('optional'=>true));
+
+ $mform->addElement('date_selector', 'timeviewto', get_string('viewtodate', 'data'), array('optional'=>true));
- if($CFG->enablerssfeeds && $CFG->data_enablerssfeeds){
+ // ----------------------------------------------------------------------
+ if ($CFG->enablerssfeeds && $CFG->data_enablerssfeeds) {
+ $mform->addElement('header', 'rsshdr', get_string('rss'));
$mform->addElement('select', 'rssarticles', get_string('numberrssarticles', 'data') , $countoptions);
}
Please sign in to comment.
Something went wrong with that request. Please try again.