Note: You are currently viewing documentation for Moodle 2.2. Up-to-date documentation for the latest stable version is available here: grade/import/smart/index.

grade/import/smart/index: Difference between revisions

From MoodleDocs
No edit summary
 
(24 intermediate revisions by 3 users not shown)
Line 5: Line 5:
Below you will find a quick description of each file type followed by a more detailed description.<br />
Below you will find a quick description of each file type followed by a more detailed description.<br />


At LSU, we call idnumber LSUID and username PAWSid. Please substitute accordingly.
== Miscellaneous Information ==
 
At LSU, all idnumbers start with 89.
 
We call idnumber LSUID; and username PAWSid. Please substitute accordingly. This can be changed in the language editing interface or by editing the language file directly.


If you want to change any of the following formats for use outside of LSU (most are useful as is), please edit classes.php.
If you want to change any of the following formats for use outside of LSU (most are useful as is), please edit classes.php.
This importer is for '''ONE''' grade per imported file. '''You can import multiple files at once''' and they '''do not''' need to be of the same file type.
Grades can be in ANY of the following formats: 090.00, 90.00, 90 and will be accepted for all file types.
CSV files can have any number of spaces following or preceding commas to no ill effect.


== Fixed Width Formats ==
== Fixed Width Formats ==


'''Fixed Width'''<br />
'''Fixed Width'''
89XXXXXXX 100.00<br />
<pre>89XXXXXXX 100.00
89XXXXXXX 090.00<br />
89XXXXXXX 090.00</pre>


'''MEC (Measurement and Evaluation Center)'''<br />
'''MEC (Measurement and Evaluation Center)'''
XXX89XXXXXXX 100.00<br />
<pre>XXX89XXXXXXX 100.00
XXX89XXXXXXX 090.00<br />
XXX89XXXXXXX 090.00</pre>
 
'''MEC (Measurement and Evaluation Center)'''
<pre>XXX89XXXXXXXHUE ELLIS                098 1 GEOG100102 88080002 098 100.00
XXX89XXXXXXXTHE TIGER MIKE          056 1 GEOG100102 88080002 056 090.00</pre>


The fixed width file formats are generally .txt files or files without an extension (coming from alternate sources) and use spaces as a method of creating the appearance of columns.<br />
The fixed width file formats are generally .txt files or files without an extension (coming from alternate sources) and use spaces as a method of creating the appearance of columns.<br />
Line 23: Line 37:
== Comma Separated idnumber File Formats ==
== Comma Separated idnumber File Formats ==


'''Anonymous Number'''<br />
'''Comma separated grade file keyed with idnumber that contains extra information'''
XXXX, 100.00<br />
<pre>89XXXXXXX, F, L, M, shortname, data, time, XX, XX, 100.00
XXXX, 90.00<br />
89XXXXXXX, F, L, M, shortname, data, time, XX, XX, 90.00</pre>


'''Comma seperated grade file keyed with idnumber that contains extra information'''<br />
'''Comma separated grade file keyed with idnumber that contains random extra information'''
89XXXXXXX, F, L, M, shortname, data, time, XX, XX, 100.00<br />
<pre>89XXXXXXX, {any number of fields}, 100.00
89XXXXXXX, F, L, M, shortname, data, time, XX, XX, 90.00<br />
89XXXXXXX, {any number of fields}, 90.00</pre>


'''Comma seperated grade file keyed with idnumber that contains random extra information'''<br />
'''Grade file with comma-separated values keyed with idnumber'''
89XXXXXXX, {any number of fields}, 100.00<br />
<pre>89XXXXXXX,100.00
89XXXXXXX, {any number of fields}, 90.00<br />
89XXXXXXX,90.00</pre>


'''Grade file with comma-separated values keyed with idnumber'''<br />
'''Grade file from the Maple software package (Please note there are no spaces surrounding the LSUID)'''
89XXXXXXX, 100.00<br />
<pre>Irrelevant line
89XXXXXXX, 90.00<br />
Irrelevant line
 
Name,89XXXXXXX,Grade%,Grade,Weighted%,Blank
'''Grade file from the Maple software package'''<br />
Name,89XXXXXXX,Grade%,Grade,Weighted%,Blank
Irrelevant line<br />
Irrelevant line
Irrelevant line<br />
Irrelevant line</pre>
Name, 89XXXXXXX, Grade %, Grade, Weighted %, Blank Field<br />
Name, 89XXXXXXX, Grade %, Grade, Weighted %, Blank Field<br />
Irrelevant line<br />
Irrelevant line<br />


