Skip to content
This repository has been archived by the owner on Jun 30, 2024. It is now read-only.

Some Problems are not available for selection in Assignments dialogue #1192

Closed
yarikoptic opened this issue Jan 15, 2019 · 6 comments
Closed

Comments

@yarikoptic
Copy link
Contributor

Originally "reported" on slack, but could not figure it out, so decided to file for posterity.
I am running my "own" server in the docker, with recipe in #1178 (with some changes not yet in the PR) and the whole setup at https://github.com/dartmouth-pbs/psyc161-wi19-srv .

NB If no obvious ideas, I will try to reproduce it using the docker image and similar setup but without "secrets".

My problem is that when I go to /runestone/admin/assignments and try to add Problems by navigating the tree -- only a few sections have problems listed under them. I know that others have them too since they did miraculously appear after starting a new instance from committed docker state (just running on a different port, related issue detected was also #1191 ).
Here is an example on almost pristine fopp:
image

Some of those already added I "found" via Search and blindly changing their Auto-grade.

Please advise on possible workaround or where to dig to unravel the mystery. Thanks in advance for any guidance ;-)

@bjones1
Copy link
Contributor

bjones1 commented Jan 15, 2019

No idea, but some debug thoughts. Browse to the assignments page you provided an image of then look at the value of eBookConfig.toc.question_picker in the console. If this is missing sections, then the problems is in the backend (Python) side; if the sections are present, the bug is in JS.

@yarikoptic
Copy link
Contributor Author

yarikoptic commented Jan 15, 2019

thanks @bjones1 - I think I am looking at the right thing. It has sections but no children per section:
image

How to debug python side?
edit: above screenshot is on my "development" instance, whenever originally I posted webshot of the "deployed" one which does show at least some problems:

click here for screenshot

image

@yarikoptic
Copy link
Contributor Author

ok, I guess it is this function _get_toc_and_questions within admin. Will try to debug at "run time"! ;)

@yarikoptic
Copy link
Contributor Author

but actually it feels that it might be deeper -- where DB is populated...
on a somewhat populated "deployed" one I have

runestone=# SELECT chapter, count(chapter) FROM QUESTIONS WHERE autograde!='' GROUP BY chapter;
       chapter        | count 
----------------------+-------
 Dictionaries         |    19
 Sequences            |     4
 Functions            |     7
 AdvancedAccumulation |     7
 SimplePythonData     |     1
(5 rows)

and on the blanking out devel one I have

runestone=# SELECT chapter, count(chapter) FROM QUESTIONS WHERE autograde!='' GROUP BY chapter;
     chapter      | count 
------------------+-------
 SimplePythonData |     1
(1 row)

so need to look at that stage whereever it is ;)

@bjones1
Copy link
Contributor

bjones1 commented Jan 15, 2019

Chapters are populated by the Runestone build process. Perhaps your build is referencing the wrong/invalid database? See https://github.com/RunestoneInteractive/RunestoneComponents/blob/master/runestone/server/componentdb.py.

@yarikoptic
Copy link
Contributor Author

runestone build --all seems has fixed this issue! I am still not sure how I arrived to this state (had only ~300 questions within DB from total ~1,700 from two books), but overall -- resolved! thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants