• last updated 14 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
improve handling of errors, which are triggerd by the error template

acs-lang reform:

when calling lang::util::convert_to_i18n, do not always register a en_US translation, which will be otherwise always overridden. Instead, let lang::message::register make sure that a en_US message exists and create it only when needed as a fallback. Before, lang::message::register would return an error when e.g. a new message keys was registered for de_DE and no en_US was there. Now the en_US will be just created on the fly.

This does not break current automated tests

remove unnecessary parameter package_id

    • -2
    • +1
    /openacs-4/packages/xowiki/tcl/weblog-procs.tcl
fix comment and missing arguemnt

use package based instantiate_forms method

whitespace cleanup

whitespace changes

make "instantiate_forms" a method of packages

this reads better than the previous variant based on the Weblog class.

    • -3
    • +3
    /openacs-4/packages/xowiki/xowiki.info
    • -7
    • +6
    /openacs-4/packages/xowiki/tcl/folder-procs.tcl
    • -5
    • +4
    /openacs-4/packages/xowiki/tcl/import-procs.tcl
    • -5
    • +4
    /openacs-4/packages/xowiki/tcl/package-procs.tcl
    • -26
    • +8
    /openacs-4/packages/xowiki/tcl/weblog-procs.tcl
    • -2
    • +2
    /openacs-4/packages/xowiki/tcl/xowiki-procs.tcl
whitespace changes

prefer name resolver over "my" call

Complete content::folder api coverage

Whitespace cleanup

Fix content::extlink::delete: this actually just means to delete the content item

Test public content::extlink api: this test will expose that content::extlink::delete is broken (wrong stored procedure called)

file content-extlink-procs.tcl was initially added on branch oacs-5-10.

MenuBar reform

- MenuBars are now easier programmatically extensible (easier to maintain)

- refactored code, reduced scatted definitions (all configurations

at the same place)

- unified templating:

use body property @body.folderHTML@ instead of @folderhtml@

From the former API calls only "update_items" has changed,

all existing configurations (i.e. via folders or package parameter)

should continue to work.

== Changes:

One can now extend menubars via menu entry definition

{config -use YOURCONFIG -class YOURCLASS}

in two directions:

a) subclassing

define your own menubar class YOURCLASS, which should

be a subclass of ::xowiki::MenuBar

b) provide your own configuration method to provide

a more tailored configuration. This is performed

by defining a method "config=YOURCONFIG" for ::xowiki::MenuBar

The latter method is used for test-items, which can define a

test item folder by using

-- extra_menu_entries ---

{config -use test-items}

instead of

-- extra_menu_entries ---

{entry -name New.Item.TextInteraction -form en:edit-interaction.wf -query p.item_type=Text}

{entry -name New.Item.ShortTextInteraction -form en:edit-interaction.wf -query p.item_type=ShortText}

{entry -name New.Item.SCInteraction -form en:edit-interaction.wf -query p.item_type=SC}

{entry -name New.Item.MCInteraction -form en:edit-interaction.wf -query p.item_type=MC}

{entry -name New.Item.ReorderInteraction -form en:edit-interaction.wf -query p.item_type=Reorder}

{entry -name New.Item.UploadInteraction -form en:edit-interaction.wf -query p.item_type=Upload}

{entry -name New.App.OnlineExam -form en:online-exam.wf}

{entry -name New.App.InclassQuiz -form en:inclass-quiz.wf}

{entry -name New.App.InclassExam -form en:inclass-exam.wf}

See below for the definition of the "test-items" configuration method,

which is based on the default definitions. In general, the definition

in this method can be performed via menu-entries (same syntax as in

other menu entries) or via the MenuBar API (e.g. calling

":add_menu_item ...").

All configurations follow the following definition order

where later entries can refine earlier entries:

- package level: package parameter ExtraMenuEntries

- configuration method: use standard or tailored confguration methods

- per-folder definition: content of the extra_menu_entries

Note that the menu entry definition language supports as well

adding/clearing menus, etc., so almost everything can be refined.

I've noticed that the tlf* code has several scattered menu

definitions, which are as well done in every case differently.

By these definition one can define e.g. a learning-app folder (where

"New" can be used to define new app folders), and the app folders can

provide their own "New" entries, e.g. for clickers and

others. E.g. For "clickers" there is already on non-oo definition to

achieve similar things (which should be altered to the new method),

but on other places, there are some hard-coded definitions for root

folders, etc. The menubars of the learning-apps should be made this

way more consistent with the rest (e.g. using "New", supporting "table

of contents" for clipboard interactions, etc.)

namespace eval ::xowiki {

::xowiki::MenuBar instproc config=test-items {

{-bind_vars {}}

-current_page:required

-package_id:required

-folder_link:required

-return_url

} {

:config=default \

-bind_vars $bind_vars \

-current_page $current_page \

-package_id $package_id \

-folder_link $folder_link \

-return_url $return_url

return {

{clear_menu -menu New}

{entry -name New.Item.TextInteraction -form en:edit-interaction.wf -query p.item_type=Text}

{entry -name New.Item.ShortTextInteraction -form en:edit-interaction.wf -query p.item_type=ShortText}

{entry -name New.Item.SCInteraction -form en:edit-interaction.wf -query p.item_type=SC}

{entry -name New.Item.MCInteraction -form en:edit-interaction.wf -query p.item_type=MC}

{entry -name New.Item.ReorderInteraction -form en:edit-interaction.wf -query p.item_type=Reorder}

{entry -name New.Item.UploadInteraction -form en:edit-interaction.wf -query p.item_type=Upload}

{entry -name New.App.OnlineExam -form en:online-exam.wf}

{entry -name New.App.InclassQuiz -form en:inclass-quiz.wf}

{entry -name New.App.InclassExam -form en:inclass-exam.wf}

}

}

}

    • -2
    • +2
    /openacs-4/packages/xowiki/xowiki.info
    • -137
    • +122
    /openacs-4/packages/xowiki/tcl/folder-procs.tcl
    • -85
    • +268
    /openacs-4/packages/xowiki/tcl/menu-procs.tcl
fix link such it works without a redirect

  1. … 152 more files in changeset.
Take also care to populate the newly created column with the group ids coming from automatically generated message keys

file upgrade-5.10.0d13-5.10.0d14.sql was initially added on branch oacs-5-10.

Create index on the new lang_message_keys.object_id column

file upgrade-5.10.0d12-5.10.0d13.sql was initially added on branch oacs-5-10.

Deprecate content::folder::get_folder_from_package as it assumes there will be one folder per package, not true in general

Replace its only occurrence in the codebase with a local reimplementation (expecting the assessment package to comply with this restriction and not have more than 1 folder per package instance)

Deprecate a proc broken since we have memory of it (~17 years)

Whitespace cleanup

Fix typo

file upgrade-5.10.0d11-5.10.0d12.sql was initially added on branch oacs-5-10.

acs-lang reform

Provide an optional object_id which can be used to register message keys that will be bound to the lifecycle of an acs-object. When the object is deleted, so will the message key.

This is useful for groups that automatically define a message key for their pretty name. Tcl api was already aware of this and would cleanup such message keys, but other idioms e.g. stored procedures used to delete groups would leave leftovers behind. These can become relatively numerous on group-intensive systems such as LEARN.

Other future usages for this new feature might be the automatic localization of xowiki FormPage properties.

New test checking that no leftover groups localizations are still there on the system

Cleanup test message key

Test covering the automagical localization of group pretty names