Permalink
Browse files

Unfinished work!

Work on adding small video tutorials.
Also, make evaluation of hint sequences later.
  • Loading branch information...
bvds committed May 23, 2012
1 parent 8465085 commit ee7485f3c9035eae9bac2fbe1342dd93f8a4c7a7
Showing with 47 additions and 28 deletions.
  1. +13 −0 Help/icons.cl
  2. +17 −23 Help/model.cl
  3. +2 −1 Help/whatswrong.cl
  4. +2 −2 Knowledge/ErrorClass.cl
  5. +13 −2 review/tutorial-videos/test.html
View
@@ -46,6 +46,19 @@
(defparameter *intro-video-action*
"view the <a href=\"#\" onClick=\"andes.help.link('IntroVideo');andes.principles.review('vec1a-video.html','IntroVideo',null,'width=650,height=395');\">introductory video</a>")
+(defun video-tutorial (html-id &key pre (width 250))
+ (let ((name (strcat "/review/tutorial-videos/" html-id)))
+ (format nil
+ "~@[~A<br>~%~]<video width=\"~A\" controls=\"controls\">
+ <source src=\"~A.ogv\" type=\"video/ogg\" />
+ <source src=\"~A.mov\" type=\"video/mov\" />
+ <source src=\"~A.mp4\" type=\"video/mp4\" />
+ <object data=\"~A.mp4\" width=\"~A\" >
+ <a href=\"~A.mp4\">Watch short video.</a>
+ </object>
+</video>"
+ pre width name name name name width name)))
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defparameter *line-icon*
View
@@ -47,10 +47,10 @@
(defun model-red-turn (time)
"Tutor has turned something red."
(unless time (error "Null time supplied"))
- (if (get-state-property 's-h-time)
- (set-state-property 'f-turns
- (+ (get-state-property 'f-turns) 1)
- :no-store t)
+; (if (get-state-property 's-h-time)
+; (set-state-property 'f-turns
+; (+ (get-state-property 'f-turns) 1)
+; :no-store t)
;; Time and turns spent "floundering"
(if (get-state-property 'f-time)
(set-state-property 'f-turns
@@ -108,7 +108,7 @@
(when (get-state-property 'intro-video-start-time)
(set-state-property
'intro-video-time
- (+ (- time (get-state-property 'intro-video-start-time))
+ (+ (- time (get-state-property 'intro-video-start-time))
(or (get-state-property 'intro-video-time) 0)))
;; Reset timer.
(set-state-property 'intro-video-start-time nil :no-store t)))
@@ -162,13 +162,15 @@
;; Logging for blur has failed, fall back on open flag.
(null (get-state-property 'INTRO-VIDEO-OPENED)))
`((:action . "show-hint")
- (:text . ,(strcat "Perhaps you should "
- *intro-video-action* "."))))
+ (:text . ,(video-tutorial "help-button"
+ :pre (strcat "Perhaps you should "
+ *intro-video-action* ".")))))
((incremented-property-test 'CLICKED-HELP-BUTTON +master-clicking+)
`((:action . "show-hint")
- (:text . ,(strcat "Your entry has turned red.&nbsp; You can "
- *help-button-action* " to get help."))))
+ (:text . ,(video-tutorial "help-button"
+ :pre (strcat "Your entry has turned red.&nbsp; You can "
+ *help-button-action* " to get help.")))))
(t
`((:action . "show-hint")
@@ -254,6 +256,11 @@
"uwplatt_8p130495419184f26uwplattl1_" ;Physics 2240
"uwplatt_9047621c019184fdbuwplattl1_" ;Physics 2340
)))
+ ;; No consent forms.
+ (set-state-property "consent-dialog" "none"
+ :model "client" :section x :student nil :tid t)
+ (set-state-property "informed-consent" "external:my-form"
+ :model "client" :section x :student nil :tid t)
(set-state-property +prob-flag+ prob :model "server" :section x
:student nil :tid t)))
@@ -311,19 +318,6 @@
:help-mod-p
:*help-mods*))
-;; Should be eventually pushed to by various
-;; Help files at compile-time?
-(defvar learned-help-experiment:*help-mods*
- '(
- (give-spontaneous-hint) (give-hints-backwards)
- (give-spontaneous-hint give-hints-backwards)
- (no-join-hints give-spontaneous-hint) (no-join-hints give-hints-backwards)
- (no-join-hints give-spontaneous-hint give-hints-backwards)
- ))
-
-;; Set hook to test for backwards hints
-(setf *backwards-hints-hook*
- #'(lambda () (random-help-experiment:help-mod-p 'give-hints-backwards)))
(in-package :learned-help-experiment)
@@ -425,4 +419,4 @@
)))
)
- )
+ )
View
@@ -250,7 +250,8 @@
(EntryTest-arguments eh)))
;; Can't evaluate this yet, because *correct-entry* has not
;; been set.
- :hints (subst-bindings-quoted bindings (EntryTest-hint eh))
+ :hints `(make-hint-seq
+ ,(subst-bindings-quoted bindings (EntryTest-hint eh)))
:state (eval (subst-bindings-quoted bindings (EntryTest-state eh)))
;; for fix-eqn-by-replacing, sy has form (state . SystemEntries)
;; for correct, sy has form (SystemEntry)
View
@@ -67,7 +67,7 @@
:preconditions ',conditions
:apply 'no-match
:state '+incorrect+ ;these are all errors
- :hint '(make-hint-seq ,(cons name arguments))
+ :hint ',(cons name arguments)
:order '((expected-utility .
(* ,probability ,utility))))
**entry-tests** :key #'EntryTest-name))
@@ -85,7 +85,7 @@
:preconditions ',preconditions
:apply ',apply
:state ',state
- :hint '(make-hint-seq ,hint)
+ :hint ',hint
:order ',order)
**entry-tests** :key #'EntryTest-name))
@@ -6,13 +6,24 @@
</head>
<body>
Test video on different browsers<br />
-<video width="250" controls="controls" autoplay="autoplay">
+<video width="250" controls="controls" autoplay="autoplay" title="test video">
<source src="axes-tool.ogv" type="video/ogg" />
<source src="axes-tool.mov" type="video/mov" />
<source src="axes-tool.mp4" type="video/mp4" />
<object data="axes-tool.mp4" width="250" >
<a href="axes-tool.mp4">Watch short video.</a>
</object>
</video>
+
+<p>No auto-start:<br />
+<video width="250" controls="controls">
+ <source src="axes-tool.ogv" type="video/ogg" />
+ <source src="axes-tool.mov" type="video/mov" />
+ <source src="axes-tool.mp4" type="video/mp4" />
+ <object data="axes-tool.mp4" width="250" >
+ <a href="axes-tool.mp4">Watch short video.</a>
+ </object>
+</video>
+
</body>
-</html>
+</html>

0 comments on commit ee7485f

Please sign in to comment.