Reply To: Preloading resources by experiment list

PennController for IBEX Forums Support Preloading resources by experiment list Reply To: Preloading resources by experiment list

#6589
Jeremy
Keymaster

Hi,

I understand you are talking about preloading resources for different groups from a zip file. To be clear, when not part of a zip file, only the resources used in the trials effectively presented to the current group are fetched.

If you need to preload different zip files depending on group, you can use the variable __counter_value_from_server__. Say you have a total of 4 groups:

EDIT: this code will not immediately work on https://expt.pcibex.net or https://ibex.spellout.net/ — see this message if you’re running your study at one of those two domains

switch (__counter_value_from_server__ % 4) {
  case 0:
    PreloadZip("https://my.server/path/to/zip_a.zip");
    break;
  case 1:
    PreloadZip("https://my.server/path/to/zip_b.zip");
    break;
  case 2:
    PreloadZip("https://my.server/path/to/zip_c.zip")
    break;
  case 3:
  default:
    PreloadZip("https://my.server/path/to/zip_d.zip")
    break;
}

Let me know if you have any questions

Jeremy