Closed (fixed)
Project:
Quiz
Version:
6.x-4.x-dev
Component:
Code - Import/Export
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
10 Jul 2009 at 01:49 UTC
Updated:
24 Jul 2009 at 16:30 UTC
Let's use a bit of JQuery to only show the CSV Field Separator if CSV has been chosen as the input format. It should be hidden otherwise as it's confusing.
Comments
Comment #1
turadg commentedCommitted to 4.x dev. Please review.
Comment #2
sivaji_ganesh_jojodae commentedThere is a typo in your JQuery statement. The import format is set to "Comma separated value" when the page loads but your jQuery statement does not attempts to shows the field separator text box. Hide/Show works only when the select item changes. Here the fix
Comment #3
turadg commentedThat wasn't a typo. That was a commit-o.
I forgot to include my edit to questions.admin.inc that put Aiken first instead of CSV. I thought the alphabetical order would be more clear.
Your code is more robust in that it can handle CSV being first or not, which I think is an improvement.
I had used the text name and searched for "Separator" in case there were other import types that have separators, (e.g. Moodle CSV) but I agree it's better to use the option val() instead, in the case of localization. We could search for "csv" in the val() string to accommodate non-native csv, but that can be done later if it's ever necessary.
thanks for the review.