Pass through to provider GradebookColumnAdminSession.get_gradebook_column_form_for_update
10955
def get_gradebook_column_form(self, *args, **kwargs):
        """"""
        # Implemented from kitosid template for -
        # osid.resource.ResourceAdminSession.get_resource_form_for_update
        # This method might be a bit sketchy. Time will tell.
        if isinstance(args[-1], list) or 'gradebook_column_record_types' in kwargs:
            return self.get_gradebook_column_form_for_create(*args, **kwargs)
        else:
            return self.get_gradebook_column_form_for_update(*args, **kwargs)
129180
def query_by_grader(self, grader_id, end_time=None, start_time=None):
        
        path = {}
        data = {}
        params = {}

        # REQUIRED - PATH - grader_id
        """ID"""
        path["grader_id"] = grader_id

        # OPTIONAL - start_time
        """The beginning of the time range from which you want events."""
        if start_time is not None:
            params["start_time"] = start_time

        # OPTIONAL - end_time
        """The end of the time range from which you want events."""
        if end_time is not None:
            params["end_time"] = end_time

        self.logger.debug("GET /api/v1/audit/grade_change/graders/{grader_id} with query params: {params} and form data: {data}".format(params=params, data=data, **path))
        return self.generic_request("GET", "/api/v1/audit/grade_change/graders/{grader_id}".format(**path), data=data, params=params, all_pages=True)
68248
def get_gradebook_form(self, *args, **kwargs):
        """"""
        # Implemented from kitosid template for -
        # osid.resource.BinAdminSession.get_bin_form_for_update_template
        # This method might be a bit sketchy. Time will tell.
        if isinstance(args[-1], list) or 'gradebook_record_types' in kwargs:
            return self.get_gradebook_form_for_create(*args, **kwargs)
        else:
            return self.get_gradebook_form_for_update(*args, **kwargs)
939265
public static function get_gradingform_instances($definitionid, $since = 0) {
        global $DB, $CFG;
        require_once("$CFG->dirroot/grade/grading/form/lib.php");
        $params = self::validate_parameters(self::get_gradingform_instances_parameters(),
            array('definitionid' => $definitionid,
                'since' => $since));
        $instances = array();
        $warnings = array();

        $definition = $DB->get_record('grading_definitions',
            array('id' => $params['definitionid']),
            'areaid,method', MUST_EXIST);
        $area = $DB->get_record('grading_areas',
            array('id' => $definition->areaid),
            'contextid,component', MUST_EXIST);

        $context = context::instance_by_id($area->contextid);
        require_capability('moodle/grade:managegradingforms', $context);

        $gradingmanager = get_grading_manager($definition->areaid);
        $controller = $gradingmanager->get_controller($definition->method);
        $activeinstances = $controller->get_all_active_instances ($params['since']);
        $details = $controller->get_external_instance_filling_details();
        if ($details == null) {
            $warnings[] = array(
                'item' => 'definition',
                'itemid' => $params['definitionid'],
                'message' => 'Fillings unavailable because get_external_instance_filling_details is not defined',
                'warningcode' => '1'
            );
        }
        $getfilling = null;
        if (method_exists('gradingform_'.$definition->method.'_instance', 'get_'.$definition->method.'_filling')) {
            $getfilling = 'get_'.$definition->method.'_filling';
        } else {
            $warnings[] = array(
                'item' => 'definition',
                'itemid' => $params['definitionid'],
                'message' => 'Fillings unavailable because get_'.$definition->method.'_filling is not defined',
                'warningcode' => '1'
            );
        }
        foreach ($activeinstances as $activeinstance) {
            $instance = array();
            $instance['id'] = $activeinstance->get_id();
            $instance['raterid'] = $activeinstance->get_data('raterid');
            $instance['itemid'] = $activeinstance->get_data('itemid');
            $instance['rawgrade'] = $activeinstance->get_data('rawgrade');
            $instance['status'] = $activeinstance->get_data('status');
            $instance['feedback'] = $activeinstance->get_data('feedback');
            $instance['feedbackformat'] = $activeinstance->get_data('feedbackformat');
            // Format the feedback text field.
            $formattedtext = external_format_text($activeinstance->get_data('feedback'),
                $activeinstance->get_data('feedbackformat'),
                $context->id,
                $area->component,
                'feedback',
                $params['definitionid']);
            $instance['feedback'] = $formattedtext[0];
            $instance['feedbackformat'] = $formattedtext[1];
            $instance['timemodified'] = $activeinstance->get_data('timemodified');

            if ($details != null && $getfilling != null) {
                $fillingdata = $activeinstance->$getfilling();
                $filling = array();
                foreach ($details as $key => $value) {
                    $filling[$key] = self::format_text($fillingdata[$key],
                        $context->id,
                        $area->component,
                        $params['definitionid']);
                }
                $instance[$definition->method] = $filling;
            }
            $instances[] = $instance;
        }
        $result = array(
            'instances' => $instances,
            'warnings' => $warnings
        );
        return $result;
    }
