I have registered a new account and have an Enrolment key for the course.
I finished the course and after that I run cron.php so that the results will reflect the report.
But everytime I do that the Enrolment Date in the Report will be set to 1/1/1970
I looked up in the database and checked the mdl_course_completions and the timeenrolled is set to 0.
I changed the data and it changes what is showing in the report in the Enrolment Date Column.
I created again a new account with the Enrolment key and finished a course and the Enrolment Date is again set to 1/1/1970
Is there a way to fix that? Please help. Thanks.
Note: The users that I have registered are using Enrolment key to enrol in a course.
I am using Moodle version: Moodle 3.0.7 (Build: 20161114)
Related
I have Magento 2.2.7 version installed and store timezone is set to India Standard Time (+05:30). Magento internally save order date and time in UTC and hence order placed date and time (India Standard Time) from store is different than what is saved in database table.
When I filter orders in admin by Purchase Date, it list orders filtered by UTC time not in the Indian Time. This doesn't show orders placed between 00:01 am to 05:30 am.
Is there any configuration in admin for this?
Note : I already search for this on google but didn't get any perfect solution.
This is configured at the admin user account level. Be warned, last time I tried setting an admin user to a none en_US locale setting it broke magento for them.
I am trying to create a job to insert all my data from Mysql to MongoDB
and this is my configuration :
how to auto generate date_created and last_updated?
so every data insert will auto fill date_created to new Date() or current date time and every data updated will auto update field last_updated with new Date() or current date.
You are looking for the Get System Info step.
It gives you a number of variables realted to the environement, including the time of the run. I usually use the system date (fixed), so that all the date-created are the same for the run, which ease retrieval.
For the last_update, it is that same technique, if you can setup your Match field for update in the MongoDB output step. If you cannot, have a look at the Merge Row (diff) : it tells you if the record is new, deleted, identical or changed.
I can't set starting_time for the adset.
When adset is created, the start date is:
[start_time] => 2016-06-31T13:00:00+0600
which means the date has been generated by my code.
But then, when I read adset by id or observe it in ads manager, the start_date turns to creation date (today's one).
Has anyone faced this trouble?
Your syntax is correct.
but June doesn't have 31th... that's why facebook ignored that input
How can I start charging a user the user immediately for a PayPal billing agreement?
Here's what I've got so far.
Create a Billing Plan (POST .../payments/billing-plans/)
Make it active (PATCH .../payments/billing-plans/)
Create a Billing Aggreement (POST .../payments/billing-agreements/)
Send user to approval_url, user approves, redirected to return url
Execute agreement (POST .../payments/billing-agreements//agreement-execute)
This all seems to work, but I want to charge the user right now and every month in the future. If I set start_date to now in step 3 I get an error, it must be in the future. If I set it in the future the user is not charged.
Do I need to 'Set outstanding agreement amounts' then 'Bill outstanding agreement amounts' for the initial payment?
Also, what about monthly payments, do they require some action or do they just happen as specified in the Billing Plan?
Update
I'm testing this around 2014-09-16T20:06:30+0000
If I send start_date as the current UTC time it get an error at step 2 telling me it must be in the future.
If I send the current date +30 secs or +2 hours I get through to step 5 which returns a 400 response: UNKNOWN_ERROR "An unknown error has occurred"
If I send the current date +4 hours it all works. The current UTC time is 8pm so adding 4 hours means the start_date is tomorrow.
Does this mean I can't charge the user today? Does the start_date have to be in next day or even the next business day?
I've talked to a PayPal rep and found that start_date must be tomorrow or later. They are going to add this to the docs.
If you want to start monthly billing immediately you might be able to do it by setting the start date to be in one months time and charging a setup fee to cover the first month. I haven't tested this as it's not what I want.
First payment for agreements will be billed right on specified start_date. The subsequent amounts are also taken automatically by PP. You need to work with the BillOutstandingAmount calls only if PP failed to pick the payment on the renewal date.
The problem I faced when developing with their RestAPI was specifying a wrong timezone. Maybe this is the same for you. Make sure the proper timezone is specified in your start_date (with all dates given to PP in fact)
Dates should be in this format: yyyy-MM-ddTHH:mm:ssZ
ex. start_date = 2014-09-16T09:20:00-0400
IF you want to make sure Paypal accepts the date as being valid, just add a few seconds to it.
Let's say you are in Java, you can do something like:
private String getPaypalDate()
{
DateFormat df = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ");
// Add 30 seconds to make sure Paypal accept the agreement date
Date rightNow = new Date(new Date().getTime() + 30000);
return df.format(rightNow);
}
I used this date format working.
$time = time();
$startDate = date('Y-m-d\\TH:i:s\\Z', $time);
I can't replicate, actually. I stumbled on this thread when getting the error due to setting it to moment.now(). But setting it to even 5 seconds in the future works a-ok. I'm using JavaScript, "start_date": moment().add({seconds:5}).format() and that checks out fine. Moment.js will set TZ to UTC when formatting as such, so it's gotta be a timezone thing on your end?
It looks like the payments just process based on the date being before or after 07:00 UTC of the current date.
For example. The current date time is 2017-05-04T04:50:00.00Z I set my start date to be the current UTC date time plus 30 seconds. Because the agreement date is set to a value greater then the current date time the API doesn't throw an error, but it DOESN'T set your time to be what you specified. Instead it sets it to 2017-05-04T07:00:00Z.
Now, if you have the same date time of 2017-05-04T04:50:00.00Z and instead of adding 30 seconds you add 24hrs you'd think that your time would then be set to be 2017-05-05T04:50:00.00Z. But no, the time will be set to 2017-05-05T07:00:00Z.
So it seems like these just process everyday at 07:00 UTC and you can't specify anything but the date.
I would like to know how to pre-fill the Scheduling Start and End Date in the metadata/properties of each item edited or created in a SharePoint list.
Scheduling Start Date: Today's date.
Scheduling Start Date: Today's date + one year.
Reason for ask: I configured the list items to expire and move into "draft" status when they hit their specified Scheduling End date, therefore un-publishing the item from external view.
Problem: Users/contributors are creating these items and are not entering enough time for it expire. What I'd like to do is automatically pre-fill the scheduling end dates for one year out from today's date when an item is edited or created.
Background info: I've enabled scheduling of items in a list (via "Enabling scheduling of items in this list" option in "Manage item scheduling" in Library Settings). I currently have a workflow and versioning enabled so that the admins check the content before it's view-able externally.
Your thoughts are appreciated.
This is pretty easy using Calculated Field Formulas in the default value fields of your two columns. Here and here are discussions on the basics of setting a default value for a date field, but it's pretty straightforward.
For Scheduling Start Date, set the default value to Today's Date. For Scheduling End Date, use the calculated value of =DATE(YEAR(Today)+1,MONTH(Today),DAY(Today)) for the default value.