Results 1 to 5 of 5

Thread: How Should I Set This Up

  1. #1
    Join Date
    Jul 2006

    How Should I Set This Up

    Hi, I have been working on a site for a while now and I am completely stuck on a certain section.

    The site allows parents to create small e-learning activities for young children, such as:

    01 - pick out a certain color crayon from a bunch of crayons (1 additional step required - choose the color crayon that you want the child to pick out)
    02 - pick out a certain animal from a bunch of animals (1 additional step required - choose the animal which you want the child to pick out)
    03 - move the square object into the square hole (NO additional steps required)

    + many more...

    If the parent chooses the first activity from the activity drop down menu when they are building the e-learning activity, they will then need to complete another step and enter in the color of the crayon... The same applies if they choose the second activity, as they will need to enter the animal name, HOWEVER, if the parent chooses the 3rd activity, no further steps / details are required.

    I'm trying to figure out how to store the activities into the database and i am confused about how to do this as there are 3 groups of content which need to be saved in the database:

    a - there are various different types of activities, which all have various different amounts of steps / settings required when building them which need to be displayed on the front end
    b - then there is the chosen settings itself which have been applied / entered for each activity type (such as a chosen color or chosen animal) when an activity type has been chosen
    c - and finally, there is the overall info itself that needs to be saved for each individual activity that is added to the site, such as child's name and parents name which are associated with each activity that has been created.

    I am very confused as to how I can store all of this info and link it all together in a database and also, how the front end will know how many settings need to be applied / displayed when a user selects an activity type from the drop down at the start.

    Thanks for reading all of the above, and a bigger thanks if you can provide any help on this...

  2. #2
    Join Date
    Dec 2011

    I am just gonna think out loud. Lets get some ideas on the thread.

    Parent selects activity
    Based on Activity, Parent selects activity type (colour of crayon)
    Store the relation in the database. In this case, Parent selects Monkey Worksheet with Blue crayon.

    Activities has many Activity types
    and Activity Types belong activity
    The combination of both need to be stored in the database.

    Now question: Do a certain Activity Type belong to any Activity? or does the activity type pertain only 1 activity? I.e. Only Monkey Worksheet can have blue crayons?

  3. #3
    Join Date
    Jul 2006
    Activities are made up of any activity type, however each activity type will have their own set of attributes for each type

  4. #4
    Join Date
    Dec 2011
    Quote Originally Posted by oo7ml View Post
    Activities are made up of any activity type, however each activity type will have their own set of attributes for each type
    Can those attributes belong to any activity?

    AT(activity type), AB(attribute)
    AT: Crayon -> AB: Blue
    AT: Marker -> AB: Blue

  5. #5
    Join Date
    Dec 2011
    Just add another field or two to the database
    next_step, previous_step

    so activities can have more than 1 step, the problem you will run into is managing the database with these fields, which isn't really hard either, but requires an extra step or two to manage

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center



X vBulletin 4.2.2 Debug Information

  • Page Generation 0.13126 seconds
  • Memory Usage 2,873KB
  • Queries Executed 15 (?)
More Information
Template Usage (33):
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)ad_thread_first_post_content
  • (1)ad_thread_last_post_content
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (5)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (1)navbar_moderation
  • (1)navbar_noticebit
  • (1)navbar_tabs
  • (2)option
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (26):
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/functions_navigation.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./includes/functions_facebook.php
  • ./includes/functions_calendar.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_notice.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php 

Hooks Called (70):
  • init_startup
  • friendlyurl_resolve_class
  • init_startup_session_setup_start
  • database_pre_fetch_array
  • database_post_fetch_array
  • init_startup_session_setup_complete
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • load_show_variables
  • load_forum_show_variables
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • strip_bbcode
  • friendlyurl_clean_fragment
  • friendlyurl_geturl
  • forumjump
  • cache_templates
  • cache_templates_process
  • template_register_var
  • template_render_output
  • fetch_template_start
  • fetch_template_complete
  • parse_templates
  • fetch_musername
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • build_navigation_data
  • build_navigation_array
  • check_navigation_permission
  • process_navigation_links_start
  • process_navigation_links_complete
  • set_navigation_menu_element
  • build_navigation_menudata
  • build_navigation_listdata
  • build_navigation_list
  • set_navigation_tab_main
  • set_navigation_tab_fallback
  • navigation_tab_complete
  • fb_like_button
  • showthread_complete
  • page_templates