timApp.readmark package
Contents
timApp.readmark package#
Submodules#
timApp.readmark.readings module#
- timApp.readmark.readings.copy_readings(src_par: timApp.document.docparagraph.DocParagraph, dest_par: timApp.document.docparagraph.DocParagraph)[source]#
- timApp.readmark.readings.get_clicked_readings_query(doc: timApp.document.document.Document) sqlalchemy.orm.query.Query [source]#
- timApp.readmark.readings.get_common_readings(usergroup_ids: list[int], doc: timApp.document.document.Document, filter_condition=None)[source]#
- timApp.readmark.readings.get_read_usergroups_count(doc: timApp.document.document.Document)[source]#
- timApp.readmark.readings.get_readings(usergroup_id: int, doc: timApp.document.document.Document, filter_condition=None) list[timApp.readmark.readparagraph.ReadParagraph] [source]#
- timApp.readmark.readings.get_readings_filtered_query(usergroup_id: int, doc: timApp.document.document.Document, filter_condition=None) sqlalchemy.orm.query.Query [source]#
- timApp.readmark.readings.get_readings_query(usergroup_id: int, doc: timApp.document.document.Document) sqlalchemy.orm.query.Query [source]#
Gets the reading info for a document for a user.
- Parameters
doc – The document for which to get the readings.
usergroup_id – The id of the user group whose readings will be fetched.
- timApp.readmark.readings.has_anything_read(usergroup_ids: list[int], doc: timApp.document.document.Document) bool [source]#
- timApp.readmark.readings.mark_all_read(usergroup_id: int, doc: timApp.document.document.Document)[source]#
- timApp.readmark.readings.mark_read(usergroup_id: int, doc: timApp.document.document.Document, par: timApp.document.docparagraph.DocParagraph, read_type=ReadParagraphType.click_red)[source]#
- timApp.readmark.readings.remove_all_read_marks(doc: timApp.document.document.Document)[source]#
timApp.readmark.readmarkcollection module#
- class timApp.readmark.readmarkcollection.ReadMarkCollection(marks: list[timApp.readmark.readparagraph.ReadParagraph] = <factory>)[source]#
Bases:
object
- add(r: timApp.readmark.readparagraph.ReadParagraph, modified=False)[source]#
- property class_str#
- marks: list[timApp.readmark.readparagraph.ReadParagraph]#
timApp.readmark.readparagraph module#
- class timApp.readmark.readparagraph.ReadParagraph(**kwargs)[source]#
Bases:
sqlalchemy.ext.declarative.api.Model
Denotes that a User(Group) has read a specific paragraph in some way.
- doc_id#
Document id.
- id#
Readmark id.
- par_hash#
Paragraph hash at the time the readmark was registered.
- par_id#
Paragraph id.
- timestamp#
The time the readmark was registered.
- type#
Readmark type.
- usergroup#
- usergroup_id#
UserGroup id.