vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   vB Survey (UCCASS Survey app integration) (https://vborg.vbsupport.ru/showthread.php?t=82384)

subnet_rx 09-06-2005 08:27 PM

Another quick question. I have certain surveys marked as hidden and inactive, yet they still show up for everyone on the Edit Survey menu. Is there a way to hide this entire menu if the usergroup doesn't have permission to edit any surveys?

tamarian 09-06-2005 09:23 PM

Quote:

Originally Posted by subnet_rx
Another quick question. I have certain surveys marked as hidden and inactive, yet they still show up for everyone on the Edit Survey menu. Is there a way to hide this entire menu if the usergroup doesn't have permission to edit any surveys?

Open classes/survey.class.php and find:

PHP Code:

        $this->smarty->assign_by_ref('show',$show); 

Add befor it:
PHP Code:

        if($this->_hasPriv(EDIT_PRIV))
        { 
$show['edit_survey'] = TRUE; }
        else
        { 
$show['edit_survey'] = FALSE; } 

then open templates/Default/available_surveys.tpl and find:

HTML Code:

        <tr>
                <td class="panelsurround" align="center">
                <div class="panel">
                <div style="width:{$stylevar.formwidth}" align="{$stylevar.left}">
                       
                                <fieldset class="fieldset">
                                        <legend> Edit Surveys </legend>
                                        <table cellpadding="0" cellspacing="{$stylevar.formspacer}" border="0" width="100%">
                                        <tr>
                                                <td> 
                                                <form class="indented_cell" method="get" action="{$conf.html}/survey.php?do=edit_survey">
                                                        <input type="hidden" name="do" value="edit_survey">
                                                        <input type="hidden" name="s" value="{$session.dbsessionhash}" />
                                                        Survey:&nbsp;
                                                        <select name="sid" size="1">
                                                        {section name="as" loop=$survey.all_surveys.sid}
                                                        <option value="{$survey.all_surveys.sid[as]}">{$survey.all_surveys.name[as]}</option>
                                                        {/section}
                                                        </select>
                                                        &nbsp;<input type="submit" name="submit" value="Edit Survey">
                                                </form>                                         
                                                </td>
                                        </tr>
                                        </table>
                                </fieldset>                               
                        </div>
                </div>
                </td>
        </tr>

And replace with this:
HTML Code:

        {section name="create_link" show=$show.edit_survey}       
        <tr>
                <td class="panelsurround" align="center">
                <div class="panel">
                <div style="width:{$stylevar.formwidth}" align="{$stylevar.left}">
                       
                                <fieldset class="fieldset">
                                        <legend> Edit Surveys </legend>
                                        <table cellpadding="0" cellspacing="{$stylevar.formspacer}" border="0" width="100%">
                                        <tr>
                                                <td> 
                                                <form class="indented_cell" method="get" action="{$conf.html}/survey.php?do=edit_survey">
                                                        <input type="hidden" name="do" value="edit_survey">
                                                        <input type="hidden" name="s" value="{$session.dbsessionhash}" />
                                                        Survey:&nbsp;
                                                        <select name="sid" size="1">
                                                        {section name="as" loop=$survey.all_surveys.sid}
                                                        <option value="{$survey.all_surveys.sid[as]}">{$survey.all_surveys.name[as]}</option>
                                                        {/section}
                                                        </select>
                                                        &nbsp;<input type="submit" name="submit" value="Edit Survey">
                                                </form>                                         
                                                </td>
                                        </tr>
                                        </table>
                                </fieldset>                               
                        </div>
                </div>
                </td>
        </tr>
        {/section}


subnet_rx 09-07-2005 01:22 AM

that worked great, I'd recommend that fix for future releases. :)

subnet_rx 09-07-2005 07:48 PM

Guess I have yet another question. I have survey questions that are two dependencies deep. Meaning if they answer yes to one, the next is shown, and a yes to that, then the next is shown. Only, the third is shown whether the second is a yes or no. Any idea what could be going on? I have the third question setup on the dependency that the second is a yes.

tamarian 09-07-2005 08:49 PM

Quote:

Originally Posted by subnet_rx
Guess I have yet another question. I have survey questions that are two dependencies deep. Meaning if they answer yes to one, the next is shown, and a yes to that, then the next is shown. Only, the third is shown whether the second is a yes or no. Any idea what could be going on? I have the third question setup on the dependency that the second is a yes.

No idea, as I have not used dependencies. Best thing is to check the docs, or post in the UCCASS forum:

http://www.bigredspark.com/forums/

eljeffe 09-10-2005 01:37 PM

Aside from me going into the database and updating the vb3_vbsurvey_completed table by hand, is there a way I can flag surveys that can be taken multiple times?

We have a situation where we want to survey multiple instances of the same event. In our example, we want to survey the owner each time a certain component fails. Since we have some users who have had multiple failures of this component, we would like to get their survey information for each failure. Currently, the survey only allows a user to take it once.

I can update the table manually, but I didn't know if there was a mechanism that I am missing, or an untapped feature that is not enabled to allow for this.

Thanks!

This is one of our favorite hacks!

tamarian 09-10-2005 02:08 PM

Quote:

Originally Posted by eljeffe
Aside from me going into the database and updating the vb3_vbsurvey_completed table by hand, is there a way I can flag surveys that can be taken multiple times?

We have a situation where we want to survey multiple instances of the same event. In our example, we want to survey the owner each time a certain component fails. Since we have some users who have had multiple failures of this component, we would like to get their survey information for each failure. Currently, the survey only allows a user to take it once.

I can update the table manually, but I didn't know if there was a mechanism that I am missing, or an untapped feature that is not enabled to allow for this.

Try this, in survey/classes/survey.class.php delete or comment this line:

PHP Code:

        if($check === ALREADY_COMPLETED) eval(print_standard_error("You have already completed the requested survey."0)); 

I haven't tried it, but it should allow a user to take the survey multiple times.

eljeffe 09-11-2005 04:11 PM

Quote:

Originally Posted by tamarian
Try this, in survey/classes/survey.class.php delete or comment this line:

PHP Code:

        if($check === ALREADY_COMPLETED) eval(print_standard_error("You have already completed the requested survey."0)); 

I haven't tried it, but it should allow a user to take the survey multiple times.

Thanks, man! That worked! As always, you've got the answers!

SirJonathan 09-11-2005 07:59 PM

Hey there!

I've been using Erwin's hack for almost a year now to accept 'Membership Applications' and post them to an Admin only viewing area. From there we would approve or deny the applications and grant access to the members.

The trouble with that is that it doesn't post for an alarmingly high amount of applicants.. They hit submit, and for some reason or another it just doesn't post!

So I'm wondering if the results from this survey tool as each user fills out the 'application' could be posted as a new thread in a private forum?

Thanks! I'm really anxious to find a solution :).

-Jonathan

tamarian 09-11-2005 09:22 PM

Quote:

Originally Posted by SirJonathan
So I'm wondering if the results from this survey tool as each user fills out the 'application' could be posted as a new thread in a private forum?

It's doable/hackable, but not streight forward. :)


All times are GMT. The time now is 07:44 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02255 seconds
  • Memory Usage 1,786KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_html_printable
  • (4)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete