Moodle set cooling off period for reattempt - plugins

I am building a quiz portal using Moodle. For my quiz, I have set a passing grade of 7.0. If the user fails in 2 attempts, I would like to display a message like "Please brush up your skills and reattempt after 2 weeks". The user must be allowed to reattempt only after 2 weeks of time.
Is there any settings or plugin to get this done?

You can try the "Enforce delay between later attempts" option. Located in the "Extra restrictions on attempts" section in the quiz settings.
Based on Moodle's explanation:
If enabled, a student must wait for the specified time to elapse
before attempting the quiz a third time and any subsequent times.
Let me know if that helps.

Related

How can I trigger a contact workflow on a specific date in Bitrix24?

I would like to trigger a workflow resetting a sum on all contacts every 1st January of the year. The workflow is implemented. It could be triggered on the specific date or even everyday, because the date is verified in the workflow before resetting.
How can i run it on every contact?
Hello and welcome to Stackoverflow, the answer to your question is as the following:
You need to create a Rest API outbound webhook in your Bitrix account with "CRM" & "Business Process" permissions.
You will write down a PHP code that will be executed on the exact date/time of you choice
The PHP script will do 2 process:
Will retrieve all the contacts that you have on your Bitrix account and store them into a string value.
It will run that Business process and pass the list of all the found contacts, and inside your Business process you're going to set it up in a way that it will run the required actions on every contact from eh contacts IDs passed by the first step.
The PHP script can be hosted in a webhosting or even on your local machine since it's once a year.
This is only the concept of the solution, I can't share the script code because I don't have it at the moments, please contact me if you faces problems.

GA4 Measurement Protocol returns events not the users

We've set Google Analytics GA4 event transfer via Measurement Protocol. We followed documentation fully - https://developers.google.com/analytics/devguides/collection/protocol/ga4/sending-events?client_type=gtag
Everything was fine in test GA counter, but after moving on production counter events stopped getting into interface (though keep being sent to connected Google BigQuery).
To be clear, we can see that events are counted, but not users.
0 for users, 25 for events
We changed only API secret and Measurement ID in our configuration. The major difference between test and prod counters: production is linked to Google AdWords and GoogleBigQuery.
Would be very grateful for any ideas and insights in that case.
I have same problem. You need to set engagement_time_msec parameter.
For example:
"engagement_time_msec": "1"
More: https://support.google.com/analytics/thread/117981433/events-sent-from-measurement-protocol-do-not-set-active-users?hl=en
The Measurement Protocol V4 is for GA4 properties(which is also the
one you are using).
According to the official document:
https://support.google.com/analytics/answer/9408920 It says "Google
Analytics 4 properties counts users who engaged with your app/site for
any non-zero amount of time during the previous 30 minutes".
GA4 uses "engagement_time_msec" parameter to identify user interaction
time. This explains why you can see the number of events but not the
number of users. If you want users sent from MP to be counted as
active user, simply add the "engagement_time_msec" parameter to your
event.
I think this is "by design". Even this screenshot in the official docs shows Users in last 30 minutes: 0 https://developers.google.com/analytics/devguides/collection/protocol/ga4/verify-implementation?client_type=gtag#realtime
As far as I can tell it's not possible to enable Session Hits Count for events triggered via the new measurement protocol (or whatever is necessary to get active users/sessions).
It might be possible to find a workaround for this issue:
using Tag Manager
using the undocumented url format (https://www.thyngster.com/app-web-google-analytics-measurement-protocol-version-2)

How to disable login after multiple failed attempts in Flutter

I have built a flutter app where user is created at backend WEB, in App users can only Login.
What I want to do is if the user attempts multiple failed attempt to login assume for 3 times, I want Login to get disabled for 5 minutes to the user.
help me how to approach it and the best suitable solution.
1.) Create a variable (global variable/ provider) "failed attempts".
2.) On failed attempt increase value =+ 1.
-> When user typed the correct password, delete the current count.
3.) When user failed 3 times -> save CurrentTime in the preference.
4.) Check it before attempting to login again.
-> Current time < (5 Minutes) compared to saved time
-> show popup "Sorry, you have to wait 5 minutes".
As nvoigt pointed out, you can/should store the variables in the backend, to increase security.
I would suggest using storage to store the DateTime of the last failed attempt after N number of failed attempts & checking if current time has passed X days or Y Hours or Z minutes and so on...
Note:
While I am suggesting using the storage for this, it is just out of convinience for you to implement & get going. It is not reliable as the user can change device's date & time settings or can reset/clear storage data.
In case if you are looking for a more secure approach with the same technique use something like firebase DB & Internet time instead of local storage & device time.
What I want to do is if the user attempts multiple failed attempt to login assume for 3 times, I want Login to get disabled for 5 minutes to the user.
This logic must be placed in the backend. When you call the login method on the backend, the backend has to keep track of how many unsuccessful tries there were and then lock the account for a specified time. Make sure you send a specific error code about the account being locked for the period to the frontend, so the frontend can display it and notify the user that trying to login is pointless.
There is no need to block the frontend from trying though. A malicious attacker will work around your protection anyway and a normal user may have reasons to try again (maybe with a different account).
You can use Timer class (link) and set needed delay to it. Block button at incorrect login action and after time runs out set it available again.

