? grade/edit/scale/.edit.php.swp Index: grade/edit/outcome/index.php =================================================================== RCS file: /cvsroot/moodle/moodle/grade/edit/outcome/index.php,v retrieving revision 1.10 diff -u -F ^f -r1.10 index.php --- grade/edit/outcome/index.php 10 Oct 2007 06:34:22 -0000 1.10 +++ grade/edit/outcome/index.php 4 Feb 2008 08:14:46 -0000 @@ -69,6 +69,7 @@ $stritems = get_string('items', 'grades'); $strcourses = get_string('courses'); $stredit = get_string('edit'); +$strexport = get_string('export', 'grades'); switch ($action) { case 'delete': @@ -115,7 +116,7 @@ $caneditcoursescales = $caneditsystemscales; } - +print('
' ."\n"); if ($courseid and $outcomes = grade_outcome::fetch_all_local($courseid)) { @@ -157,19 +158,25 @@ " src=\"$CFG->pixpath/t/delete.gif\" class=\"iconsmall\" alt=\"$strdelete\" /> "; } $line[] = $buttons; + + $buttons = ''; + $line[] = $buttons; + $data[] = $line; } $table = new object(); - $table->head = array($strfullname, $strshortname, $strscale, $stritems, $stredit); - $table->size = array('30%', '20%', '20%', '20%', '10%'); - $table->align = array('left', 'left', 'left', 'center', 'center'); + $table->head = array($strfullname, $strshortname, $strscale, $stritems, $stredit, $strexport); + $table->size = array('30%', '18%', '18%', '18%', '8%', '8%' ); + $table->align = array('left', 'left', 'left', 'center', 'center', 'center'); $table->width = '90%'; $table->data = $data; print_table($table); } + if ($outcomes = grade_outcome::fetch_all_global()) { - print_heading($strstandardoutcome); + + print_heading($strstandardoutcome); $data = array(); foreach($outcomes as $outcome) { $line = array(); @@ -210,12 +217,16 @@ " src=\"$CFG->pixpath/t/delete.gif\" class=\"iconsmall\" alt=\"$strdelete\" /> "; } $line[] = $buttons; + + $buttons = ''; + $line[] = $buttons; + $data[] = $line; } $table = new object(); - $table->head = array($strfullname, $strshortname, $strscale, $strcourses, $stritems, $stredit); - $table->size = array('30%', '20%', '20%', '10%', '10%', '10%'); - $table->align = array('left', 'left', 'left', 'center', 'center', 'center'); + $table->head = array($strfullname, $strshortname, $strscale, $strcourses, $stritems, $stredit, $strexport); + $table->size = array('30%', '19%', '19%', '8%', '8%', '8%', '8%'); + $table->align = array('left', 'left', 'left', 'center', 'center', 'center', 'center'); $table->width = '90%'; $table->data = $data; print_table($table); @@ -223,9 +234,44 @@ echo '
'; +echo "sesskey\" />"; +print(''); print_single_button('edit.php', array('courseid'=>$courseid), $srtcreatenewoutcome); echo '
'; +echo '
'; +$upload_max_filesize = get_max_upload_file_size($CFG->maxbytes); +$filesize = display_size($upload_max_filesize); + +$strimportoutcomes = get_string('importoutcomes', 'grades'); +$struploadthisfile = get_string('uploadthisfile'); +$strimportcustom = get_string('importcustom', 'grades'); +$strimportstandard = get_string('importstandard', 'grades'); +$strmaxsize = get_string("maxsize", "", $filesize); + +require_once($CFG->dirroot.'/lib/uploadlib.php'); + +echo '
'; +echo '
'; +echo ''; +echo ''; +echo ''; +echo ''; +if ($courseid && has_capability('moodle/grade:manage', get_context_instance(CONTEXT_SYSTEM))) { + echo ''; +} +echo ''; +echo ''; +echo '
    '; + echo '
  • '; + echo '
  • '; + echo '

'. $strimportoutcomes .'('. $strmaxsize .')

'. + upload_print_form_fragment(1,array('userfile'),null,false,null,$upload_max_filesize,0,true) . + '
'; +echo '
'; +echo ''; +echo '
'; + if ($courseid) { print_footer($course); } else { Index: lang/en_utf8/grades.php =================================================================== RCS file: /cvsroot/moodle/moodle/lang/en_utf8/grades.php,v retrieving revision 1.111.2.27 diff -u -F ^f -r1.111.2.27 grades.php --- lang/en_utf8/grades.php 3 Feb 2008 18:31:57 -0000 1.111.2.27 +++ lang/en_utf8/grades.php 4 Feb 2008 08:14:47 -0000 @@ -158,6 +158,7 @@ $string['export'] = 'Export'; $string['exportfeedback'] = 'Include feedback in export'; $string['exportplugins'] = 'Export plugins'; +$string['exportselectedoutcomes'] = 'Export selected outcomes'; $string['extracredit'] = 'Extra Credit'; $string['extracreditwarning'] = 'Note: Setting all items for a category to extra credit will effectively remove them from the grade calculation. Since there will be no point total'; $string['feedback'] = 'Feedback'; @@ -253,11 +254,16 @@ $string['identifier'] = 'Identify user by'; $string['import'] = 'Import'; $string['importcsv'] = 'Import CSV'; +$string['importcustom'] = 'Import as custom outcomes (only this course)'; +$string['importerror'] = 'An error occured, this script wasn\'t called with the right parameters.'; $string['importfailed'] = 'Import failed'; $string['importfeedback'] = 'Import feedback'; $string['importfile'] = 'Import file'; +$string['importfilemissing'] = 'No file was received, go back to the form and make sure to upload a valid file.'; +$string['importoutcomes'] = 'Import outcomes'; $string['importplugins'] = 'Import plugins'; $string['importpreview'] = 'Import preview'; +$string['importstandard'] = 'Import as standard outcomes'; $string['importsuccess'] = 'Grade import success'; $string['importxml'] = 'Import XML'; $string['incorrectcourseid'] = 'Course ID was incorrect';