-
Notifications
You must be signed in to change notification settings - Fork 4
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
IQManager should detect if images are available in IQSet questions and allow them to be viewed #74
Comments
Image describing issue: https://f.cloud.github.com/assets/3521208/1826970/a7a39724-721a-11e3-9e17-7fbef55b6b56.png |
This isn't essential for the release, so I will leave this as an open task to fix after we've release 0.5.4b. |
Please attempt a fix @chrqls . I've outlined the details in how it should be fixed. If you continue to have network issues, you can fix these easily. Just run your server on your laptop, and use your browser connecting to localhost. You will not need wifi to test this scenario. |
I really don't know what is happening now with my network but I can do anything correctly. I understand that for now we have the "No image available" message because there is a <tbody data-bind="foreach: iqdata">
<tr class="iq-grid" data-bind="attr: {id: $index}">
<td data-bind="text: $index()+1">1</td>
<td data-bind="text: Q">Where was it?</td>
<td data-bind="text: O1">Drawer</td>
<td data-bind="text: O2">Shelf</td>
<td data-bind="text: O3">TV</td>
<td data-bind="text: O4">Floor</td>
<td data-bind="text: A">3</td>
<td><a class="tiny button" href="#" onclick="alert('No Images Available'); return false;"> <img src="images/photo-icon.png" /> </a></td>
</tr>
</tbody> Knockout give us a way to make our foreach on I think that the 2 functions we have to fix in smileiqmanager.js are I wanted to see how the thing is working on smile web student to display the image. <img data-bind="attr: { src: picdatauri}" /> |
dixit @truedat101 |
[#74] Commenting the image button, to display directly the image
Until we find an another solution to keep the image button, I propose the pull request #105 |
@chrqls You need to review this to make sure that it works before commencing testing on SMILEConsortium/smile_teacher_android#118 . It needs to work for both the IQSet Detail view and the Session detail view. |
[#74] Displaying directly the picture in the table
With this change, we are able to see the picture but from the table. |
I'll review. Please don't add jquery UI or Bootstrap. We are using Zurb On Thu, Jan 23, 2014 at 3:26 AM, Charles Quelos [email protected]:
|
[#74] Loading the picture in a modal with Zurb
Let me know if the thing does not work for you, @truedat101 |
Does this work? I still get a reference error when I load iqset detail if PICURL is not defined. This kills the execution of the JS. |
Second thing, I think it was pretty clear, see comment: #74 (comment) , we only want to show the button if this is a QUESTION_PIC type, right? No point in showing a button if it shows nothing. I actually preferred this when it just showed an alert "Not Implemented'" rather than having broken JS and an empty pop up. Do you think you can take care of this the right way for both the IQSet detail and the Sessions detail? |
This shouldn't have taken a month to fix. I can fix this in a few hours but I'm completely tied up on other work. Let me know if you don't think you can implement this the way I've recommended in the comment: #74 (comment) You did create this issue after all. The right behavior is to show an image and button if there is an image. We'll only have images in IQSets if we have created them from the ad hoc classroom session. We don't have a way to load them yet from the IQManager. |
[#74] Removing button when no image on the question
True. In fact, a parameter PICURL exists from iqset table, but not from session table |
Need to use the combination of 'data:image/ping;base64,' + IQ.PIC Also, just enclose the modal
It's clear at the moment the implementation is assuming we have a url to retrieve the image. However, we don't have a URL. We have the data in the DB, so we need to load the binary data from the iqdata. |
We need to turn off some server debugging, otherwise we print way too much data. |
IQ Session data doesn't contain an image in the data. Need to verify. |
So if PICURL is undefined, don't crash!
Correct, the IQ Session was not saving out the picture data. My fault. I fixed that. Will commit shortly. |
Fixed |
* tag '1.0.2-jamsj': refs SMILEConsortium#91, SMILEConsortium#103 Update text in index.html 1.0.2 refs SMILEConsortium#91, SMILEConsortium#103 Bump version 1.0.2 refs SMILEConsortium#91, SMILEConsortium#103 Add new version of SMILE Teacher 0.9.9b2-jamsj refs SMILEConsortium#103 Bump version to 1.0.2 [SMILEConsortium#95] Removing opacity on IQManager [SMILEConsortium#101] Hiding submit buttons while posting the data [#74] Commenting the image button, to display directly the image Switching README.md with README.txt
* tag '1.0.3-jamsj': refs SMILEConsortium#103, SMILEConsortium#91 Add newest teacher app, and bump versions of SMILE server to 1.0.3 refs #74, SMILEConsortium#101 Fix IQ PIC data save on session save. Also fix missing submit buttons on new session (after a session has completed) refs #74 Add the necessary $data to fix undefined errors. Brilliant! So if PICURL is undefined, don't crash! refs #74 Fix iqset modal view of pic data for question [#74] Removing button when no image on the question. [#74] Loading the picture in a modal with Zurb (part Session) [#74] Loading the picture in a modal with Zurb (part IQSet) [#74] Displaying directly the picture in the table
* upstream/dev: refs SMILEConsortium#103, SMILEConsortium#94 Forgot to update the index.html version string refs SMILEConsortium#103, SMILEConsortium#94 Bump version to 1.0.4 refs SMILEConsortium#113 Add likes % calc in the IQManager Session Detail view. [SMILEConsortium#102] Removing useless console logging refs SMILEConsortium#103, SMILEConsortium#91 Add newest teacher app, and bump versions of SMILE server to 1.0.3 refs #74, SMILEConsortium#101 Fix IQ PIC data save on session save. Also fix missing submit buttons on new session (after a session has completed) refs #74 Add the necessary $data to fix undefined errors. Brilliant! So if PICURL is undefined, don't crash! refs #74 Fix iqset modal view of pic data for question [#74] Removing button when no image on the question. [#74] Loading the picture in a modal with Zurb (part Session) [#74] Loading the picture in a modal with Zurb (part IQSet) [#74] Displaying directly the picture in the table refs SMILEConsortium#91, SMILEConsortium#103 Update text in index.html 1.0.2 refs SMILEConsortium#91, SMILEConsortium#103 Bump version 1.0.2 refs SMILEConsortium#91, SMILEConsortium#103 Add new version of SMILE Teacher 0.9.9b2-jamsj refs SMILEConsortium#103 Bump version to 1.0.2 [SMILEConsortium#95] Removing opacity on IQManager [SMILEConsortium#101] Hiding submit buttons while posting the data [#74] Commenting the image button, to display directly the image
Right now we say "No Image Available". Should be easy now that we have the PIC and TYPE set properly.
The text was updated successfully, but these errors were encountered: