@@ -11,7 +11,6 @@ import { prepareNote55 } from '@vue-skuilder/common';
1111import { User } from './userDB' ;
1212
1313/**
14- * @deprecated Use similar functionality from the dataLayerProvider
1514 *
1615 * @param courseID id of the course (quilt) being added to
1716 * @param codeCourse
@@ -43,14 +42,13 @@ export async function addNote55(
4342 if ( result . ok ) {
4443 // create cards
4544 await createCards ( courseID , dataShapeId , result . id , tags , elo ) ;
45+ } else {
46+ console . log ( `Error adding note: ${ result } ` ) ;
4647 }
4748
4849 return result ;
4950}
5051
51- /**
52- * @deprecated Use similar functionality from the dataLayerProvider
53- */
5452export async function createCards (
5553 courseID : string ,
5654 datashapeID : PouchDB . Core . DocumentId ,
@@ -73,9 +71,6 @@ export async function createCards(
7371 }
7472}
7573
76- /**
77- * @deprecated Use similar functionality from the dataLayerProvider
78- */
7974async function createCard (
8075 questionViewName : string ,
8176 courseID : string ,
@@ -109,14 +104,15 @@ async function createCard(
109104}
110105
111106/**
112- * @deprecated Use similar functionality from the dataLayerProvider
113107 *
114108 * Adds a card to the DB. This function is called
115109 * as a side effect of adding either a View or
116110 * DisplayableData item.
117111 * @param course The name of the course that the card belongs to
118112 * @param id_displayable_data C/PouchDB ID of the data used to hydrate the view
119113 * @param id_view C/PouchDB ID of the view used to display the card
114+ *
115+ * @package
120116 */
121117async function addCard (
122118 courseID : string ,
@@ -153,8 +149,6 @@ export async function getCredentialledCourseConfig(courseID: string) {
153149}
154150
155151/**
156- @deprecated Use similar functionality from the dataLayerProvider
157-
158152 Assciates a tag with a card.
159153
160154 NB: DB stores tags as separate documents, with a list of card IDs.
@@ -163,6 +157,7 @@ export async function getCredentialledCourseConfig(courseID: string) {
163157 NB: tags are created if they don't already exist
164158
165159 @param updateELO whether to update the ELO of the card with the new tag. Default true.
160+ @package
166161*/
167162export async function addTagToCard (
168163 courseID : string ,
@@ -213,12 +208,6 @@ class AlreadyTaggedErr extends Error {
213208 }
214209}
215210
216- /**
217- * @deprecated Use similar functionality from the dataLayerProvider
218- *
219- * @param tagName
220- * @returns
221- */
222211export function getTagID ( tagName : string ) : string {
223212 const tagPrefix = DocType . TAG . valueOf ( ) + '-' ;
224213 if ( tagName . indexOf ( tagPrefix ) === 0 ) {
@@ -227,9 +216,7 @@ export function getTagID(tagName: string): string {
227216 return tagPrefix + tagName ;
228217 }
229218}
230- /**
231- * @deprecated Use similar functionality from the dataLayerProvider
232- */
219+
233220export function getCourseDB ( courseID : string ) : PouchDB . Database {
234221 const dbName = `coursedb-${ courseID } ` ;
235222 return new pouch (
0 commit comments