Bug Report

Bug in template processing with parameters without values [#1619]

Back to forum

New reply

 
reply
Unkx80: Bug in template processing with parameters without values (2008-11-10 10:28) [#5258]

The template call

{{Problem | hint}}

does not work but the template call

{{Problem | hint=1}}

works. The results are

  • Attempts?
  • Solution?

and

  • Hint?
  • Attempts?
  • Solution?

respectively.

Note that the value of the template call is not used at all.

X
HermanHiddema: Re: Bug in template processing with parameters without values (2008-11-10 11:52) [#5259]

in the first case, ie {{Problem | hint}}, the first argument is considered to be a nameless argument, and can be tested as <if 1></if> and used as {{{1}}}.

In the case of the problem template, one way to do it like the first case might be to use:

  • [/attempts]
  • [/solution]
  • <if 1>[/{{{1}}}]</if>
  • <if 2>[/{{{1}}}]</if>

which would allow {{problem|hint|discussion}} to work.

Unkx80: Re: Bug in template processing with parameters without values (2008-11-10 12:47) [#5262]

Okay, got it. Case closed then.

 
Back to forum

New reply


[Welcome to Sensei's Library!]
RecentChanges
StartingPoints
About
RandomPage
Search position
Page history
Latest page diff
Partner sites:
Go Teaching Ladder
Goproblems.com
Login / Prefs
Tools
Sensei's Library