Launch activity directly in command-line
Closed, ResolvedPublic

Description

Add a new command:

  • --launch "activity name" to start the activity directly.

If the activity does not exist, start on the menu and display a log in the console

And another one to list all the activities that we can launch:
--list
will list all the possible activities and return without displaying GCompris

Related Objects

jjazeix created this task.Nov 25 2020, 9:49 PM

It would also be interesting to pass a list of activities to only run these ones, possibly with activity options sets included.
We could use this to offer list of activities able to cover a whole sequence very easily.

Exemple:

  • launch "learn_3.gc"

with in learn_3.gc

falling dice until 3
falling dominos until 3
click and color until 3 etc etc

If we would be able to add datasets to this learn_3.gc we could already let the possibility to teachers to create their own lessons, without too much work on our side.

echarruau updated the task description. (Show Details)Dec 17 2020, 2:05 PM
mariamfahmy removed mariamfahmy as the assignee of this task.Feb 11 2021, 7:15 PM
mariamfahmy added a subscriber: mariamfahmy.
hadron added a subscriber: hadron.Feb 13 2022, 8:48 AM
jjazeix renamed this task from Launch activities directly in command-line to Launch activity directly in command-line.Apr 24 2022, 8:01 PM
jjazeix updated the task description. (Show Details)
jjazeix claimed this task.
jjazeix moved this task from Backlog to WIP on the GCompris: Improvements board.

I've tested quickly, it works fine.

Though one little issue: as it still first display the menu for a few seconds before launching the activity, if the user clicks on an item in the menu before the activity is started, it will start this activity instead of the one specified in the command line (and same for bottom bar items that open a page like about, help or config buttons...).

Probably this could be fixed by adding a condition disabling the click on menu items and the bottom bar items at the beginning if an activity is specified in the command line (though those clicks should probably only be disabled before the specified activity is launched, so that after it's launched they are re-enabled to allow using the bottom bar and select other activities when returning to the menu page... something like this).

I've tested quickly, it works fine.

Though one little issue: as it still first display the menu for a few seconds before launching the activity, if the user clicks on an item in the menu before the activity is started, it will start this activity instead of the one specified in the command line (and same for bottom bar items that open a page like about, help or config buttons...).

Probably this could be fixed by adding a condition disabling the click on menu items and the bottom bar items at the beginning if an activity is specified in the command line (though those clicks should probably only be disabled before the specified activity is launched, so that after it's launched they are re-enabled to allow using the bottom bar and select other activities when returning to the menu page... something like this).

I've though of disabling the intro music but not this, I'll take a look. Thanks for testing!