Watson Assistant API v2 & session expiration

We're building an app that uses the API v2 to interact with Watson Assistant. We're aware that the "state" of the conversation (among others: the position in the dialog tree) is now kept on the service side using the session_id key.
The problem: the session expires (5 to 60 minutes depending on the pricing plan).
Is there a way to either resurrect an expired session or save the conversation state so that it can be restored ?
We've tried to save and restore the global & skills contexts but they don't hold the conversation state.
Thanks for your help.
The current inactivity timeout period is plan-specific
- lite and standard 5 minutes
- plus and premium 1 hour
In the coming days, you will be able to change that value for plus and premium up to 24 hours. Lite and Standard you will only be able to decrease to a lower value if you want to close sessions faster.
You can always save context at the application level but currently there is not a way under the V2 API to save where the user is in the dialog so that you can pass it back after exceeding the allowed session inactivity timeout period.
Complementing what #oscar.ny mentioned, it's also plan-specific and you could potentially change the timeout timing on the Settings -> Timeout limit field -> Change the value and close, it saves automatically.
Something that I've done before in the past was sending an empty message when the event of 5min inactive happened. This event would call the function that would hit the API message method to send an "Are you still here, I was talking about xyz". Where xyz was the latest message sent to the user to maintain the session.
Ref:
change Timeout limit

LinkShare iTunes Affiliate links in an iOS app

I have an app that aggregates apps from the app store for a specific audience, and I use the iTunes Affiliate program (via LinkShare).
When a user taps the download button, it opens safari with the affiliate link and redirects to the AppStore. That's how I see it happening in other apps as well ("Free App Tracker", for example).
However, while LinkShare counts the clicks, I don't see any "orders", and I know there should be a few.
The clicks count gets updated the same day, while the orders count didn't get updated at all (still 0) for 3 days now.
Do I need to call the url in any specific way? or do LinkShare take their time with orders reports?
Thanks!
LinkShare track the orders in different way: there is the transaction date which is the date when the purchase was done, and then there is the "process" date which is when the transaction has been processed by the LinkShare system.
You can read more about it.
A few notes:
Are the purchases you that know happend via your link happen in the US store?
- The LinkShare program only support the US and CA programs so if the sale was made in another country you won't see any sales data.
iTunes advises that you wait three to five days for your sale to show up. I've seen sales the next day and sometimes they take longer. Typically, however, they are no later then a few days after you get the receipt for the sale.
You can call your link in a way that the redirects are processed in the background. Check out this resource for details - http://developer.apple.com/library/ios/#qa/qa1629/_index.html
Hope that helps.