Do all of your conditional statements have the appropriate corresponding 
{{pass}} statements?

In the snippet you included I see 3 {{pass}} statements but only 2 
conditional statements.  Can you include the entire file?  Also, are you 
getting a traceback error?

-Jim

On Tuesday, October 24, 2017 at 11:01:22 AM UTC-5, mostwanted wrote:
>
>
> *Hi guys, I'm faced with a little problem, I'm developing a results 
> management system for a school, in the report preparation page i want there 
> to be displayed the student's percentage pass for a subject as well as 
> their grade for that subject, now the problem is nothing gets when i write 
> down the conditional statement to determine the grade, i don't know what 
> I'm doing wrong, this  is part of my code below: PLEASE HELP ME!!!!*
> {{extend 'layout.html'}}
> ...........................
> ..............................
> ...........................     
> {{for report in form:
>         perc=(float(report.marks)/float(report.total))*float(100)
>
> *#WITHOUT THE CONDITIONAL PART BELOW WHICH DETERMINES THE GRADE, 
> EVERYTHING WORKS WELL, THE PERCENTAGE PASS & ALL OTHER RESULTS ARE 
> DISPLAYED BUT WHEN I PUT IT IN NOTHING GETS DISPLAYED!!!*
>         if perc>=80:
>         grade='A'
>         }}
>         
>         
>         <tr>
>             <td>{{=report.term.term}}</td>
>             <td>{{=report.subject.subject_name}}</td>
>         <td>{{=report.marks}}</td>
>     <td>{{=report.total}}</td>
>               <td>
> {{=perc}}(%)
>             </td>
>             <td>
>                 {{=grade}}
>             </td>
>         <td>{{=report.comments}}</td>
>         </tr>
>         {{pass}}
> {{pass}}
>     </table>
> <br />
>     <hr />
> <textarea id = "myTextArea" rows = "10" cols = "90" placeholder="Teacher's 
> Overall Comments" style="border: solid 1px white; border-radius: 
> 5px;"></textarea><br /><br />
> Teacher: {{=classes1.class_name.teacher.name}} 
> {{=classes1.class_name.teacher.surname}}<br />
> <br />
>     <br />
> Signature:--------------------------------
> {{pass}}
> <br />
> <br />
> </div>
>     </div>
> </div>
> </div>
> <br />
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to