Forum .LRN Q&A: Re: Assessment items: SQL Discussions

Collapse
Posted by Malte Sussdorff on
We started the discussion on the SQL. A couple of questions started to come up:
  1. We have seen the table as_item_localized to localize items but we haven't found a way to localize the item choices. How are you going to do that?
  2. Why don't we use only the as_item_localized table for localization and remove the default_locale columns in as_items table?
  3. We also don't know if as_items table is an acs_object or cr_revision or both.
Answers given:
  1. This is a big issue. It might be best to create an as_localization table, consisting of (item_id, table_name, column_name, locale, value). Not sure how the database api will allow us to set the variable called "column_name" to the value "value" in the caller context.
  2. We don't want to hit the localization table with every request. Furthermore it is not necessary, as we do not assume that all content is internationlized (most items wont). Therefore overlaying is the name of the game (yet another of these OO like features I like)
  3. the question about how to use the ACS object system and more specifically the CR is one we need to work through before anyone starts investing a lot of effort in typing the SQL. In fact, if we do use the CR, we'll actually want to create much of the datamodel using the TCL interface to it. See this thread for more info: https://openacs.org/forums/message-view?message_id=162095 (I allude to this in the API page I started here https://openacs.org/projects/openacs/packages/assessment/design/api but sort of stalled on).
This is just a summary, thanks to Eduardo, Alvaro and Stan for the comments and questions.