Index: lams_central/web/includes/javascript/authoring/authoringProperty.js
===================================================================
diff -u -rc46a8e8187c1ca4e546ed2952192e63606d95c68 -re933b2edb118a2d5064d415418fd8a2f2d38947e
--- lams_central/web/includes/javascript/authoring/authoringProperty.js (.../authoringProperty.js) (revision c46a8e8187c1ca4e546ed2952192e63606d95c68)
+++ lams_central/web/includes/javascript/authoring/authoringProperty.js (.../authoringProperty.js) (revision e933b2edb118a2d5064d415418fd8a2f2d38947e)
@@ -1580,31 +1580,29 @@
// find all tools that support input and fill dropdown menu with their titles
var emptyOption = $(''),
gradebookDropdown = $('.propertiesContentFieldGradebook', activity.propertiesContent).empty().append(emptyOption);
-
- // build output dropdown and bind data to each option
- $.each(activity.outputDefinitions,function(){
- var suffix = '';
- switch(this.type) {
- case 'OUTPUT_COMPLEX' :
- suffix = LABELS.COMPLEX_OUTPUT_SUFFIX;
- break;
-
- case 'OUTPUT_LONG' :
- suffix = LABELS.RANGE_OUTPUT_SUFFIX;
- break;
- };
-
- var option = $('')
- .text(this.name + ' ' + suffix)
- .val(this.name)
- .appendTo(gradebookDropdown);
-
- // select the default output
- if (activity.gradebookToolOutputDefinitionName == this.name) {
- option.attr('selected', 'selected');
- emptyOption.attr('selected', null);
- }
- });
+ // build output dropdown and bind data to each option
+ $.each(activity.outputDefinitions,function(){
+ if (this.type != 'OUTPUT_LONG') {
+ return true;
+ }
+ optionsFound = true;
+
+ var option = $('')
+ .text(this.name + ' ' + LABELS.RANGE_OUTPUT_SUFFIX)
+ .val(this.name)
+ .appendTo(gradebookDropdown);
+
+ // select the default output
+ if (activity.gradebookToolOutputDefinitionName == this.name) {
+ option.attr('selected', 'selected');
+ emptyOption.attr('selected', null);
+ }
+ });
+
+ if (gradebookDropdown.children().length == 1) {
+ // no valid ouput definitons, remove the whole row
+ gradebookDropdown.parent().parent().remove();
+ }
},