1278339
def _update_from_database(self):
        
        collection = JSONClientValidated('assessment',
                                         collection='AssessmentSection',
                                         runtime=self._runtime)
        self._my_map = collection.find_one({'_id': self._my_map['_id']})
166108
def _update_record(attribute_names = @attributes.keys)
        # check if class has custom update method
        if self.class.custom_update_method
          # run before/after callbacks defined in model
          run_callbacks(:update) do
            # timestamp
            if should_record_timestamps?
              current_time = current_time_from_proper_timezone

              timestamp_attributes_for_update_in_model.each do |column|
                column = column.to_s
                next if will_save_change_to_attribute?(column)
                write_attribute(column, current_time)
              end
            end
            # update just dirty attributes
            if partial_writes?
              # Serialized attributes should always be written in case they've been
              # changed in place.
              update_using_custom_method(changed | (attributes.keys & self.class.columns.select { |column| column.is_a?(Type::Serialized) }))
            else
              update_using_custom_method(attributes.keys)
            end
          end
        else
          super
        end
      end
598369
def get_proficiency_form(self, *args, **kwargs):
        """"""
        # Implemented from kitosid template for -
        # osid.resource.ResourceAdminSession.get_resource_form_for_update
        # This method might be a bit sketchy. Time will tell.
        if isinstance(args[-1], list) or 'proficiency_record_types' in kwargs:
            return self.get_proficiency_form_for_create(*args, **kwargs)
        else:
            return self.get_proficiency_form_for_update(*args, **kwargs)
889509
def update_column_data(self, id, user_id, course_id, column_data_content):
        
        path = {}
        data = {}
        params = {}

        # REQUIRED - PATH - course_id
        """ID"""
        path["course_id"] = course_id

        # REQUIRED - PATH - id
        """ID"""
        path["id"] = id

        # REQUIRED - PATH - user_id
        """ID"""
        path["user_id"] = user_id

        # REQUIRED - column_data[content]
        """Column content.  Setting this to blank will delete the datum object."""
        data["column_data[content]"] = column_data_content

        self.logger.debug("PUT /api/v1/courses/{course_id}/custom_gradebook_columns/{id}/data/{user_id} with query params: {params} and form data: {data}".format(params=params, data=data, **path))
        return self.generic_request("PUT", "/api/v1/courses/{course_id}/custom_gradebook_columns/{id}/data/{user_id}".format(**path), data=data, params=params, single_item=True)
723347
def get_gradebook(self):
        
        if self._lookup_session is None:
            mgr = get_provider_manager('GRADING', runtime=self._runtime, proxy=self._proxy)
            self._lookup_session = mgr.get_gradebook_lookup_session(proxy=getattr(self, "_proxy", None))
        return self._lookup_session.get_gradebook(Id(self._my_map['id']))
