This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
en:create:filter-items [03.12.2014 08:22] – [Task 4] alexander.ritter | en:create:filter-items [19.05.2021 21:17] (current) – [The Long Way] sophia.schauer | ||
---|---|---|---|
Line 19: | Line 19: | ||
The objective now is that the second question only shows the media (items) for selection that were given at least a score of 2 in the first question. | The objective now is that the second question only shows the media (items) for selection that were given at least a score of 2 in the first question. | ||
- | ==== Abstract | + | |
+ | ==== Solution in a Nutshell | ||
The function '' | The function '' | ||
Line 32: | Line 33: | ||
</ | </ | ||
- | The rest of the manual describes how you work with arrays in detail. This is particularly interesting if '' | + | The rest of the manual describes how you work with arrays in detail. This is particularly interesting if '' |
+ | |||
==== The Long Way ==== | ==== The Long Way ==== | ||
Line 44: | Line 46: | ||
for ($i=1; $i< | for ($i=1; $i< | ||
- | | + | |
// Does the item have a score of at least 2? | // Does the item have a score of at least 2? | ||
- | if (value($ID) >= 2) { | + | if (value($id) >= 2) { |
$itemlist[] = $i; | $itemlist[] = $i; | ||
} | } | ||
Line 95: | Line 97: | ||
for ($i=1; $i< | for ($i=1; $i< | ||
- | $ID = $question.' | + | $id = $question.' |
- | if (value($ID) >= 2) { | + | if (value($id) >= 2) { |
$itemlist[] = $i; | $itemlist[] = $i; | ||
} | } | ||
Line 243: | Line 245: | ||
question(' | question(' | ||
</ | </ | ||
+ | |||
The ID of the additional item has to be entered in order for this filter to work. Certainly, identifying the items present in the second question, but not in the first, could be done first of all. The function '' | The ID of the additional item has to be entered in order for this filter to work. Certainly, identifying the items present in the second question, but not in the first, could be done first of all. The function '' | ||
Line 256: | Line 259: | ||
question(' | question(' | ||
</ | </ | ||
+ |