views:

100

answers:

5

I don't really know how to explain this in a understandable way but here goes.

The project I'm working on is a web application that revolves around courses, and each course have a set of prerequisites, the problem is that I don't know a good way to present these for the user.

Example: To take course4, the person must have sold at least 600 products AND worked at least 90 days. She must also complete (Course1 OR Course2) AND Course 3.

Any ideas on how I should present this for the users in a simple way for them to understand. And how would I then go about and save it.

The project is being built in php for the back, html/jquery for the front and mysql as the storage.

/S

A: 

Tried Boolean Networks ?

Dan
I read that and thought "What's a TIRED boolean network?" . . . too early in the morning for SO, I'm off to get some tea . . .
Binary Worrier
Nope I haven't since I don't knew about them. Gonna read up on them now.
Skoog
A: 

Programmed approach

  • represent the prerequisites in the code with some structure
  • make a parser for this structure what can turn it into grammatically correct sentences
  • you have to expand the parser as soon as you need i18n

Easy way

  • Store the prerequisites written in clear english sentences and dosplay it to the visitor

If I were you, I'd convince myself to take away my pride and go with the 2nd.

Csaba Kétszeri
A: 

I assume that your problem here is the UI layout rather than the technology underneath.

I guess it depends on how complicated the logic gets, but I'd try to display a list of 'and' items where each item is a group of one or more 'or' options (like a list of radio button groups). The list would be rows in a table, with the 'or' options indented.

If you need to display 'A and (B or C) and (D or E or F)' it'll work. If you need '(A and B) or (C and D)', then an 'or' option must be able to contain a string of 'ands'. I doubt it would get any more complicated than that, but if it did you could just handle it recursively and keep indenting sub-clauses.

AndrewS
+1  A: 

It sounds like you just need the UI help, right?

My university always did something like a list:

  • One of: Course A, Course B, Course C
  • Course D
  • Course E

Then you could add some nice classes to the list items for missing/completed requirements:

<ul class="prerequisites">
  <li class="complete">One of:
    <a href="courseA">Course A</a>,
    <a href="courseB" class="complete">Course B</a>,
    <a href="courseC">Course C</a></li>
  <li class="complete"><a href="courseD" class="complete">Course D</a></li>
  <li><a href="courseE">Course E</a></li>
</ul>

With some CSS doing things like...

ul.prerequisites {
  list-style-type: none;
}

ul.prerequisites li {
  background-image: url(images/incomplete.gif); /* a red X maybe? */
  padding-left: 14px;
}

ul.prerequisites li.complete {
  background-image: url(images/complete.gif); /* maybe a green check */
}

ul.prerequisites li a.complete {
  text-decoration: line-through;
}
James Socol
With this list, how would you go about and do a prerequisites chain ofCourse 1 AND (Course 2 OR Course 3)
Skoog
Each list item is a requirement, they're ANDs. <li>Course 1</li> <li>One of: Course 2, Course 3</li>
James Socol
A: 

Another option would be to let the user select/enter the things they have done, eg. Type in how many products they have sold and how many days they have worked and select check boxes for the courses they have completed. Once you have that you can display which courses are available to them and possibly show what they need to do to qualify for the other ones

rojoca
The problem is, that the users will not be able to enter this information.
Skoog