|
@@ -13,31 +13,48 @@
|
|
|
|
|
|
$mform =& $this->_form;
|
|
|
|
|
|
- $mform->addElement('text', 'name', get_string('submissionName', 'formStrings'), array('size'=>'64'));
|
|
|
+ $mform->addElement('text', 'name', get_string('name', 'gradeimporter'), array('size'=>'64'));
|
|
|
$mform->setType('name', PARAM_TEXT);
|
|
|
- $mform->addRule('name', get_string('error_submissionNameField', 'formtrings'), 'required', null, 'client');
|
|
|
+ $mform->addRule('name', get_string('error_nameField', 'gradeimporter'), 'required', null, 'client');
|
|
|
|
|
|
- $mform->addElement('text', 'type', getString('submissionType', 'formStrings'), array('size'=>'64'));
|
|
|
- $mform->setType('type', PARAM_TEXT);
|
|
|
- $mform->addRule('type', get_string('error_submission', 'formStrings'), 'required', null, 'client');
|
|
|
+ $this->standard_intro_elements(get_string('description', 'gradeimporter'));
|
|
|
|
|
|
- $this->standard_intro_elements(get_string('description', 'formStrings'));
|
|
|
-
|
|
|
- $mform->addElement('filemanager', 'submissionFiles', getString('submissionFiles', 'formStrings'), null,
|
|
|
+ $mform->addElement('filemanager', 'submissionFiles', getString('submissionFiles', 'gradeimporter'), null,
|
|
|
array('subdirs' => 1, 'maxbytes' => $maxbytes, 'areamaxbytes' => $maxbytes, 'maxfiles' => -1,
|
|
|
'accepted_types' => array('*'), 'return_types' => FILE_INTERNAL | FILE_EXTERNAL));
|
|
|
//restrict accepted types to compacted?
|
|
|
-
|
|
|
- $ynoptions = array(0 => get_string('gradebookY', 'formStrings'),
|
|
|
- 1 => get_string('gradebookN', 'formStrings'));
|
|
|
+ $mform->addHelpButton('submissionFiles', 'helpsubmissionfiles', 'gradeimporter');
|
|
|
+ //csv delimiter
|
|
|
+
|
|
|
+ /* $csv_delimiter = array();
|
|
|
+ $csv_delimiter[1] = ',';
|
|
|
+ $csv_delimiter[2] = ';';
|
|
|
+ $csv_delimiter[3] = ':';
|
|
|
+ $csv_delimiter[4] = '\t';
|
|
|
+
|
|
|
+ $mform->addElement('select', 'csv_delimiter', get_string('choose_type_activity', 'iassign'), $csv_delimiter, array('onChange' => 'config_type(this.value);'));
|
|
|
+ $mform->setDefault('csv_delimiter', 1); // default csv_delimiter = 3
|
|
|
+ $mform->addHelpButton('csv_delimiter', 'helpcsvdelimiter', 'gradeimporter');
|
|
|
+*/
|
|
|
+ //submissionType
|
|
|
+
|
|
|
+
|
|
|
+ //if the grades go into the gradebook or not
|
|
|
+ $radioarray = array();
|
|
|
+ $radioarray[] = $mform->createElement('radio', 'gradebook', '', get_string('gradebookY','gradeimporter'), 1, $attributes);
|
|
|
+ $radioarray[] = $mform->createElement('radio', 'gradebook', '', get_string('gradebookN', 'gradeimporter'), 0, $attributes);
|
|
|
+ $mform->addgroup($radioarray, 'radioar', '', array(' '), false);
|
|
|
+ $mform->setDefault('gradebook', 0);
|
|
|
|
|
|
- $ynoptions = array(0 => get_string('visibilityOff', 'formStrings'),
|
|
|
- 1 => get_string('visibilityOn', 'formStrings'));
|
|
|
|
|
|
- $this->standard_coursemodule_elements();
|
|
|
+ //if students can se this submission or not
|
|
|
+ $visibilityar = array();
|
|
|
+ $visibilityar[] = $mform->createElement('radio', 'visibility', '', get_string('visibilityY','gradeimporter'), 1, $attributes);
|
|
|
+ $visibilityar[] = $mform->createElement('radio', 'visibility', '', get_string('visibilityN','gradeimporter'), 0, $attributes);
|
|
|
+ $mform->addgroup($visibilityar, 'radioar', '', array(' '), false);
|
|
|
+ $mform->setDefault('visibility', 1);
|
|
|
|
|
|
$this->add_action_buttons();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-?>
|