-
-
Notifications
You must be signed in to change notification settings - Fork 59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug] StoryBook chapter number displayed incorrectly #1092
Comments
This is what the database looks like for this storybook's chapters:
The So something might have gone wrong when setting the |
The Hindi version of the same storybook does not have the same problem: http://hin.test.elimu.ai/content/storybook/edit/39 🤔 |
Here are other books with the same bug:
|
Interesting.. thanks for sharing them @nya-elimuai I'm taking a look now. |
Note that the ePUB importer automatically removes storybook chapters that are not needed, i.e. book metadata: https://github.com/elimu-ai/webapp/blob/master/src/main/java/ai/elimu/web/content/storybook/StoryBookCreateFromEPubController.java#L364 if (isMetadata) {
continue;
} This might have a negative effect on how the |
@nya-elimuai You are right the epub file for this storyBook has MetaData http://eng.elimu.ai/content/storybook/edit/66 which maps to Chapter with sortOrder = 0. As a result chapter with actual content has sortOrder 1 and we are adding sortOrder+1 while storing in DB. I observed that StoryBook start with Chapter 2/13 instead of 1/13 which leads to 14/13 with all the example storybooks you shared in the above comment sec. Couple of options I can think of:
I more leaned towards option 1 just that we can handle it upfront if we aren't using it anyway. Let me know your thoughts and whether you see any issues/concerns. |
Apart from that, I'm curious why are we receiving this sort of metaData only for some StoryBooks and not others because metadata info like author/illustrator/translator could infact be useful right, correct me if we are receiving this through some other means. |
@Keerthi4308 Thank you for tracking down the bug, and for suggesting how to solve it 👍 I have not looked at the details yet, so I'm not able to suggest the better of the two options. If you are leaning towards option 1, feel free to attempt an implementation of the bug. And let me know if I can assist. |
@Keerthi4308 Part of the challenge is that the ePUB files come from various sources, and they are all formatted differently. Currently we have a solution that works for 3 sources: StoryWeaver, Global Digital Library and Let's Read. Every time a contributor imports an ePUB, she stores an attribution URL and the book's license so that we can keep track of this. Currently, this is done manually. |
- Correct wrong sort order of storybook chapters
…mber-displayed-incorrectly fix: #1092 StoryBook chapter number displayed incorrectly
…mber-displayed-incorrectly Fix #1092 story book chapter number displayed incorrectly
At http://eng.elimu.ai/content/storybook/edit/66 there seems to be a bug with the way a storybook's chapter number is calculated: It shows "Chapter 14/13" instead of "13/13".
![Screen Shot 2020-11-10 at 1 35 32 PM](https://user-images.githubusercontent.com/19628734/98687227-58c18280-231e-11eb-9b33-38d26714d452.png)
The text was updated successfully, but these errors were encountered: