sunnah-com / corrections

55 stars 35 forks source link

Make it possible to submit correction to hadith grade #23

Open hasankhan opened 4 years ago

khan-hasan commented 4 years ago

@hasankhan, I will take this issue, in shaa Allah. You can assign it to me.

hasankhan commented 3 years ago

@khan-hasan any update on this?

khan-hasan commented 3 years ago

I am having problems getting the application to run on my local system. Is someone else working on this project able to help me get it running?

I am still very much interested in completing issue #23.

hasankhan commented 3 years ago

There was an issue with permissions. You can pull the latest changes and try to run the container with docker-compose. If you have a specific error or question, you can message me on LinkedIn.

khan-hasan commented 3 years ago

I am having problems getting the application to run on my local system. Is someone else working on this project able to help me get it running?

I am still very much interested in completing issue #23.

I was having some issues getting the application to run on my local machine. Br. @ilyas-shah was very helpful in working with me to resolve the problems I was running into.

hasankhan commented 3 years ago

@khan-hasan do you plan to continue working on this? Please let us know if you're unavailable so we can assign this to someone else.

khan-hasan commented 3 years ago

@hasankhan Unfortunately, I haven't gotten a chance to work on this issue. And, I'd rather not block others from working on it, so let's assign it to someone else in the meantime.

hasankhan commented 3 years ago

A hadith currently has multiple grades returned for a single language and each language has its own grade entry.

{
    "collection": "bukhari",
    "bookNumber": "1",
    "chapterId": "1.00",
    "hadithNumber": "1",
    "hadith": [
        {
            "lang": "en",
            "chapterNumber": "1",
            "chapterTitle": "english title",
            "urn": 10,
            "body": "english body",
            "grades": [
                {
                    "graded_by": null,
                    "grade": "Sahih"
                }
            ]
        },
        {
            "lang": "ar",
            "chapterNumber": "1",
            "chapterTitle": "arabic title",
            "urn": 100010,
            "body": "arabic body here",
            "grades": [
                {
                    "graded_by": "",
                    "grade": "grade in Arabic here"
                }
            ]
        }
    ]
}

@ahadith a correction is currently submitted for a single attribute of the hadith and for a particular language. The corrected value is supposed to be a string so a correction to hadith grade would look like this:

{
  "id": "a6407823-286c-455d-9874-8de0093336b2", # Optional
  "urn": "123",
  "attr": "grade",
  "val": "new grade here",
  "lang": "en",
  "comment": "fixed spelling",
  "queue": "global",
  "submittedBy": "someone@example.com"
}

Our problem would be finding out which grade from the list this correction applies to. One way to solve this issue is to just display the correction to the moderator and let them manually adjust the correct grade by rendering multiple grades with their corresponding graders.

An alternative would be to have a concept of value identifier (val_id) which helps us select the correct value for a multi-valued attribute. For lists, this would be the index of value in the list that we need to correct. We can also call it val_context which would be any extra piece of information that helps us uniquely identify the correct value in a mult-value scenario so for hadith grade, it would be the name of person who graded it (considering for a given grader there is only one grade).

What are your thoughts?

khan-hasan commented 3 years ago

My apologies, but I won't be able to work on this project anytime soon. If someone else would like to take this issue in the meantime, then please go ahead.

JAK, @hasankhan.