I new to Perl and had a question. I have a simple page which allows users to respond to survey questions. There are various question and each has 4 choices. My question is that how do I verify that the user has answered all the question. The radio-group names are populate from the database using an incremental id which is what's confusing me. So say question's choices have the radio-group name "1" and another questions radio-group name is maybe "4". I'm not using the CGI.pm module. Any help will be appreciated. Thank you.
Add a hidden field with a list of question identifiers.
It is generally a bad idea to trust the client for a list of questions.
Just reuse the code you implemented to display the survey. You'll know how you generated the names of the form input fields. Then cycle through all these names and check whether you have a respective HTTP POST field.
For any further questions you need to supply more detailed information on what is your problem.
Related
I'm pretty new on this list, and trying to answer a question posted here on StackOverflow and i am wondering if there is some standard way to post entire models here, not just the "CODE" tab portion. Or for that matter even an image of the view screen.
I don't see any place to put attachments on posts or answers. I suppose I could upload the model to the NetLogo-users Google users-group, which does have a place to upload files, and cross-reference it here. I suppose I could try to open an email channel to the user and send them email with an attachment. I suppose I could post it on GitHub.
But is there some way to attach a full .nlogo file right here that I'm missing? Some interfaces are really complicated and only looking at the CODE tab is not adequate.
And, yes since the .nlogo model is pure text I could paste the entire thing into a window here ( which would object to having code in a text window of course) but that's a lot of extra characters in the post.
Unfortunately there is not. This is actually more of a problem for the questioning than answering as it can be difficult to get the person asking the question to post the relevant bit of code, including the other bits of code that lead up to the problem and give key information like what the contents of a variable may be. NetLogo does not lend itself to MWE at all, and beginners simply don't have the experience to replace interface variables with global variables etc.
Uploading to Google users group and cross referencing is likely to get the question/answer closed as it's not complete. But StackOverflow has a different purpose than the users group - it is supposed to be focussed on specific questions with specific answers - such things as syntax problems and bugs, not design. The last thing we want is interfaces or full models. We tend to be more lenient than other areas of StackOverflow because we know NetLogo has a very high proportion of beginners without support and that MWE in NetLogo doesn't really make sense, but questions that require full models are definitely out of scope.
In moodle is it is possible to count correct/incorrect answers in Immediate feedback Test and show them in the quiz navigation panel?
at the end of the test there is a summary which count the correct answers, but how to show this in the quiz navigation panel after every question is verified?
The "quiz navigation panel" is a special fake block that is displayed as part of the quiz attempt page, it is not an addon or a plugin, it's part of Moodle's core. so, any solution for your question has to involve core changes. if you are willing to do so, you can either use mod/quiz internal questions status display mechanism:
https://github.com/moodle/moodle/blob/master/mod/quiz/attemptlib.php#L1580-L1597
mod/quiz marks with green all the questions that the student has submitted correct answer to. so you can use that mechanism to display the count yourself.
Pick up parts of the following code snipets:
Loop through the questions (slots):
https://github.com/moodle/moodle/blob/master/mod/quiz/attemptlib.php#L2114
And count the correct answers:
https://github.com/moodle/moodle/blob/master/mod/quiz/attemptlib.php#L2125
Make a new function from the above snipets or just add the above snipets after the following line:
https://github.com/moodle/moodle/blob/master/mod/quiz/renderer.php#L336
Hope it helps.
I need to create a from in lift with username and phone number.
can someone give a full example how to create a simple form in lift that can be submitted? or a reference to a good one. all examples I have seen are not full or has too many options for me, and I couldn't manage to compile them.
Thanks,
Ohad.
You can find an excellent, simple example in the introductory course given by David Pollak in London here. The snippet for the simple form (instead of a phone number as you comment it has an age) is here. The html associated is this one, just comment the Lift Screen section and uncomment the simple form.
Please also note that Lift has a very active and willing to help community, so you can also ask these questions in the Lift mail list.
I have created a signup form for secure zone in Business Catalyst. I want to give user access to that form in order to update the fields. I have created the page and its working only problem is there is no way to pre-populate custom fields in the form. I talked to their support and research a lot but all in vain. This is very basic thing BC missing. Is there a hack for it or some alternatives?
Just adding for anyone finding this that you can also populate fields that have been created and extended in the crm if they're stored against the customer record.
{module_customerfield,crmextformID,FieldID}
eg
{module_customerfield,7470,82256}
More info in the forums.
Good News Now Business Catalyst supports this feature for more information read:
Allowing Customers to view and update CRM details
I have had this same issue and hopefully there will be someway they can fix this in the future. What I did for the time being is I used other tags that I was not using. IE module_workcity was not and won't be used by me so I then put that in a field that I needed the custom tag for. Here is a screen shot of what I am referring to. - http://screencast.com/t/b3pvuOcTi one thing to note here the screen name is different than username for this site.
Note: When the user signs up I have the person filling out a field for the "workcity" and just change the labeling.
Not sure if this is an option for you, and it can take some work but might help.
Hope this helps. - Another note BC related question you will get quicker answers on the forums there - http://businesscatalyst.com/support/forums
I am new to iphone development and I could use a little help in setting up my .plist file. I seem to be confused as to how to actually set it up. I have an app that will have a Frequently Asked Question (FAQ) page or view. As of right now, I am putting the questions in a property List file (.plist) configured like this: http://img16.yfrog.com/img16/6225/picture1zrf.png
I am not sure where to use a dictionary type or an array type. There are a lot of FAQs and would like to have them searched and indexed. As of now there are 8 groups of FAQs and each group of FAQs can have several sections and under each section, the actual questions and its answers are provided. Am I on the right track with this? Please help. Any help is welcomed.
It would seem you are on the right track. In general an array is a sequence of items (each value has a corresponding index used for lookup), where a dictionary is an associative container (each value has a corresponding key used for lookup).
The one thing I would change, however, is to make the keys for the faq dictionaries be a little simpler to index. You have the questions in the faq's dictionaries already so the key itself does not need to contain it. Instead it would appear the faq id would be a good value to use as a key.