What is the purpose of the term property in the educationClass?
PATCH
https://graph.microsoft.com/V1.0/education/classes/4fbd34af-a6f7-4e27-90a7-5512e3dd64a4
With body
{
"#odata.context":"https://graph.microsoft.com/V1.0/$metadata#education/classes/$entity",
"description":"Mijn 2e test",
"displayName":"Mijn 2e test",
"mailNickname":"Team_9332",
"id":"4fbd34af-a6f7-4e27-90a7-5512e3dd64a4",
"externalSource":"sis",
"externalId":"9332",
"createdBy":
{
"application":
{
"id":"0a88941d-f499-43ed-a61e-5400ea986852"
}
,
"user":
{
"id":"b1b24649-7d77-40a3-8158-bbb0ce890ee7"
}
}
,
"term":
{
"startDate":"2019-05-01",
"endDate":"2019-05-30"
}
}
In the teams application I do not see any difference between education teams where the term property is set or not.
I thought that, in an earlier version, if you entered the startDate and endDate of the term property, it was not possible to create any assignments before or after these dates.
Right now, it's a pure data holder, that can be synced into the API using our School Data Sync product from a back end SIS/MIS system in a school or manipulated as you're doing.
None of our built-in experiences is being guided by the data in there AFAIK.
Related
I'm using the following function score for outfits purchased:
{
"query": {
"function_score": {
"field_value_factor": {
"field": "purchased",
"factor": 1.2,
"modifier": "sqrt",
"missing": 1
}
}
}
}
However, when I create a search - I get the following error:
"type":"illegal_argument_exception","reason":"Fielddata is disabled on text fields by default. Set fielddata=true on [purchased] in order to load fielddata in memory by uninverting the inverted index. Note that this can however use significant memory. Alternatively use a keyword field instead."
The syntax is correct for the search as I've run it locally and it works perfectly. I'm now running it on my server and it's not workings. Do I need to define purchased as an integer somewhere or is this due to something else?
The purchased field is an analyzed string field, hence the error you see.
When indexing your documents, make sure that the numbers are not within double quotes, i.e.
Wrong:
{
"purchased": "324"
}
Right:
{
"purchased": 324
}
...or if you can't change the source documents (because you're not responsible for producing them), make sure that you create a mapping that defines the purchased field as being an integer field.
{
"your_type": {
"properties": {
"purchased": {
"type": "integer"
}
}
}
}
When using the youtube API to get the list of my subscriptions and all the related details I get a number of information from the snippet and contentDetails part of the response object.
When I call the service from my script the contentDetails.newItemCount always return zero, this should indicate the number of new videos on the channel since last time I've opened the channel. The contentDetails.totalItemCount (total number of videos for the channel) is accurate instead.
In contrast if I run the same query through the google api explorer, the same variable contains the correct information and not zero.
The call I make from my PHP script is exactly the same as the one run on the google api explorer so I can't explain or understand why I'm getting different results. The code I use is roughly the following
$this->_youtube = new Google_Service_YouTube($this->_connector->_googleClient);
$params = array('mine' => true,'maxResults'=>25,'order'=>'alphabetical');
$part = 'snippet,contentDetails';
$response = $this->_youtube->subscriptions->listSubscriptions(
$part,
$params
);
foreach ($response['items'] as $item) {
$this->_mysubscriptions[] = array(
'channelId'=>$item['snippet']['resourceId']['channelId'],
'title'=>$item['snippet']['title'],
'description'=>$item['snippet']['description'],
'thumb_default'=>$item['snippet']['thumbnails']['default']['url'],
'thumb_medium'=>$item['snippet']['thumbnails']['medium']['url'],
'thumb_high'=>$item['snippet']['thumbnails']['high']['url'],
'subscribedOn'=>$this->cleanDate($item['snippet']['publishedAt']),
'totalVideos'=>$item['contentDetails']['totalItemCount'],
'newVideos'=>$item['contentDetails']['newItemCount']);
}
This is how the object returned looks like (just removed few IDs from the response) from the google API explorer, while when I run it through my code I get the same data but the newItemCount is zero.
{
"kind": "youtube#subscription",
"snippet": {
"publishedAt": "2016-09-14T12:48:00.000Z",
"title": "Muselk",
"description": "\"Memes win games\" - Youtube.com/mrmuselk",
"resourceId": {
"kind": "youtube#channel",
"channelId": "UCd534c_ehOvrLVL2v7Nl61w"
},
"thumbnails": {
"default": {
"url": "https://yt3.ggpht.com/-iWlz7dePNz0/AAAAAAAAAAI/AAAAAAAAAAA/smtPKh-RLTU/s88-c-k-no-mo-rj-c0xffffff/photo.jpg"
},
"medium": {
"url": "https://yt3.ggpht.com/-iWlz7dePNz0/AAAAAAAAAAI/AAAAAAAAAAA/smtPKh-RLTU/s240-c-k-no-mo-rj-c0xffffff/photo.jpg"
},
"high": {
"url": "https://yt3.ggpht.com/-iWlz7dePNz0/AAAAAAAAAAI/AAAAAAAAAAA/smtPKh-RLTU/s240-c-k-no-mo-rj-c0xffffff/photo.jpg"
}
}
},
"contentDetails": {
"totalItemCount": 792,
"newItemCount": 4,
"activityType": "all"
}
I've looked through the revision history but can't find any reference of modifications made to this specific property of the contentDetails object
There is a bug filed with google on this property but it refers to a different behaviour.
Wondering if this happens to other as well, or if somebody can give some hints on how this works or don't.
I'm currently working on an app for sports and I'm investigating if/how Firebase can handle the data and relationships I need.
The user logins into the app and goes to a Dashboard, which lists all the Pools he is participating in.
The current data structure for in Firebase is this:
{
Game:
78765: {
teamA: 'New York',
teamB: 'Montreal',
date: '20170601',
etc...
},
76421: {
teamA: 'LA',
teamB: 'Mexico',
date: '20170602',
etc...
}
},
{
Pool:
12345: {
GameID: 78765, <- GameId from above
PoolName: 'MyPool',
Owner: 'LpWgezRkC6EWS0sjXEWxhFl2' <- UserId
etc...
}
},
{
PlayerInPool: {
DUmwewIfzAbfWZN4NjS8mhX82 <- UserId
12345: true <- PoolId from above
LpWgezRkC6EWS0sjXEWxhFl2
12345: true
etc...
}
}
How would I go about pulling the pool information to display on the users Dashboard?
What needs to be displayed in each cell in the UICollectionView is the Pool info (PoolName and PoolOwner) with the Game information like the TeamA and TeamB names along with the Game date.
It is possible to use firebase. I'm fairly new to programming and I caught on in no time. think JSON when you think of your structure and they encourage you to make it as flat as possible (as opposed to lots of nesting). Good Luck! Here is one idea of what your structure might look like.
"GameTitle":{
“PlayerInPool":{
"PoolID":"12345",
“UserID”:“email#address.com”,
“Status”:“Active”
}
“Pool":{
"PoolID":"12345",
“PoolName”:“myPoolName”,
“GameID”:“547324”
}
“Game":{
"PlayerID1":"43623",
“PlayerID2”:“23567”,
“GameID”:“myGame”,
“GameName”:“myGame12345”
}
}
I'm trying to do basic social app using Firebase - each user has user's he follows and on his timeline he can see their post.
I'm using fanout technique described here
After this my data structure for user1 looks like this (it contains both - his followings and timeline):
{
"timeline": {
"user2": {
"-K-zOrtjiCGe7tgRk8DG": {
"text": "I love emojis!",
"date": "2016-09-01"
},
"-K-zOrt9a8Asdczaq23G": {
"text": "Second post!",
"date": "2016-09-03"
}
},
"user3": {
"-K-zOrtjiCGe7tgRk8DG": {
"text": "Post 3",
"date": "2016-09-02"
}
}
},
"followers": {
"user2": true,
"user3": true
}
}
The problem I have is - I don't know how to read user1 timeline with all posts from all users mixed and ordered by time. I was reading about querying and filtering from Firebase doc but I am not able to figure out the proper way to do it.
I'm developing on iOS platform but I should have no problem with other Firebase solutions as long as they are supported on Apple platform.
I am making a website that follows John Papa's Code Camper SPA Jumpstart Pluralsight course. My database/entities has the following hierarchy:
Proficiency contains Action(s) and Level(s).
When I delete a "Proficiency", I get the following server side error:
"Object reference not set to an instance of an object."
Looking at the json JObject saveBundle in the BreezeController, I am seeing a mysterious:
"undefined": false,
in every entity. None of my entities have a Boolean in them. Just like in Code Camper, I am adding an "isPartial" in the constructor of each entity as shown in the code below.
var proficiencyConstructor = function () {
this.isPartial = false;
}
metadataStore.registerEntityTypeCtor('Proficiency', proficiencyConstructor, proficiencyInitializer);
function proficiencyInitializer(proficiency) {
var empty = "00000000-0000-0000-0000-000000000000";
if (proficiency.id() === empty) {
proficiency.id(breeze.core.getUuid());
}
};
My gut says the mysterious "undefined":false is the "isPartial" property. According to the documentation, the "Breeze adds the isPartial property to the Entity metadata as an unmapped property. The values of unmapped properties are not transmitted to the service." I am stuck. Anyone recommend things I can do to figure this out?
Thanks,
Dan
Here is a sample from the savebundle
{ "entities":
[
{ "Id": "a0223d7c-35e5-458f-ba83-65ec7ec189fa", "Name": "AST Prof0", "IsEnabled": true, "Description": "AST Prof0", "ProficiencyType": "TBD", "ApplicationId": "7ba4b47f-06a3-4ceb-bca6-de3fd3699bbd", "undefined": false, "entityAspect": { "entityTypeName": "Proficiency:#LobGame.Model", "entityState": "Deleted", "originalValuesMap": { "IsPartial": true }, "autoGeneratedKey": null } },
This is likely due to a bug fix that is now in breeze 1.2.8. This fixed it for me.
From their release notes:
Bug fix for the case where a save involving a delete would fail when
that save also involved a modification to an unmapped property.
http://www.breezejs.com/documentation/download