Jump to content

User Defined Calculation


This topic is 7008 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Ok, this may be asking a little too much.

I have a single table with several fields containing grades pertaining to a student's performance in a single course. I want to have a calculation field that determines the student's average said course. The catch is that I want the calculation field to be defined by the user, on the data entry side.

Example:

I want to be able to create a single table that I can use as a template. This would allow me to reuse the template on as many courses as I need to. But, I need the instructor of each individual course to be able to able to specify the calculation used to define the students' average. However, the instructors aren' the smartest of people and I would be way too afraid that someone would accidentaly delete a field. Thus, I want to keep them out of the field definition box.

Is this even possible?

Link to comment
Share on other sites

It is possible, but IMHO inadvisable.

It is possible, using the Evaluate() function. The instructor would specify the calculation in a text field, and a calc field would evaluate the calculation.

However, the calculation would have to be specified in proper Filemaker syntax. If, as you say, the instructors aren't the smartest of people (and who is better suited to educate our young people?), then you know what you can expect.

What are the variables here? An average is an average. The only thing that comes to mind is weighted average. This could be quite easy to do by assigning a global weight field to each grade field. Let the instructors fill in the weights, and the calc can take it from there.

Link to comment
Share on other sites

I agree with comment, that user defined calcs aren't a great solution. I don't think they would appreciate fiddling with the formulas.

It's probably better to build a system that allows them to use the UI to set the scoring and weighting of an unlimited number of assignments or exams.

If you can say more about what kind of flexibility you need, I'm sure we can offer suggestions on how to make it work.

Link to comment
Share on other sites

I agree that it's not the greatest idea. Let me go a bit more in depth with the problem.

I have two tables: Course & Course Admin

Course contains raw scores of many things (quizzes, tests, labs, homework), a section number, and a term code. Each student has a record in Course.

Course Admin contains the point value of said many things (quizzes, tests, labs, homework), weight factors for each thing, a section number, and a term code. Each Course has a record in Course Admin. The relation between Course and Course Admin is based on the section number and the term code.

Course also contains Average fileds for each grade (Course::Lab1Score/Course Admin::Lab1Points).

The trick is that the instructor for each section wants to be able to have a different grading scheme for their own section. So, as I see it, I need a way to define a field in Course Admin that will allow the instructor to define their own calculation for their students' average.

Also, this example is still toned down. In the implemented database their are 7 courses involved, 2000+ students, and a couple hundred sections.

Link to comment
Share on other sites

I think you could allow the instructors to weight the quizzes, tests, labs, homework. (Of course, the weights would have to add up to 1.) They would not be entering any formulae and so there would be no FileMaker syntax or use of Evaluate. You could use an unstored calculation field which would then compute the students' grades based on the weighted value of their quizzes, tests, etc.

Link to comment
Share on other sites

They are already able to insert the weights themselves.

The big thing that i forgot to mention in my previous explanation is that the basic grade scheme is very different per instructor.

Some instructors want a normal grading scheme:

Grade = QuizAvg * QuizWeight + HWAvg * HWWeight + AttendanceAvg * AttendanceWeight + FinalAvg * FinalWeight

Other want something different:

Grade = ( Quiz1Avg + Quiz2Avg + Quiz3Avg + HWAvg - Min ( Quiz1Avg ; Quiz2Avg ; Quiz3Avg ; HWAvg ) * QuizWeight + ( FinalAvg * 2 / 3 + AttendanceAvg * 1 / 3 ) * FinalWeight

and there are a couple more variations.

I guess what I'm thinking of doing now is this: using evaluate to allow me to define a different grading scheme for each section, but biting the bullet and restricting the field access so that all calcs have to be entered by me. This would give me the flexibility that I need while still maintaining security from end users that won't understand the syntax of FM.

Thoughts?

Link to comment
Share on other sites

You could perhaps go one extra step, and construct something like a calculator. The user would be able to build a formula, but only by assembling pre-defined elements. It all depends on how many options you'd need to give them. At some point it becomes easier to get the formula from them and enter it yourself.

Link to comment
Share on other sites

Merlyn,

What I would do is design a simplified version of the Specify Calculation dialog. It should contain only the fields, operators and functions you want them to have access to. You could either display the resulting function in a non-editable text field, or come up with some graphical way of displaying the formula (maybe something like a multi-level outline of the formula).

To make it even easier for some teachers you might want to have an even simpler view where they just define categories and weights. I know most of my teachers scored with something like this, i.e. exams were 50% of the grade, quizzes were 25%, homework was 15% and attendance was 10%. You could add a couple of extras like an option to drop the lowest grade of a group.

Link to comment
Share on other sites

Thanks guys. I'll have to come up with some sort of calculator to do that. Thanks to everyone for all of your help. The evaluate command makes my life so much better.

Link to comment
Share on other sites

A different approach would be to straw poll the teachers for their favorite formulas and build a selector into the DB which offers the ability to select any one of the predefined calculations, say from a value list. (Use an evaluation so that a text field can contain the calculation.)

You can edit the value list to easily add new calculations as instructors or preferences change, and as the DB admin, you can set it up so that you can do that while the DB is live, and with minimal negative impact.

Link to comment
Share on other sites

This topic is 7008 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.