Add more activities
This commit is contained in:
parent
f2be54a943
commit
ffea3fe1c9
|
|
@ -36,7 +36,7 @@ const documents = {
|
|||
"\n fragment ContentBlockHighlightsWithIdOnlyFragment on ContentBlockNode {\n highlights {\n id\n }\n }\n ": types.ContentBlockHighlightsWithIdOnlyFragmentFragmentDoc,
|
||||
"\n mutation UpdateInstrumentBookmark($input: UpdateInstrumentBookmarkInput!) {\n updateInstrumentBookmark(input: $input) {\n success\n }\n }\n ": types.UpdateInstrumentBookmarkDocument,
|
||||
"\n mutation UpdateContentBookmark($input: UpdateContentBookmarkInput!) {\n updateContentBookmark(input: $input) {\n success\n }\n }\n ": types.UpdateContentBookmarkDocument,
|
||||
"\n query MyActivitiesQuery {\n myActivities {\n topics {\n id\n title\n modules {\n id\n slug\n title\n allHighlights {\n ...HighlightParts\n }\n }\n }\n }\n }\n ": types.MyActivitiesQueryDocument,
|
||||
"\n query MyActivitiesQuery {\n myActivities {\n topics {\n id\n title\n modules {\n id\n slug\n title\n myHighlights {\n ...HighlightParts\n }\n myBookmarks {\n ... on ContentBlockBookmarkNode {\n id\n uuid\n contentBlock {\n id\n }\n note {\n id\n text\n }\n }\n __typename\n }\n mySubmissions {\n id\n text\n assignment {\n id\n title\n }\n }\n myAnswers {\n id\n survey {\n id\n title\n }\n }\n }\n }\n }\n }\n ": types.MyActivitiesQueryDocument,
|
||||
"\n query ChapterQuery($id: ID!) {\n chapter(id: $id) {\n path\n }\n }\n ": types.ChapterQueryDocument,
|
||||
"\n query ContentBlockQuery($id: ID!) {\n contentBlock(id: $id) {\n path\n }\n }\n ": types.ContentBlockQueryDocument,
|
||||
"\n fragment InstrumentParts on InstrumentNode {\n id\n title\n intro\n slug\n language\n bookmarks {\n uuid\n note {\n id\n text\n }\n }\n type {\n id\n name\n category {\n id\n name\n foreground\n background\n }\n type\n }\n contents\n highlights {\n ...HighlightParts\n }\n }\n": types.InstrumentPartsFragmentDoc,
|
||||
|
|
@ -156,7 +156,7 @@ export function graphql(source: "\n mutation UpdateContentBookmark($input
|
|||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
export function graphql(source: "\n query MyActivitiesQuery {\n myActivities {\n topics {\n id\n title\n modules {\n id\n slug\n title\n allHighlights {\n ...HighlightParts\n }\n }\n }\n }\n }\n "): (typeof documents)["\n query MyActivitiesQuery {\n myActivities {\n topics {\n id\n title\n modules {\n id\n slug\n title\n allHighlights {\n ...HighlightParts\n }\n }\n }\n }\n }\n "];
|
||||
export function graphql(source: "\n query MyActivitiesQuery {\n myActivities {\n topics {\n id\n title\n modules {\n id\n slug\n title\n myHighlights {\n ...HighlightParts\n }\n myBookmarks {\n ... on ContentBlockBookmarkNode {\n id\n uuid\n contentBlock {\n id\n }\n note {\n id\n text\n }\n }\n __typename\n }\n mySubmissions {\n id\n text\n assignment {\n id\n title\n }\n }\n myAnswers {\n id\n survey {\n id\n title\n }\n }\n }\n }\n }\n }\n "): (typeof documents)["\n query MyActivitiesQuery {\n myActivities {\n topics {\n id\n title\n modules {\n id\n slug\n title\n myHighlights {\n ...HighlightParts\n }\n myBookmarks {\n ... on ContentBlockBookmarkNode {\n id\n uuid\n contentBlock {\n id\n }\n note {\n id\n text\n }\n }\n __typename\n }\n mySubmissions {\n id\n text\n assignment {\n id\n title\n }\n }\n myAnswers {\n id\n survey {\n id\n title\n }\n }\n }\n }\n }\n }\n "];
|
||||
/**
|
||||
* The graphql function is used to parse GraphQL queries into a document that can be used by GraphQL clients.
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -321,6 +321,8 @@ export type AssignmentNode = Node & {
|
|||
userCreated: Scalars['Boolean']['output'];
|
||||
};
|
||||
|
||||
export type BookmarkNode = ChapterBookmarkNode | ContentBlockBookmarkNode | InstrumentBookmarkNode | ModuleBookmarkNode;
|
||||
|
||||
/** An enumeration. */
|
||||
export enum BooksModuleCategoryFilterAttributeTypeChoices {
|
||||
/** All */
|
||||
|
|
@ -969,7 +971,6 @@ export type ModuleLevelNodeModuleSetArgs = {
|
|||
|
||||
export type ModuleNode = ModuleInterface & {
|
||||
__typename?: 'ModuleNode';
|
||||
allHighlights?: Maybe<Array<Maybe<HighlightNode>>>;
|
||||
assignments?: Maybe<Array<Maybe<AssignmentNode>>>;
|
||||
bookmark?: Maybe<ModuleBookmarkNode>;
|
||||
category?: Maybe<ModuleCategoryNode>;
|
||||
|
|
@ -986,10 +987,12 @@ export type ModuleNode = ModuleInterface & {
|
|||
level?: Maybe<ModuleLevelNode>;
|
||||
/** e.g. 'Intro' or 'Modul 1' */
|
||||
metaTitle: Scalars['String']['output'];
|
||||
myAnswers?: Maybe<AnswerNodeConnection>;
|
||||
myAnswers?: Maybe<Array<Maybe<AnswerNode>>>;
|
||||
myBookmarks?: Maybe<Array<Maybe<BookmarkNode>>>;
|
||||
myChapterBookmarks?: Maybe<ChapterBookmarkNodeConnection>;
|
||||
myContentBookmarks?: Maybe<ContentBlockBookmarkNodeConnection>;
|
||||
mySubmissions?: Maybe<StudentSubmissionNodeConnection>;
|
||||
myHighlights?: Maybe<Array<Maybe<HighlightNode>>>;
|
||||
mySubmissions?: Maybe<Array<Maybe<StudentSubmissionNode>>>;
|
||||
objectiveGroups?: Maybe<Array<Maybe<ObjectiveGroupNode>>>;
|
||||
pk?: Maybe<Scalars['Int']['output']>;
|
||||
/** Der Name der Seite, wie er in URLs angezeigt werden soll, z.B. http://domain.com/blog/[my-slug]/ */
|
||||
|
|
@ -1003,15 +1006,6 @@ export type ModuleNode = ModuleInterface & {
|
|||
};
|
||||
|
||||
|
||||
export type ModuleNodeMyAnswersArgs = {
|
||||
after?: InputMaybe<Scalars['String']['input']>;
|
||||
before?: InputMaybe<Scalars['String']['input']>;
|
||||
first?: InputMaybe<Scalars['Int']['input']>;
|
||||
last?: InputMaybe<Scalars['Int']['input']>;
|
||||
offset?: InputMaybe<Scalars['Int']['input']>;
|
||||
};
|
||||
|
||||
|
||||
export type ModuleNodeMyChapterBookmarksArgs = {
|
||||
after?: InputMaybe<Scalars['String']['input']>;
|
||||
before?: InputMaybe<Scalars['String']['input']>;
|
||||
|
|
@ -1029,15 +1023,6 @@ export type ModuleNodeMyContentBookmarksArgs = {
|
|||
offset?: InputMaybe<Scalars['Int']['input']>;
|
||||
};
|
||||
|
||||
|
||||
export type ModuleNodeMySubmissionsArgs = {
|
||||
after?: InputMaybe<Scalars['String']['input']>;
|
||||
before?: InputMaybe<Scalars['String']['input']>;
|
||||
first?: InputMaybe<Scalars['Int']['input']>;
|
||||
last?: InputMaybe<Scalars['Int']['input']>;
|
||||
offset?: InputMaybe<Scalars['Int']['input']>;
|
||||
};
|
||||
|
||||
export type ModuleNodeConnection = {
|
||||
__typename?: 'ModuleNodeConnection';
|
||||
/** Contains the nodes in this connection. */
|
||||
|
|
@ -1712,7 +1697,6 @@ export type Query = {
|
|||
roomEntry?: Maybe<RoomEntryNode>;
|
||||
rooms?: Maybe<Array<Maybe<RoomNode>>>;
|
||||
snapshot?: Maybe<SnapshotNode>;
|
||||
something: Scalars['String']['output'];
|
||||
studentSubmission?: Maybe<StudentSubmissionNode>;
|
||||
survey?: Maybe<SurveyNode>;
|
||||
surveys?: Maybe<SurveyNodeConnection>;
|
||||
|
|
@ -2134,23 +2118,6 @@ export type StudentSubmissionNode = Node & {
|
|||
text: Scalars['String']['output'];
|
||||
};
|
||||
|
||||
export type StudentSubmissionNodeConnection = {
|
||||
__typename?: 'StudentSubmissionNodeConnection';
|
||||
/** Contains the nodes in this connection. */
|
||||
edges: Array<Maybe<StudentSubmissionNodeEdge>>;
|
||||
/** Pagination data for this connection. */
|
||||
pageInfo: PageInfo;
|
||||
};
|
||||
|
||||
/** A Relay edge containing a `StudentSubmissionNode` and its cursor. */
|
||||
export type StudentSubmissionNodeEdge = {
|
||||
__typename?: 'StudentSubmissionNodeEdge';
|
||||
/** A cursor for use in pagination */
|
||||
cursor: Scalars['String']['output'];
|
||||
/** The item at the end of the edge */
|
||||
node?: Maybe<StudentSubmissionNode>;
|
||||
};
|
||||
|
||||
export type SubmissionFeedbackInput = {
|
||||
final?: InputMaybe<Scalars['Boolean']['input']>;
|
||||
id?: InputMaybe<Scalars['ID']['input']>;
|
||||
|
|
@ -2818,10 +2785,10 @@ export type UpdateContentBookmarkMutation = { __typename?: 'Mutation', updateCon
|
|||
export type MyActivitiesQueryQueryVariables = Exact<{ [key: string]: never; }>;
|
||||
|
||||
|
||||
export type MyActivitiesQueryQuery = { __typename?: 'Query', myActivities?: { __typename?: 'ActivityNode', topics?: Array<{ __typename?: 'TopicNode', id: string, title: string, modules?: Array<{ __typename?: 'ModuleNode', id: string, slug: string, title: string, allHighlights?: Array<(
|
||||
export type MyActivitiesQueryQuery = { __typename?: 'Query', myActivities?: { __typename?: 'ActivityNode', topics?: Array<{ __typename?: 'TopicNode', id: string, title: string, modules?: Array<{ __typename?: 'ModuleNode', id: string, slug: string, title: string, myHighlights?: Array<(
|
||||
{ __typename?: 'HighlightNode' }
|
||||
& { ' $fragmentRefs'?: { 'HighlightPartsFragment': HighlightPartsFragment } }
|
||||
) | null> | null } | null> | null } | null> | null } | null };
|
||||
) | null> | null, myBookmarks?: Array<{ __typename: 'ChapterBookmarkNode' } | { __typename: 'ContentBlockBookmarkNode', id: string, uuid?: any | null, contentBlock: { __typename?: 'ContentBlockNode', id: string }, note?: { __typename?: 'NoteNode', id: string, text: string } | null } | { __typename: 'InstrumentBookmarkNode' } | { __typename: 'ModuleBookmarkNode' } | null> | null, mySubmissions?: Array<{ __typename?: 'StudentSubmissionNode', id: string, text: string, assignment: { __typename?: 'AssignmentNode', id: string, title: string } } | null> | null, myAnswers?: Array<{ __typename?: 'AnswerNode', id: string, survey: { __typename?: 'SurveyNode', id: string, title: string } } | null> | null } | null> | null } | null> | null } | null };
|
||||
|
||||
export type ChapterQueryQueryVariables = Exact<{
|
||||
id: Scalars['ID']['input'];
|
||||
|
|
@ -2904,7 +2871,7 @@ export const AddHighlightDocument = {"kind":"Document","definitions":[{"kind":"O
|
|||
export const AddContentHighlightDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"AddContentHighlight"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"AddContentHighlightInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"addContentHighlight"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"Field","name":{"kind":"Name","value":"highlight"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"HighlightParts"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"HighlightParts"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"HighlightNode"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"contentIndex"}},{"kind":"Field","name":{"kind":"Name","value":"paragraphIndex"}},{"kind":"Field","name":{"kind":"Name","value":"selectionLength"}},{"kind":"Field","name":{"kind":"Name","value":"contentUuid"}},{"kind":"Field","name":{"kind":"Name","value":"startPosition"}},{"kind":"Field","name":{"kind":"Name","value":"color"}},{"kind":"Field","name":{"kind":"Name","value":"note"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"text"}}]}},{"kind":"Field","name":{"kind":"Name","value":"text"}},{"kind":"Field","name":{"kind":"Name","value":"page"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentBlockNode"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"InstrumentNode"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ModuleNode"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ChapterNode"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}}]}}]}}]}}]} as unknown as DocumentNode<AddContentHighlightMutation, AddContentHighlightMutationVariables>;
|
||||
export const UpdateInstrumentBookmarkDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateInstrumentBookmark"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateInstrumentBookmarkInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateInstrumentBookmark"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"success"}}]}}]}}]} as unknown as DocumentNode<UpdateInstrumentBookmarkMutation, UpdateInstrumentBookmarkMutationVariables>;
|
||||
export const UpdateContentBookmarkDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"mutation","name":{"kind":"Name","value":"UpdateContentBookmark"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"input"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"UpdateContentBookmarkInput"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"updateContentBookmark"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"input"},"value":{"kind":"Variable","name":{"kind":"Name","value":"input"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"success"}}]}}]}}]} as unknown as DocumentNode<UpdateContentBookmarkMutation, UpdateContentBookmarkMutationVariables>;
|
||||
export const MyActivitiesQueryDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"MyActivitiesQuery"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"myActivities"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"topics"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"modules"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"allHighlights"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"HighlightParts"}}]}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"HighlightParts"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"HighlightNode"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"contentIndex"}},{"kind":"Field","name":{"kind":"Name","value":"paragraphIndex"}},{"kind":"Field","name":{"kind":"Name","value":"selectionLength"}},{"kind":"Field","name":{"kind":"Name","value":"contentUuid"}},{"kind":"Field","name":{"kind":"Name","value":"startPosition"}},{"kind":"Field","name":{"kind":"Name","value":"color"}},{"kind":"Field","name":{"kind":"Name","value":"note"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"text"}}]}},{"kind":"Field","name":{"kind":"Name","value":"text"}},{"kind":"Field","name":{"kind":"Name","value":"page"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentBlockNode"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"InstrumentNode"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ModuleNode"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ChapterNode"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}}]}}]}}]}}]} as unknown as DocumentNode<MyActivitiesQueryQuery, MyActivitiesQueryQueryVariables>;
|
||||
export const MyActivitiesQueryDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"MyActivitiesQuery"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"myActivities"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"topics"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"modules"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"myHighlights"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"HighlightParts"}}]}},{"kind":"Field","name":{"kind":"Name","value":"myBookmarks"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentBlockBookmarkNode"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"contentBlock"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"Field","name":{"kind":"Name","value":"note"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"text"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"__typename"}}]}},{"kind":"Field","name":{"kind":"Name","value":"mySubmissions"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"text"}},{"kind":"Field","name":{"kind":"Name","value":"assignment"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"myAnswers"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"survey"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}}]}}]}}]}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"HighlightParts"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"HighlightNode"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"contentIndex"}},{"kind":"Field","name":{"kind":"Name","value":"paragraphIndex"}},{"kind":"Field","name":{"kind":"Name","value":"selectionLength"}},{"kind":"Field","name":{"kind":"Name","value":"contentUuid"}},{"kind":"Field","name":{"kind":"Name","value":"startPosition"}},{"kind":"Field","name":{"kind":"Name","value":"color"}},{"kind":"Field","name":{"kind":"Name","value":"note"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"text"}}]}},{"kind":"Field","name":{"kind":"Name","value":"text"}},{"kind":"Field","name":{"kind":"Name","value":"page"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentBlockNode"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"InstrumentNode"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ModuleNode"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ChapterNode"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}}]}}]}}]}}]} as unknown as DocumentNode<MyActivitiesQueryQuery, MyActivitiesQueryQueryVariables>;
|
||||
export const ChapterQueryDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ChapterQuery"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"chapter"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"path"}}]}}]}}]} as unknown as DocumentNode<ChapterQueryQuery, ChapterQueryQueryVariables>;
|
||||
export const ContentBlockQueryDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"ContentBlockQuery"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"id"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"ID"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"contentBlock"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"id"},"value":{"kind":"Variable","name":{"kind":"Name","value":"id"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"path"}}]}}]}}]} as unknown as DocumentNode<ContentBlockQueryQuery, ContentBlockQueryQueryVariables>;
|
||||
export const InstrumentQueryDocument = {"kind":"Document","definitions":[{"kind":"OperationDefinition","operation":"query","name":{"kind":"Name","value":"InstrumentQuery"},"variableDefinitions":[{"kind":"VariableDefinition","variable":{"kind":"Variable","name":{"kind":"Name","value":"slug"}},"type":{"kind":"NonNullType","type":{"kind":"NamedType","name":{"kind":"Name","value":"String"}}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"instrument"},"arguments":[{"kind":"Argument","name":{"kind":"Name","value":"slug"},"value":{"kind":"Variable","name":{"kind":"Name","value":"slug"}}}],"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"InstrumentParts"}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"HighlightParts"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"HighlightNode"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"contentIndex"}},{"kind":"Field","name":{"kind":"Name","value":"paragraphIndex"}},{"kind":"Field","name":{"kind":"Name","value":"selectionLength"}},{"kind":"Field","name":{"kind":"Name","value":"contentUuid"}},{"kind":"Field","name":{"kind":"Name","value":"startPosition"}},{"kind":"Field","name":{"kind":"Name","value":"color"}},{"kind":"Field","name":{"kind":"Name","value":"note"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"text"}}]}},{"kind":"Field","name":{"kind":"Name","value":"text"}},{"kind":"Field","name":{"kind":"Name","value":"page"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"__typename"}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ContentBlockNode"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"InstrumentNode"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ModuleNode"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}}]}},{"kind":"InlineFragment","typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"ChapterNode"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}}]}}]}}]}},{"kind":"FragmentDefinition","name":{"kind":"Name","value":"InstrumentParts"},"typeCondition":{"kind":"NamedType","name":{"kind":"Name","value":"InstrumentNode"}},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"title"}},{"kind":"Field","name":{"kind":"Name","value":"intro"}},{"kind":"Field","name":{"kind":"Name","value":"slug"}},{"kind":"Field","name":{"kind":"Name","value":"language"}},{"kind":"Field","name":{"kind":"Name","value":"bookmarks"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"uuid"}},{"kind":"Field","name":{"kind":"Name","value":"note"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"text"}}]}}]}},{"kind":"Field","name":{"kind":"Name","value":"type"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"category"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"Field","name":{"kind":"Name","value":"id"}},{"kind":"Field","name":{"kind":"Name","value":"name"}},{"kind":"Field","name":{"kind":"Name","value":"foreground"}},{"kind":"Field","name":{"kind":"Name","value":"background"}}]}},{"kind":"Field","name":{"kind":"Name","value":"type"}}]}},{"kind":"Field","name":{"kind":"Name","value":"contents"}},{"kind":"Field","name":{"kind":"Name","value":"highlights"},"selectionSet":{"kind":"SelectionSet","selections":[{"kind":"FragmentSpread","name":{"kind":"Name","value":"HighlightParts"}}]}}]}}]} as unknown as DocumentNode<InstrumentQueryQuery, InstrumentQueryQueryVariables>;
|
||||
|
|
|
|||
|
|
@ -1,32 +1,17 @@
|
|||
<template>
|
||||
<div class="activity-entry">
|
||||
<div class="activity-entry__content">
|
||||
<h3 class="activity-entry__title">
|
||||
{{ title }}
|
||||
</h3>
|
||||
<slot />
|
||||
</div>
|
||||
|
||||
<div
|
||||
class="activity-entry__link"
|
||||
@click="$emit('link')"
|
||||
>
|
||||
<a class="activity-entry__link">
|
||||
<chevron-right class="activity-entry__icon" />
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { defineAsyncComponent } from 'vue';
|
||||
const ChevronRight = defineAsyncComponent(() => import('@/components/icons/ChevronRight.vue'));
|
||||
|
||||
export default {
|
||||
props: ['title'],
|
||||
|
||||
components: {
|
||||
ChevronRight,
|
||||
},
|
||||
};
|
||||
<script setup lang="ts">
|
||||
import ChevronRight from '@/components/icons/ChevronRight.vue';
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
|
@ -54,7 +39,7 @@ export default {
|
|||
&__link {
|
||||
display: flex;
|
||||
flex-grow: 0;
|
||||
align-content: center;
|
||||
align-items: flex-start;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,10 +8,6 @@ fragment TopicParts on TopicNode {
|
|||
vimeoId
|
||||
instructions
|
||||
modules {
|
||||
edges {
|
||||
node {
|
||||
...ModuleParts
|
||||
}
|
||||
}
|
||||
...ModuleParts
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,30 +36,101 @@
|
|||
<div v-if="selectedCategory === HIGHLIGHTS">
|
||||
<h3>HIGHLIGHTS</h3>
|
||||
<div
|
||||
v-for="topic in myActivities.topics"
|
||||
:key="topic.id"
|
||||
v-for="topic in highlightTopics"
|
||||
:key="topic?.id"
|
||||
>
|
||||
<h4>{{ topic.title }}</h4>
|
||||
<div
|
||||
v-for="module in topic.modules"
|
||||
:key="module.id"
|
||||
>
|
||||
<h4>{{ topic?.title }}</h4>
|
||||
<template v-for="module in topic?.modules">
|
||||
<div
|
||||
v-for="highlight in module.allHighlights"
|
||||
:key="highlight.id"
|
||||
class="activity__module"
|
||||
v-if="module?.myHighlights?.length"
|
||||
:key="module?.id"
|
||||
>
|
||||
<mark
|
||||
class="highlight"
|
||||
:class="[`highlight--${highlight.color}`]"
|
||||
>{{ highlight.text }}</mark
|
||||
<div
|
||||
v-for="highlight in module.myHighlights"
|
||||
:key="highlight?.id"
|
||||
>
|
||||
<activity-entry>
|
||||
<mark
|
||||
class="highlight"
|
||||
:class="[`highlight--${highlight?.color}`]"
|
||||
>{{ highlight?.text }}</mark
|
||||
>
|
||||
</activity-entry>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<h3 v-if="selectedCategory === BOOKMARKS">BOOKMARKS</h3>
|
||||
<h3 v-if="selectedCategory === ASSIGNMENTS">ASSIGNMENTS</h3>
|
||||
<h3 v-if="selectedCategory === SURVEYS">SURVEYS</h3>
|
||||
<div v-if="selectedCategory === BOOKMARKS">
|
||||
<div
|
||||
v-for="topic in bookmarkTopics"
|
||||
:key="topic?.id"
|
||||
>
|
||||
<h4>{{ topic?.title }}</h4>
|
||||
<template v-for="module in topic?.modules">
|
||||
<div
|
||||
class="activity__module"
|
||||
v-if="module?.myBookmarks?.length"
|
||||
:key="module?.id"
|
||||
>
|
||||
<div
|
||||
v-for="bookmark in module?.myBookmarks"
|
||||
:key="bookmark?.id"
|
||||
>
|
||||
<activity-entry> Lesezeichen: {{ bookmark.id }} </activity-entry>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="selectedCategory === ASSIGNMENTS">
|
||||
<h3>ASSIGNMENTS</h3>
|
||||
<div
|
||||
v-for="topic in submissionsTopics"
|
||||
:key="topic?.id"
|
||||
>
|
||||
<h4>{{ topic?.title }}</h4>
|
||||
<template v-for="module in topic?.modules">
|
||||
<div
|
||||
class="activity__module"
|
||||
v-if="module?.mySubmissions?.length"
|
||||
:key="module.id"
|
||||
>
|
||||
<div
|
||||
v-for="submission in module?.mySubmissions"
|
||||
:key="submission?.id"
|
||||
>
|
||||
<activity-entry>Submission {{ submission?.text }}</activity-entry>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="selectedCategory === SURVEYS">
|
||||
<h3>SURVEYS</h3>
|
||||
<div
|
||||
v-for="topic in answersTopics"
|
||||
:key="topic?.id"
|
||||
>
|
||||
<h4>{{ topic?.title }}</h4>
|
||||
<template v-for="module in topic?.modules">
|
||||
<div
|
||||
v-if="module?.myAnswers?.length"
|
||||
:key="module.id"
|
||||
>
|
||||
<div
|
||||
class="activity__module"
|
||||
v-for="answer in module?.myAnswers"
|
||||
:key="answer?.id"
|
||||
>
|
||||
<activity-entry>Übung: {{ answer?.survey.title }}</activity-entry>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
@ -68,6 +139,8 @@
|
|||
import { graphql } from '@/__generated__';
|
||||
import { useQuery } from '@vue/apollo-composable';
|
||||
import { ref, computed } from 'vue';
|
||||
import ActivityEntry from '@/components/profile/ActivityEntry.vue';
|
||||
import { TopicNode } from '@/__generated__/graphql';
|
||||
|
||||
const HIGHLIGHTS = 'highlights';
|
||||
const BOOKMARKS = 'bookmarks';
|
||||
|
|
@ -87,20 +160,57 @@ const { result } = useQuery(
|
|||
id
|
||||
slug
|
||||
title
|
||||
allHighlights {
|
||||
myHighlights {
|
||||
...HighlightParts
|
||||
}
|
||||
myBookmarks {
|
||||
... on ContentBlockBookmarkNode {
|
||||
id
|
||||
uuid
|
||||
contentBlock {
|
||||
id
|
||||
}
|
||||
note {
|
||||
id
|
||||
text
|
||||
}
|
||||
}
|
||||
__typename
|
||||
}
|
||||
mySubmissions {
|
||||
id
|
||||
text
|
||||
assignment {
|
||||
id
|
||||
title
|
||||
}
|
||||
}
|
||||
myAnswers {
|
||||
id
|
||||
survey {
|
||||
id
|
||||
title
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`)
|
||||
);
|
||||
console.log(result);
|
||||
//
|
||||
//
|
||||
// const myActivities = computed(() => result.value || { topics: [] });
|
||||
const myActivities = computed(() => result.value?.myActivities || { topics: [] });
|
||||
const topics = computed(() => result.value?.myActivities.topics || []);
|
||||
const highlightTopics = computed(() => {
|
||||
return topics.value.filter((topic: TopicNode) => topic.modules?.some((module) => module?.myHighlights?.length));
|
||||
});
|
||||
const bookmarkTopics = computed(() => {
|
||||
return topics.value.filter((topic: TopicNode) => topic.modules?.some((module) => module?.myBookmarks?.length));
|
||||
});
|
||||
const submissionsTopics = computed(() => {
|
||||
return topics.value.filter((topic: TopicNode) => topic.modules?.some((module) => module?.mySubmissions?.length));
|
||||
});
|
||||
const answersTopics = computed(() => {
|
||||
return topics.value.filter((topic: TopicNode) => topic.modules?.some((module) => module?.myAnswers?.length));
|
||||
});
|
||||
</script>
|
||||
|
||||
<style lang="postcss">
|
||||
|
|
@ -124,5 +234,14 @@ const myActivities = computed(() => result.value?.myActivities || { topics: [] }
|
|||
color: var(--color-brand);
|
||||
}
|
||||
}
|
||||
|
||||
&__module {
|
||||
border-top: 1px solid var(--color-silver);
|
||||
}
|
||||
|
||||
&__entry {
|
||||
padding: var(--medium-spacing) 0;
|
||||
border-top: 1px solid var(--color-silver);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -90,9 +90,7 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
topic: {
|
||||
modules: {
|
||||
edges: [],
|
||||
},
|
||||
modules: [],
|
||||
},
|
||||
saveMe: false,
|
||||
};
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import graphene
|
||||
from wagtail.models import Page
|
||||
from assignments.models import StudentSubmission
|
||||
from assignments.schema.types import AssignmentNode, StudentSubmissionNode
|
||||
from books.models import Chapter, ContentBlock, Module, RecentModule
|
||||
|
|
@ -11,15 +10,11 @@ from django.db.models import Q
|
|||
from graphene import relay
|
||||
from graphene_django import DjangoObjectType
|
||||
from graphene_django.filter import DjangoFilterConnectionField
|
||||
from notes.models import (
|
||||
ChapterBookmark,
|
||||
ContentBlockBookmark,
|
||||
Highlight,
|
||||
ModuleBookmark,
|
||||
)
|
||||
from notes.models import Highlight, ModuleBookmark
|
||||
from objectives.schema import ObjectiveGroupNode
|
||||
from surveys.models import Answer
|
||||
from surveys.schema import AnswerNode
|
||||
from wagtail.models import Page
|
||||
|
||||
|
||||
class ModuleNode(DjangoObjectType):
|
||||
|
|
@ -48,8 +43,8 @@ class ModuleNode(DjangoObjectType):
|
|||
chapters = graphene.List(ChapterNode)
|
||||
solutions_enabled = graphene.Boolean()
|
||||
bookmark = graphene.Field("notes.schema.ModuleBookmarkNode")
|
||||
my_submissions = DjangoFilterConnectionField(StudentSubmissionNode)
|
||||
my_answers = DjangoFilterConnectionField(AnswerNode)
|
||||
my_submissions = graphene.List(StudentSubmissionNode)
|
||||
my_answers = graphene.List(AnswerNode)
|
||||
my_content_bookmarks = DjangoFilterConnectionField(
|
||||
"notes.schema.ContentBlockBookmarkNode"
|
||||
)
|
||||
|
|
@ -63,7 +58,8 @@ class ModuleNode(DjangoObjectType):
|
|||
category = graphene.Field(ModuleCategoryNode)
|
||||
language = graphene.String()
|
||||
highlights = graphene.List("notes.schema.HighlightNode")
|
||||
all_highlights = graphene.List("notes.schema.HighlightNode")
|
||||
my_highlights = graphene.List("notes.schema.HighlightNode")
|
||||
my_bookmarks = graphene.List("notes.schema.BookmarkNode")
|
||||
|
||||
def resolve_chapters(self, info, **kwargs):
|
||||
return Chapter.get_by_parent(self)
|
||||
|
|
@ -136,7 +132,7 @@ class ModuleNode(DjangoObjectType):
|
|||
return root.highlights.filter(user=info.context.user)
|
||||
|
||||
@staticmethod
|
||||
def resolve_all_highlights(root: Module, info, **kwargs):
|
||||
def resolve_my_highlights(root: Module, info, **kwargs):
|
||||
# todo: is this too expensive, query-wise
|
||||
pages = Page.objects.live().descendant_of(root)
|
||||
highlights = Highlight.objects.filter(user=info.context.user).filter(
|
||||
|
|
@ -144,6 +140,27 @@ class ModuleNode(DjangoObjectType):
|
|||
)
|
||||
return highlights
|
||||
|
||||
@staticmethod
|
||||
def resolve_my_bookmarks(root: Module, info, **kwargs):
|
||||
from notes.models import ChapterBookmark, ContentBlockBookmark, ModuleBookmark
|
||||
|
||||
module_bookmarks = ModuleBookmark.objects.filter(
|
||||
module=root, user=info.context.user
|
||||
)
|
||||
chapters = Chapter.get_by_parent(root)
|
||||
chapter_bookmarks = ChapterBookmark.objects.filter(
|
||||
chapter__in=chapters, user=info.context.user
|
||||
)
|
||||
content_blocks = ContentBlock.objects.descendant_of(root)
|
||||
content_block_bookmarks = ContentBlockBookmark.objects.filter(
|
||||
user=info.context.user, content_block__in=content_blocks
|
||||
)
|
||||
return (
|
||||
list(module_bookmarks)
|
||||
+ list(chapter_bookmarks)
|
||||
+ list(content_block_bookmarks)
|
||||
)
|
||||
|
||||
|
||||
class RecentModuleNode(DjangoObjectType):
|
||||
class Meta:
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
import graphene
|
||||
from basicknowledge.queries import InstrumentNode
|
||||
from books.schema.nodes import ContentBlockNode, ModuleNode
|
||||
from graphene import relay
|
||||
from graphene_django import DjangoObjectType
|
||||
from books.schema.nodes.chapter import ChapterNode
|
||||
from core.logger import get_logger
|
||||
from graphene import relay
|
||||
from graphene_django import DjangoObjectType
|
||||
from notes.models import (
|
||||
ChapterBookmark,
|
||||
ContentBlockBookmark,
|
||||
|
|
@ -69,6 +69,16 @@ class InstrumentBookmarkNode(DjangoObjectType):
|
|||
interfaces = (relay.Node,)
|
||||
|
||||
|
||||
class BookmarkNode(graphene.Union):
|
||||
class Meta:
|
||||
types = (
|
||||
ContentBlockBookmarkNode,
|
||||
ModuleBookmarkNode,
|
||||
ChapterBookmarkNode,
|
||||
InstrumentBookmarkNode,
|
||||
)
|
||||
|
||||
|
||||
class HighlightableNode(graphene.Union):
|
||||
class Meta:
|
||||
types = (ContentBlockNode, InstrumentNode, ModuleNode, ChapterNode)
|
||||
|
|
|
|||
|
|
@ -54,7 +54,6 @@ type Query {
|
|||
myActivity(offset: Int, before: String, after: String, first: Int, last: Int, slug: String, slug_Icontains: String, slug_In: [String], title: String, title_Icontains: String, title_In: [String]): ModuleNodeConnection
|
||||
myInstrumentActivity(offset: Int, before: String, after: String, first: Int, last: Int, slug: String): InstrumentNodeConnection
|
||||
myActivities: ActivityNode
|
||||
something: String!
|
||||
_debug: DjangoDebug
|
||||
}
|
||||
|
||||
|
|
@ -124,14 +123,15 @@ type ModuleNode implements ModuleInterface {
|
|||
chapters: [ChapterNode]
|
||||
solutionsEnabled: Boolean
|
||||
bookmark: ModuleBookmarkNode
|
||||
mySubmissions(offset: Int, before: String, after: String, first: Int, last: Int): StudentSubmissionNodeConnection
|
||||
myAnswers(offset: Int, before: String, after: String, first: Int, last: Int): AnswerNodeConnection
|
||||
mySubmissions: [StudentSubmissionNode]
|
||||
myAnswers: [AnswerNode]
|
||||
myContentBookmarks(offset: Int, before: String, after: String, first: Int, last: Int): ContentBlockBookmarkNodeConnection
|
||||
myChapterBookmarks(offset: Int, before: String, after: String, first: Int, last: Int): ChapterBookmarkNodeConnection
|
||||
snapshots: [SnapshotNode]
|
||||
language: String
|
||||
highlights: [HighlightNode]
|
||||
allHighlights: [HighlightNode]
|
||||
myHighlights: [HighlightNode]
|
||||
myBookmarks: [BookmarkNode]
|
||||
}
|
||||
|
||||
interface ModuleInterface {
|
||||
|
|
@ -682,40 +682,6 @@ type SnapshotChangesNode {
|
|||
newContentBlocks: Int!
|
||||
}
|
||||
|
||||
type StudentSubmissionNodeConnection {
|
||||
"""Pagination data for this connection."""
|
||||
pageInfo: PageInfo!
|
||||
|
||||
"""Contains the nodes in this connection."""
|
||||
edges: [StudentSubmissionNodeEdge]!
|
||||
}
|
||||
|
||||
"""A Relay edge containing a `StudentSubmissionNode` and its cursor."""
|
||||
type StudentSubmissionNodeEdge {
|
||||
"""The item at the end of the edge"""
|
||||
node: StudentSubmissionNode
|
||||
|
||||
"""A cursor for use in pagination"""
|
||||
cursor: String!
|
||||
}
|
||||
|
||||
type AnswerNodeConnection {
|
||||
"""Pagination data for this connection."""
|
||||
pageInfo: PageInfo!
|
||||
|
||||
"""Contains the nodes in this connection."""
|
||||
edges: [AnswerNodeEdge]!
|
||||
}
|
||||
|
||||
"""A Relay edge containing a `AnswerNode` and its cursor."""
|
||||
type AnswerNodeEdge {
|
||||
"""The item at the end of the edge"""
|
||||
node: AnswerNode
|
||||
|
||||
"""A cursor for use in pagination"""
|
||||
cursor: String!
|
||||
}
|
||||
|
||||
type AnswerNode implements Node {
|
||||
"""The ID of the object"""
|
||||
id: ID!
|
||||
|
|
@ -767,6 +733,25 @@ type ChapterBookmarkNodeEdge {
|
|||
cursor: String!
|
||||
}
|
||||
|
||||
union BookmarkNode = ContentBlockBookmarkNode | ModuleBookmarkNode | ChapterBookmarkNode | InstrumentBookmarkNode
|
||||
|
||||
type AnswerNodeConnection {
|
||||
"""Pagination data for this connection."""
|
||||
pageInfo: PageInfo!
|
||||
|
||||
"""Contains the nodes in this connection."""
|
||||
edges: [AnswerNodeEdge]!
|
||||
}
|
||||
|
||||
"""A Relay edge containing a `AnswerNode` and its cursor."""
|
||||
type AnswerNodeEdge {
|
||||
"""The item at the end of the edge"""
|
||||
node: AnswerNode
|
||||
|
||||
"""A cursor for use in pagination"""
|
||||
cursor: String!
|
||||
}
|
||||
|
||||
type SurveyNodeConnection {
|
||||
"""Pagination data for this connection."""
|
||||
pageInfo: PageInfo!
|
||||
|
|
|
|||
Loading…
Reference in New Issue