The CSV idnumber files generally come with .csv but the extension is not important with this importer.<br />
The CSV idnumber files generally come with .csv but the extension is not important with this importer.<br />
Line 51: Line 61:
== Comma Separated username File Formats ==
== Comma Separated username File Formats ==


'''Comma seperated grade file keyed with username that contains extra information'''<br />
'''Comma separated grade file keyed with username that contains extra information'''
username, F, L, M, shortname, data, time, XX, XX, 100.00<br />
<pre>username, F, L, M, shortname, data, time, XX, XX, 100.00
username, F, L, M, shortname, data, time, XX, XX, 90.00<br />
username, F, L, M, shortname, data, time, XX, XX, 90.00</pre>


'''Comma seperated grade file keyed with username that contains random extra information'''<br />
'''Comma separated grade file keyed with username that contains random extra information'''
username, {any number of fields}, 100.00<br />
<pre>username, {any number of fields}, 100.00
username, {any number of fields}, 90.00<br />
username, {any number of fields}, 90.00</pre>


'''Grade file with comma-separated values keyed with username'''<br />
'''Grade file with comma-separated values keyed with username'''
username, 100.00<br />
<pre>username,100.00
username, 90.00<br />
username,90.00</pre>


The CSV username files generally come with .csv but the extension is not important with this importer.<br />
The CSV username files generally come with .csv but the extension is not important with this importer.<br />
Line 67: Line 77:
== Tab-delimited idnumber File Formats ==
== Tab-delimited idnumber File Formats ==


'''Tab-delimited grade file keyed with idnumber'''<br />
'''Tab-delimited grade file keyed with idnumber'''
89XXXXXXX 100.00<br />
<pre>89XXXXXXX 100.00
89XXXXXXX 90.00<br />
89XXXXXXX 90.00</pre>


'''Tab-delimited grade file keyed with idnumber that contains extra information'''<br />
'''Tab-delimited grade file keyed with idnumber that contains extra information'''
89XXXXXXX F, L M shortname data time XX XX 100.00<br />
<pre>89XXXXXXX F, L M shortname data time XX XX 100.00
89XXXXXXX F, L M shortname data time XX XX 90.00<br />
89XXXXXXX F, L M shortname data time XX XX 90.00</pre>


The Tab-delimited idnumber files generally come with .txt but the extension is not important with this importer.<br />
The Tab-delimited idnumber files generally come with .txt but the extension is not important with this importer.<br />
Line 79: Line 89:
== Tab-delimited username File Formats ==
== Tab-delimited username File Formats ==


'''Tab-delimited grade file keyed with username'''<br />
'''Tab-delimited grade file keyed with username'''
username 100.00<br />
<pre>username 100.00
username 90.00<br />
username 90.00</pre>


'''Tab-delimited grade file keyed with username that contains extra information'''<br />
'''Tab-delimited grade file keyed with username that contains extra information'''
username F, L M shortname data time XX XX 100.00<br />
<pre>username F, L M shortname data time XX XX 100.00
username F, L M shortname data time XX XX 90.00<br />
username F, L M shortname data time XX XX 90.00</pre>


The Tab-delimited username files generally come with .txt but the extension is not important with this importer.<br />
The Tab-delimited username files generally come with .txt but the extension is not important with this importer.<br />
== keypadid file formats ==
'''Grade file with comma-separated values keyed with keypadid'''
<pre>keypadid, 100.00
keypadid, 90.00</pre>
'''Grade file with tabbed values keyed with keypadid'''
<pre>keypadid 100.00
keypadid 90.00</pre>


== Import Instructions ==
== Import Instructions ==
Line 107: Line 127:
#Set permissions accordingly
#Set permissions accordingly
#Enjoy!
#Enjoy!
[[Category:Contributed code]]

Latest revision as of 20:34, 27 August 2009

Supported File Types

The LSU Smart File Importer accepts many file types of varying extension (.csv, .txt, or no extension at all) and auto detects between the various supported file types.

Below you will find a quick description of each file type followed by a more detailed description.

Miscellaneous Information

At LSU, all idnumbers start with 89.

We call idnumber LSUID; and username PAWSid. Please substitute accordingly. This can be changed in the language editing interface or by editing the language file directly.

If you want to change any of the following formats for use outside of LSU (most are useful as is), please edit classes.php.

