count correct / incorrect answers after every verification - moodle

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.

Related

Go to a record from a portal

I'm making an app for authors using Filemaker. I posted this question on their forum but still haven't gotten an answer.
My app is basically a place where people can keep track of all the details that go into creating characters and locations. In each book (record) I have a tab control with 4 tabs: Book Details, Character List, Location List and Group List. Within the character list tab I have a portal which shows a list of the characters for that book.
I'm trying to create a button for each row in the portal which takes me to that records details page (the one with the red box around it). Right now, it's set to go to the character details layout. However, whichever row I click on, it takes me to the last visited record. Is there a way to go to each row's record from the portal? If not, do you know of a way to do the same thing through another method? I have a list layout which I used before, however, it doesn't hide the records for different books. For example, if I select book 1, it still shows characters for book 2. Thanks in advance for any help you can give me!
Create a button, attach a script or single command that uses the Go To Related Record script step using the same relationship as the portal.
Make sure the button fits within the row.

Adding specific number of sections in a google form

When an user enters a number into a field (representing the number of persons in a group), I want to have a section of google forms to be multiplied that many times - one for each person. In each such section I need to enter their details. Anybody did something similar to this ?
I think what you're trying to do isn't possible (without using App Scripts) but I have built a little example of something that might work for you. Please see if this will work and get back to ASAP.
Pretty much it has a title page asks the user how many people they want to sign up. Then, depending on the answer, the form directs them to a section with the appropriate number of sign-ups.

Swift - Problems following & unfollowing users when searched via UISearchController [Parse]

Good Afternoon,
Today I am having some issues with parse.
I have created a UISearchController, loaded my users from parse so I can search for individual ones and I have added a following and unfollowing feature.
My Problem is when I search for a specific user and try to follow him: So I search for a specific user say "test" it shows up as it should, but when I click follow and then go back to parse to see if "I" have followed test I can a different result.
It says I have followed for example "tester" which was the first user created. Its seeming to follow the Cell and now the userId...
After that I manged to get the users in alphabetical order, but same problem here except it follows the first user in alphabetical order for example if I have a username that begins with an "A"!
I'm not sure how to fix this issue, so I'm hoping someone here does..I accept and appreciate all kind of tips and answers!
You need to check if the UISearchController is active inside of didSelectRowAtIndexPath. Right now you are only selecting from the users array instead of from the searchResults array.
I also highly recommend refactoring your code away from using objectIds and use pointers. It is much easier to query against and work with pointers rather than directly accessing their objectIds.
Here's a link to another question that I've previously answered where I give a complete example of using a UISearchController to search by usernames in Parse.. Hope this helps!

Creating an Access Form [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I am not going to pretend to know anything about creating forms in Access, it is an entirely new concept to me. I have a DB in access that contains a number of tables and queries. I would like to create an access form that I can use as a search form, to look up any particular fields i need. I would simply type in what I was looking for and a list of the tables/queries that relate to it would appear. Is this doable?
The short answer to your question "is this doable" is: yes this is absolutely doable.
A good place to start would be to use the Form Wizard. Then get some training (plenty online) on how to design forms. Dlookup will likely be your friend.
Alternatively, a Report is another way to show a specific record based on some specified criteria (show me address for person A).
Short answer: Yes.
Longer Answer: I dont know what your background is. If this is your first Database project then you have a lot of reading to do and I would go and get myself a good ACCESS book and read it or spend a lot of time on the Microsoft Technet. Thats about as specific as I can get from the question itself.
Perhaps a solution for you:
Step A: Create a form
There are many ways to create forms. You may try this one:
1) In the Access Objects Window (far left on your screen) mark the table or query you want your form be based on. That means: the form shall display all the fields that are in that specific table or query.
2) With your table or query marked, in the "Create" pane of the Ribbon, click the button "Form". This creates a rudimentary form with all the fields from your table or query arranged in a more or less sensible way. (If you do not like the way the fields are arranged, you can re-arrange them, resize them or remove some of them, etc.)
3) Close this form. On closing, you will be asked to enter a name for it so that you can identify it later.
Step B: Use the form for filtering
1) Open that form (now in "form" view, not "design" view, of course)
2) In Home section of the Ribbon, in the Sort&Filter Area, click on the tiny button "Advanced", and from the dropdown select "Filter by form". Having this done, you then can enter various criteria in the fields on your form. Some of them may display dropdowns to choose from existing content. In some fields you may want to enter stuff like
Like "*liv*"
which will search for content containing any of live, lively, oblivious, olive, etc.
3) To apply the filtering, in the Ribbon, Home Section, Sort&Filter Area, click "Toggle filter". This will make your form display only records that comply with your criteria.
4) To wipe out your filter criteria, use the button Advanced --> Clear all filters.
This was a very basic introduction into core functionality of Access. Generally, I would support the other contributors here in saying: go to your local library and take any of the various Access introductory books they have there, read it, and try out what you read. You will make quick progress. (You may as well read any tutorial in the internet, but I personally would recommend a book: you just will have the fun to stroll through the pages, perhaps sitting in your garden, and bump into interesting stuff you probably would not have expected. That will help your progress considerably.)

display django fom from formset only when required

This might be simple but not able to get the work done.
here is a modelformset using which specific # of forms could be displayed:
formfact = formset_factory(ModelForm,extra = count)
fset = depffact(prefix='new')
My question is:
how can i display single form a time,how can i modify it such a way that everytime user
clicks a button previous forms are validated and one more modelform is displayed.
i.,show form1,if asked for show #2,#3 etc
i tried keeping track of count and using that count but was not successful.Ideas most welcome
by mistake i asked similar question twice
but i did answer it in this post incase if you want to refer. if you have a better solution, appreciate you sharing it.