816698
@Override
	public int update(DataColumnConstraints dataColumnConstraints)
			throws SQLException {

		UpdateBuilder<DataColumnConstraints, Void> ub = updateBuilder();
		ub.updateColumnValue(DataColumnConstraints.COLUMN_MIN,
				dataColumnConstraints.getMin());
		ub.updateColumnValue(DataColumnConstraints.COLUMN_MIN_IS_INCLUSIVE,
				dataColumnConstraints.getMinIsInclusive());
		ub.updateColumnValue(DataColumnConstraints.COLUMN_MAX,
				dataColumnConstraints.getMax());
		ub.updateColumnValue(DataColumnConstraints.COLUMN_MAX_IS_INCLUSIVE,
				dataColumnConstraints.getMaxIsInclusive());
		ub.updateColumnValue(DataColumnConstraints.COLUMN_DESCRIPTION,
				dataColumnConstraints.getDescription());

		setUniqueWhere(ub.where(), dataColumnConstraints.getConstraintName(),
				dataColumnConstraints.getConstraintType(),
				dataColumnConstraints.getValue());

		PreparedUpdate<DataColumnConstraints> update = ub.prepare();
		int updated = update(update);

		return updated;
	}
1365884
def save_grade_system(self, grade_system_form, *args, **kwargs):
        """"""
        # Implemented from kitosid template for -
        # osid.resource.ResourceAdminSession.update_resource
        if grade_system_form.is_for_update():
            return self.update_grade_system(grade_system_form, *args, **kwargs)
        else:
            return self.create_grade_system(grade_system_form, *args, **kwargs)
1891
def get_book_form(self, *args, **kwargs):
        """"""
        # Implemented from kitosid template for -
        # osid.resource.BinAdminSession.get_bin_form_for_update_template
        # This method might be a bit sketchy. Time will tell.
        if isinstance(args[-1], list) or 'book_record_types' in kwargs:
            return self.get_book_form_for_create(*args, **kwargs)
        else:
            return self.get_book_form_for_update(*args, **kwargs)
639802
def _set_gradebook_view(self, session):
        """"""
        if self._gradebook_view == COMPARATIVE:
            try:
                session.use_comparative_gradebook_view()
            except AttributeError:
                pass
        else:
            try:
                session.use_plenary_gradebook_view()
            except AttributeError:
                pass
18672
private void updateColumnMetaData(CfDef columnFamily, ByteBuffer columnName, String validationClass)
    {
        ColumnDef column = getColumnDefByName(columnFamily, columnName);

        if (column != null)
        {
            // if validation class is the same - no need to modify it
            if (column.getValidation_class().equals(validationClass))
                return;

            // updating column definition with new validation_class
            column.setValidation_class(validationClass);
        }
        else
        {
            List<ColumnDef> columnMetaData = new ArrayList<ColumnDef>(columnFamily.getColumn_metadata());
            columnMetaData.add(new ColumnDef(columnName, validationClass));
            columnFamily.setColumn_metadata(columnMetaData);
        }
    }
1070541
public function updateTemplate()
    {
        $codeDb = $validationCode = $form = '';

        $form = $this->buildFormOpen();

        foreach ($this->columns as $key => $value) {
            if ($value['COLUMN_NAME'] !== 'id') {
                if ($this->isFormGenerator == false) {
                    $codeDb .= $this->generateDbCode($value);
                }

                $form .= $this->generateFormElements($value);
            }
        }

        $form .= $this->buildFormCloseTags();

        $this->setForm($form);
        $this->setDbCode($codeDb);
    }
207919
def update_authorized?(record = nil, column = nil)
      (!nested? || !nested.readonly?) && (record || self).authorized_for?(crud_type: :update, column: column, reason: true)
    end
386375
def get_gradebook_columns_by_search(self, gradebook_column_query, gradebook_column_search):
        """"""
        # Implemented from azosid template for -
        # osid.resource.ResourceSearchSession.get_resources_by_search_template
        if not self._can('search'):
            raise PermissionDenied()
        return self._provider_session.get_gradebook_columns_by_search(gradebook_column_query, gradebook_column_search)