This importer is for ONE grade per imported file. You can import multiple files at once and they do not need to be of the same file type.

Grades can be in ANY of the following formats: 090.00, 90.00, 90 and will be accepted for all file types.

CSV files can have any number of spaces following or preceding commas to no ill effect.

Fixed Width Formats

Fixed Width

89XXXXXXX 100.00
89XXXXXXX 090.00

MEC (Measurement and Evaluation Center)

XXX89XXXXXXX 100.00
XXX89XXXXXXX 090.00

MEC (Measurement and Evaluation Center)

XXX89XXXXXXXHUE ELLIS                098 1 GEOG100102 88080002 098 100.00
XXX89XXXXXXXTHE TIGER MIKE           056 1 GEOG100102 88080002 056 090.00

The fixed width file formats are generally .txt files or files without an extension (coming from alternate sources) and use spaces as a method of creating the appearance of columns.

Comma Separated idnumber File Formats

Comma separated grade file keyed with idnumber that contains extra information

89XXXXXXX, F, L, M, shortname, data, time, XX, XX, 100.00
89XXXXXXX, F, L, M, shortname, data, time, XX, XX, 90.00

Comma separated grade file keyed with idnumber that contains random extra information

89XXXXXXX, {any number of fields}, 100.00
89XXXXXXX, {any number of fields}, 90.00

Grade file with comma-separated values keyed with idnumber

89XXXXXXX,100.00
89XXXXXXX,90.00

Grade file from the Maple software package (Please note there are no spaces surrounding the LSUID)

Irrelevant line
Irrelevant line
Name,89XXXXXXX,Grade%,Grade,Weighted%,Blank
Name,89XXXXXXX,Grade%,Grade,Weighted%,Blank
Irrelevant line
Irrelevant line

The CSV idnumber files generally come with .csv but the extension is not important with this importer.

Comma Separated username File Formats

Comma separated grade file keyed with username that contains extra information

username, F, L, M, shortname, data, time, XX, XX, 100.00
username, F, L, M, shortname, data, time, XX, XX, 90.00

Comma separated grade file keyed with username that contains random extra information

username, {any number of fields}, 100.00
username, {any number of fields}, 90.00

Grade file with comma-separated values keyed with username

username,100.00
username,90.00

The CSV username files generally come with .csv but the extension is not important with this importer.

Tab-delimited idnumber File Formats

Tab-delimited grade file keyed with idnumber

89XXXXXXX	100.00
89XXXXXXX	90.00

Tab-delimited grade file keyed with idnumber that contains extra information

89XXXXXXX	F, 	L	M	shortname	data	time	XX	XX	100.00
89XXXXXXX	F, 	L	M	shortname	data	time	XX	XX	90.00

The Tab-delimited idnumber files generally come with .txt but the extension is not important with this importer.

Tab-delimited username File Formats

Tab-delimited grade file keyed with username

username		100.00
username		90.00

Tab-delimited grade file keyed with username that contains extra information

username		F, 	L	M	shortname	data	time	XX	XX	100.00
username		F, 	L	M	shortname	data	time	XX	XX	90.00

The Tab-delimited username files generally come with .txt but the extension is not important with this importer.

keypadid file formats

Grade file with comma-separated values keyed with keypadid

keypadid, 100.00
keypadid, 90.00

Grade file with tabbed values keyed with keypadid

keypadid		100.00
keypadid		90.00

Import Instructions

LSU Smart Importer.jpg
  1. Using the file upload dialog, choose a grade file from your filesystem.
  2. Click the "Validate File(s)" button.
  3. The importer will attempt to validate that file and find which format it is.
  4. If your file does not validate, you must fix any formatting errors in it.
  5. Once your file is validated, fix any idnumber errors that exist by using the interface that will pop up using the idnumber mapping system.
  6. Using the "Grade Item Mapping" select box, choose a grade item to map the soon the be imported grades to.
  7. You may add new files using the green "+" and red "-" buttons.
  8. Once all of your files are validated and you have selected grade item mappings for them, click the "Upload validated file(s) button.
  9. On the next screen, you will most likely be shown a success message.
  10. Any errors that occurred during the import will be reported as well.

Installation

  1. Copy the smart folder into your moodle_root/grade/import/ folder
  2. Copy the lang/en_utf8/gradeimport_smart.php file to your appropriate language folder
  3. Set permissions accordingly
  4. Enjoy!