Browse Source

Fixing gradebook edition

Julio Montoya 13 years ago
parent
commit
78b445d419
1 changed files with 3 additions and 4 deletions
  1. 3 4
      main/inc/lib/grade_model.lib.php

+ 3 - 4
main/inc/lib/grade_model.lib.php

@@ -77,8 +77,8 @@ class GradeModel extends Model {
         // Setting the defaults
         
         $defaults = $this->get($id);        
-        
-        $components = $this->get_components($defaults['grade_model_id']);
+                
+        $components = $this->get_components($defaults['id']);
         
         if ($action == 'edit') {
             if (!empty($components)) { 
@@ -117,8 +117,7 @@ class GradeModel extends Model {
             
             $renderer->setElementTemplate($template_title, 'components['.$i.'][title]');
             $renderer->setElementTemplate($template_percentage ,  'components['.$i.'][percentage]');
-            $renderer->setElementTemplate($template_acronym , 'components['.$i.'][acronym]');
-            //$renderer->setElementTemplate($template_acronym , 'components['.$i.'][item_id]');
+            $renderer->setElementTemplate($template_acronym , 'components['.$i.'][acronym]');            
         }
         $form->addElement('advanced_settings', get_lang('AllMustWeight100'));