Function for displaying a text file in a popup window with wrapping

Function for displaying a text file in a popup window with wrapping

by Greg Hodgins -
Number of replies: 0

I'll ask a specific question below, but on a related note, does anyone have any suggestions on documentation that might help a prospective moodle developer in coming up to speed on the functionality of the standard libraries?  I see Martin has started some documentation in the Core API, but it is pretty sparse in the functional description department.

To my specific question.  Is there an available/prefered method of opening a popup window with text from an uploaded file dynamically wrapped to the original and resized sizes?

My reason for asking, as highlighted in other notes, is that I have made the rather trivial change to question.php to present all of the uploaded files, not just the images, in the Image to display drop box on the quiz question definition screen.  My intend is to see this relabelled as "Reference/Exhibit" also.  This works fine, and I can make the changes to the quiz_print_possible_question_image method in the quiz lib.php (which I would propose be changed or a new method added, to quiz_print_possible_question_reference) to display a link that uses open.window to open a new window with the text file in it.  However, it does not wrap.  I'm not sure whether I need to create some logic for this, or if it already exists in moodle?

BTW, the intent would be to have quiz_print_possible_question_reference dynamically determine the type of reference (images and text files to start, but I would think other mimetypes like sound too) and have the link display appropriately, either inline or as a popup link determined by another drop box on the question definition that allowed the choice of "Inline or Popup" where suitable.

Thanks

Thanks.

Average of ratings: -