•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the ColdFusion section within the Web Development category of DaniWeb, a massive community of 397,836 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,521 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our ColdFusion advertiser:
Views: 8607 | Replies: 3
![]() |
•
•
Join Date: May 2006
Location: Malaysia
Posts: 3
Reputation:
Rep Power: 0
Solved Threads: 0
Hi everyone. My name is Edd from Malaysia. I am a CF newbie. Cut to the chase. I have 2 weeks to complete my project which is a web application that students can log on and view/edit their personal details and check their grades. Teachers (who are also administrators) can also log in and change the students details and key-in their students grades for the subject they are teaching. My questions are :
1 - What function should I use to calculate the grades. For example if a teacher key-in 80 the grade should be A, 50 should be C and so on. I tried using the CFIF statement but failed. Any coding example?
2 - What should I do if I want the teachers to change the range of the grades for their subject. For example if an English teacher wanted to change the range 80-100 for grade A to 70-100 for his English subject and not affecting other teachers subjects.
3 - How do I generate a printable report, sort of like a result certificate? Any ideas for any other report I should be generating?
... really appreciate it if any CF masters here could help. Thank You in advance. Peace
eddvedder
1 - What function should I use to calculate the grades. For example if a teacher key-in 80 the grade should be A, 50 should be C and so on. I tried using the CFIF statement but failed. Any coding example?
2 - What should I do if I want the teachers to change the range of the grades for their subject. For example if an English teacher wanted to change the range 80-100 for grade A to 70-100 for his English subject and not affecting other teachers subjects.
3 - How do I generate a printable report, sort of like a result certificate? Any ideas for any other report I should be generating?
... really appreciate it if any CF masters here could help. Thank You in advance. Peace
eddvedder •
•
Join Date: Apr 2006
Posts: 27
Reputation:
Rep Power: 3
Solved Threads: 1
hi,
your problem description is actually very vague.
it would be great if you could be a bit more clear...
as far as i understand ur problem...
if u want to display grade based on the marks....<CFIF would have definetely helped....
look at the following sample
<CFOUTPUT>
<CFIF marks GT 80>
<TD>Grade A</TD>
<CFELSEIF marks GT 50 AND marks LT 80>
<TD>Grade B</TD>
</CFIF>
</CFOUTPUT>
hope this helps.......
your problem description is actually very vague.
it would be great if you could be a bit more clear...
as far as i understand ur problem...
if u want to display grade based on the marks....<CFIF would have definetely helped....
look at the following sample
<CFOUTPUT>
<CFIF marks GT 80>
<TD>Grade A</TD>
<CFELSEIF marks GT 50 AND marks LT 80>
<TD>Grade B</TD>
</CFIF>
</CFOUTPUT>
hope this helps.......
•
•
Join Date: Sep 2006
Location: Randall, MN
Posts: 2
Reputation:
Rep Power: 0
Solved Threads: 0
•
•
•
•
1 - What function should I use to calculate the grades. For example if a teacher key-in 80 the grade should be A, 50 should be C and so on. I tried using the CFIF statement but failed. Any coding example?...
eddvedder
There is no reason why a set of cfif statement couldn't work for the grade portion.
for example
<cfif grade gte 90>A <cfelseif grade gte 80>B <cfelseif grade gte 70>C <cfelseif grade gte 60>D <cfelseif len(grade) gt 0>F <!--- no grade given a student will get an incomplete ---> <cfelse>Incomplete </cfif>
You might supply a sample of you code to get a better result.
Jerry
Last edited by jeromemck : Sep 10th, 2006 at 9:15 pm.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb ColdFusion Marketplace
Similar Threads
- Grade Calculator HELP! (VB.NET)
- Please I need help formatting an output file and sorting the names! (C++)
- c++ Grade program (C++)
- Getting a Grade Average (C++)
- calculate the grades for a student using if..else statements. (Java)
Other Threads in the ColdFusion Forum
- Previous Thread: Personal preferance question
- Next Thread: need assistant


Linear Mode