Uploaded image for project: 'Sakai'
  1. Sakai
  2. SAK-33355

Grade Override with numerical values issue when using a custom Grade Schema

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Verified
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 11.4, 12.0
    • Fix Version/s: 12.0, 19.0
    • Component/s: Gradebook
    • Labels:
    • 12 status:
      Resolved
    • 11 status:
      Please Merge
    • Test Plan:
      Hide
      1. Define a custom scale on /edu-services/gradebook-service/sakai-pack/src/webapp/WEB-INF/components.xml:
        		<property name="availableGradingScales">
        			<list>
        				<bean class="org.sakaiproject.service.gradebook.shared.GradingScaleDefinition">
        					<property name="uid" value="convencional"/>
        					<property name="name" value="Escala Convencional"/>
        					<property name="grades">
        						<list>
        							<value>Excel·lent</value>
        							<value>Notable</value>
        							<value>Aprovat</value>
        							<value>Suspens</value>
        						</list>
        					</property>
        					<property name="defaultBottomPercentsAsList">
        						<list>
        							<value>90.0</value>
        							<value>70.0</value>
        							<value>50.0</value>
        							<value>00.0</value>
        						</list>
        					</property>
        				</bean>
        			</list>
        		</property>
      1. Set it as default grading scale putting the value "convencional" on the property "defaultGradingScale".
      <property name="defaultGradingScale" value="convencional"/>
      1. Deploy the file to tomcat and restart (components/gradebook-service-pack/WEB-INF/components.xml)
      2. Create a new site (This is required to get the new scale).
      3. Check you are using the new grading schema.
      4. Try to put a numerical value on Grade Override.
      5. It should fails when you submit a value above than 50.
      Show
      Define a custom scale on /edu-services/gradebook-service/sakai-pack/src/webapp/WEB-INF/components.xml: <property name= "availableGradingScales" > <list> <bean class= "org.sakaiproject.service.gradebook.shared.GradingScaleDefinition" > <property name= "uid" value= "convencional" /> <property name= "name" value= "Escala Convencional" /> <property name= "grades" > <list> <value>Excel·lent</value> <value>Notable</value> <value>Aprovat</value> <value>Suspens</value> </list> </property> <property name= "defaultBottomPercentsAsList" > <list> <value>90.0</value> <value>70.0</value> <value>50.0</value> <value>00.0</value> </list> </property> </bean> </list> </property> Set it as default grading scale putting the value "convencional" on the property "defaultGradingScale". <property name= "defaultGradingScale" value= "convencional" /> Deploy the file to tomcat and restart (components/gradebook-service-pack/WEB-INF/components.xml) Create a new site (This is required to get the new scale). Check you are using the new grading schema. Try to put a numerical value on Grade Override. It should fails when you submit a value above than 50.

      Description

      Using the new functionallity of overriding the grade with numerical values, it can fail when you are using a custom Grade Schema (I'm not sure about if it will fail with all custom grading schemas, but you can create the same one to reproduce it).

      If you submit a numerical value, it will fail consistently if you submit more than 50.

      This is because the schema is not sorted descending by the value when getGradeFromNumber's function calculates the Grade based on Grading Schema.

       

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  jcebellan Jose Cebellán (Entornos de Formación)
                  Reporter:
                  jcebellan Jose Cebellán (Entornos de Formación)
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Git Source Code