Running an AMOS instance

Re: Running an AMOS instance

de către David Mudrák-
Număr de răspunsuri: 4
Fotografia lui Language pack maintainers

Hi Simon

Firstly, as Dan mentioned, AMOS was never expected to be run in multiple instances. There were a lot of low-level tweaks, hacks and direct SQL statements executed during the initial import of data and even later after that. At lang.moodle.org, we have a couple of additional shell scripts run via crontab that actually control all the AMOS jobs (tracking for changes in Moodle branches etc).

As mentioned by Dan, more effective way seems to be to implement your Totara extensions either via new plugins (forked off the standard ones) or via a custom local_totara plugin that would just provide extra strings you added to your own versions of plugins. That way, this local_totara plugin could be imported into lang.moodle.org and be translated as an ordinary plugin.

  1. AMOS_REPO_LANGS points to a local clone of the Git mirror of the CVS repository with translations. It was used to read all translations for Moodle 1.x (as since 2.x AMOS only is used). AMOS_REPO_MOODLE is path to the clone of moodle.git that AMOS tracks and gets English string changes from it.
  2. AMOS requires 2.3 because lang.moodle.org runs at 2.3. I'm not sure (can't remember) if it relies on some 2.3 specific features though.
  3. As you can easily find by grepping for that constant, it is not used any more in the code. It was required for the initial bootstrap (git log might tell you more). Those root commits in config-dist.php are probably just some fake commits that were replaced with real values in config.php.
  4. As said, we never expected someone being that crazy to run their own AMOS instance face cu ochiul so yes, modifications would be required and no HOWTO-RUN-OWN-AMOS.txt should be expected to be honest. Sorry.

In summary, let me discourage you from this approach. Better to reorganise your Totara modifications in a way that will allow you to use standard AMOS interface (via local_totara for example as mentioned above).

HTH

Ca răspuns la David Mudrák

Re: Running an AMOS instance

de către Simon Coggins-

Hi David,

Thanks for the reply, very helpful.

The web services plugin idea looks really cool but I'm not sure it will work for us as we've modified a fair number of core strings to better suit our target market. For example we have "audiences" instead of "cohorts" because it's better understood in the corporate space.

At the moment I can't really see how we could manage two sets of core strings within a single AMOS install although I'd be happy to be wrong!

Simon

Ca răspuns la Simon Coggins

Re: Running an AMOS instance

de către David Mudrák-
Fotografia lui Language pack maintainers

> how we could manage two sets of core strings

My idea was that Totara creates local_totara plugin that provides (among other things probably) a set of customized strings. Then, instead of modifying the strings in the core, you would just amend get_string() calls to use local_totara as the plugin. That way, you could have local_totara published in AMOS.

Note it was just a technical idea though. I'm not sure translators would be happy about having free and proprietary plugins mixed in AMOS, for example.

Ca răspuns la David Mudrák

Re: Running an AMOS instance

de către Simon Coggins-

Yes having a mixture of Moodle and Totara components in one site is potentially confusing so I can see why you might not want that. From our point of view I think it also makes sense to manage our own infrastructure.

We've actually managed to get an instance up and running, and have imported the lang strings for our 1.1 and 2.2 releases so it looks like it might just work! Many thanks for making the code available as it has saved us a lot of work implementing a similar system.

We have a few bug fixes and might well end up adding some additional features down the line - would you be interested in receiving pull requests?

Simon

Ca răspuns la Simon Coggins

Re: Running an AMOS instance

de către David Mudrák-
Fotografia lui Language pack maintainers

would you be interested in receiving pull requests?

Of course! AMOS code already contains some community contributions and I know there are many nice-to-have features in demand. Wish you luck and looking forward to hearing from you. d.