diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 index 36f7e27f6a..5cf2bee97d --- a/.gitignore +++ b/.gitignore @@ -3,4 +3,11 @@ /tests/_output/ /c3.php *.php~ -*.js~ \ No newline at end of file +*.js~ +config.php +header.php +infoheader.php +loginpage.php +newinstructor.php +.DS_Store +._.DS_Store diff --git a/.htaccess b/.htaccess old mode 100644 new mode 100755 diff --git a/DEembedq.php b/DEembedq.php old mode 100644 new mode 100755 diff --git a/OEAembedq.php b/OEAembedq.php old mode 100644 new mode 100755 diff --git a/actions.php b/actions.php old mode 100644 new mode 100755 diff --git a/admin/.DS_Store b/admin/.DS_Store old mode 100644 new mode 100755 diff --git a/admin/FCMsetup.php b/admin/FCMsetup.php old mode 100644 new mode 100755 diff --git a/admin/actions.php b/admin/actions.php old mode 100644 new mode 100755 diff --git a/admin/addcourse.php b/admin/addcourse.php old mode 100644 new mode 100755 diff --git a/admin/addremoveteachers.php b/admin/addremoveteachers.php old mode 100644 new mode 100755 diff --git a/admin/admin.php b/admin/admin.php old mode 100644 new mode 100755 diff --git a/admin/admin2.php b/admin/admin2.php old mode 100644 new mode 100755 diff --git a/admin/approvepending.php b/admin/approvepending.php old mode 100644 new mode 100755 diff --git a/admin/approvepending2.php b/admin/approvepending2.php old mode 100644 new mode 100755 diff --git a/admin/bbexport-generate.php b/admin/bbexport-generate.php old mode 100644 new mode 100755 diff --git a/admin/bbexport-templates.php b/admin/bbexport-templates.php old mode 100644 new mode 100755 diff --git a/admin/calendarfeed.php b/admin/calendarfeed.php old mode 100644 new mode 100755 diff --git a/admin/canvascalexport.php b/admin/canvascalexport.php old mode 100644 new mode 100755 diff --git a/admin/ccexport-generate.php b/admin/ccexport-generate.php old mode 100644 new mode 100755 index 5167acd301..887f5b38b0 --- a/admin/ccexport-generate.php +++ b/admin/ccexport-generate.php @@ -399,7 +399,7 @@ function getorg($it,$parent,&$res,$ind,$mod_depth) { $row = $stm->fetch(PDO::FETCH_NUM); if ($row[8]==-1) { require_once("../includes/updateptsposs.php"); - $row[8] = updatePointsPossible($iteminfo[$item][1], $row[3], $row[2]); + $row[8] = updatePointsPossible($iteminfo[$item][1], $row[3], $row[2]); } //echo "encoding {$row[0]} as ".htmlentities($row[0],ENT_XML1,'UTF-8',false).'
'; $out .= $ind.''."\n"; @@ -430,7 +430,7 @@ function getorg($it,$parent,&$res,$ind,$mod_depth) { $aitemcnt[$k] = 1; } } - + mkdir($newdir.'/assn'.$iteminfo[$item][1]); $fp = fopen($newdir.'/assn'.$iteminfo[$item][1].'/assignment_settings.xml','w'); fwrite($fp,''."\n"); @@ -604,7 +604,7 @@ function getorg($it,$parent,&$res,$ind,$mod_depth) { mkdir($newdir.'/non_cc_assessments'); mkdir($newdir.'/course_settings'); file_put_contents($newdir.'/course_settings/canvas_export.txt', "Q: Why do pandas prefer Cartesian coordinates? A: Because they're not polar bears"); - + $fp = fopen($newdir.'/course_settings/assignment_groups.xml','w'); fwrite($fp,''."\n"); fwrite($fp, ''."\n"); @@ -639,9 +639,9 @@ function getorg($it,$parent,&$res,$ind,$mod_depth) { } fwrite($fp, ''); fclose($fp); - + if (dir_is_empty($newdir.'/web_resources')) { - rmdir($newdir.'/web_resources'); + rmdir($newdir.'/web_resources'); } } @@ -749,10 +749,10 @@ function rrmdir($path) { $archive_file_name = 'CCEXPORT'.$cid.'.imscc'; //echo "
Download
"; //echo "Once downloaded, keep things clean and Delete the export file off the server."; -header("Content-type: application/vnd.ims.imsccv1p1"); +header("Content-type: application/vnd.ims.imsccv1p1"); header("Content-Disposition: attachment; filename=$archive_file_name"); header("Content-length: " . filesize($path.'/'.$archive_file_name)); -header("Pragma: no-cache"); -header("Expires: 0"); +header("Pragma: no-cache"); +header("Expires: 0"); readfile($path.'/'.$archive_file_name); unlink($path.'/'.$archive_file_name); diff --git a/admin/ccexport.php b/admin/ccexport.php old mode 100644 new mode 100755 diff --git a/admin/coursebrowser.css b/admin/coursebrowser.css old mode 100644 new mode 100755 diff --git a/admin/coursebrowser.php b/admin/coursebrowser.php old mode 100644 new mode 100755 diff --git a/admin/diagonetime.php b/admin/diagonetime.php old mode 100644 new mode 100755 diff --git a/admin/diagsetup.php b/admin/diagsetup.php old mode 100644 new mode 100755 diff --git a/admin/exportitems.php b/admin/exportitems.php old mode 100644 new mode 100755 diff --git a/admin/exportitems2.php b/admin/exportitems2.php old mode 100644 new mode 100755 diff --git a/admin/exportlib.php b/admin/exportlib.php old mode 100644 new mode 100755 diff --git a/admin/externaltools.php b/admin/externaltools.php old mode 100644 new mode 100755 diff --git a/admin/federatedapi.php b/admin/federatedapi.php old mode 100644 new mode 100755 diff --git a/admin/federationpull.php b/admin/federationpull.php old mode 100644 new mode 100755 diff --git a/admin/forms.php b/admin/forms.php old mode 100644 new mode 100755 diff --git a/admin/hidefromcourselist.php b/admin/hidefromcourselist.php old mode 100644 new mode 100755 diff --git a/admin/import/.htaccess b/admin/import/.htaccess old mode 100644 new mode 100755 diff --git a/admin/import/webworksets.zip b/admin/import/webworksets.zip new file mode 100755 index 0000000000..2b8a180c3c Binary files /dev/null and b/admin/import/webworksets.zip differ diff --git a/admin/importitems.php b/admin/importitems.php old mode 100644 new mode 100755 diff --git a/admin/importitems2.php b/admin/importitems2.php old mode 100644 new mode 100755 diff --git a/admin/importitemsfuncs.php b/admin/importitemsfuncs.php old mode 100644 new mode 100755 diff --git a/admin/importlib.php b/admin/importlib.php old mode 100644 new mode 100755 diff --git a/admin/importstu.php b/admin/importstu.php old mode 100644 new mode 100755 diff --git a/admin/itemexportfields.php b/admin/itemexportfields.php old mode 100644 new mode 100755 diff --git a/admin/jsonexport.php b/admin/jsonexport.php old mode 100644 new mode 100755 diff --git a/admin/listdiag.php b/admin/listdiag.php old mode 100644 new mode 100755 diff --git a/admin/ltioutcomeservice.php b/admin/ltioutcomeservice.php old mode 100644 new mode 100755 diff --git a/admin/ltiuserprefs.php b/admin/ltiuserprefs.php old mode 100644 new mode 100755 diff --git a/admin/modcourseorder.php b/admin/modcourseorder.php old mode 100644 new mode 100755 diff --git a/admin/processltiqueue.php b/admin/processltiqueue.php old mode 100644 new mode 100755 diff --git a/admin/pushoutchg.php b/admin/pushoutchg.php old mode 100644 new mode 100755 diff --git a/admin/transfercourse.php b/admin/transfercourse.php old mode 100644 new mode 100755 diff --git a/admin/unhidefromcourselist.php b/admin/unhidefromcourselist.php old mode 100644 new mode 100755 diff --git a/admin/unittests.php b/admin/unittests.php old mode 100644 new mode 100755 diff --git a/admin/userdetails.php b/admin/userdetails.php old mode 100644 new mode 100755 diff --git a/admin/userlti.php b/admin/userlti.php old mode 100644 new mode 100755 diff --git a/assessment/asidutil.php b/assessment/asidutil.php old mode 100644 new mode 100755 diff --git a/assessment/catscores.php b/assessment/catscores.php old mode 100644 new mode 100755 diff --git a/assessment/checkint.php b/assessment/checkint.php old mode 100644 new mode 100755 diff --git a/assessment/displayq2.php b/assessment/displayq2.php old mode 100644 new mode 100755 diff --git a/assessment/eqnhelper.html b/assessment/eqnhelper.html old mode 100644 new mode 100755 diff --git a/assessment/eqnhelperbasic.html b/assessment/eqnhelperbasic.html old mode 100644 new mode 100755 diff --git a/assessment/font/Symbola.eot b/assessment/font/Symbola.eot old mode 100644 new mode 100755 diff --git a/assessment/font/Symbola.otf b/assessment/font/Symbola.otf old mode 100644 new mode 100755 diff --git a/assessment/font/Symbola.svg b/assessment/font/Symbola.svg old mode 100644 new mode 100755 diff --git a/assessment/font/Symbola.ttf b/assessment/font/Symbola.ttf old mode 100644 new mode 100755 diff --git a/assessment/font/Symbola.woff b/assessment/font/Symbola.woff old mode 100644 new mode 100755 diff --git a/assessment/font/Symbola2.eot b/assessment/font/Symbola2.eot old mode 100644 new mode 100755 diff --git a/assessment/font/Symbola2.svg b/assessment/font/Symbola2.svg old mode 100644 new mode 100755 diff --git a/assessment/font/Symbola2.ttf b/assessment/font/Symbola2.ttf old mode 100644 new mode 100755 diff --git a/assessment/font/Symbola2.woff b/assessment/font/Symbola2.woff old mode 100644 new mode 100755 diff --git a/assessment/header.php b/assessment/header.php old mode 100644 new mode 100755 diff --git a/assessment/interpret5.php b/assessment/interpret5.php old mode 100644 new mode 100755 diff --git a/assessment/libs/JSXG.html b/assessment/libs/JSXG.html old mode 100644 new mode 100755 diff --git a/assessment/libs/JSXG.php b/assessment/libs/JSXG.php old mode 100644 new mode 100755 diff --git a/assessment/libs/Viewer.class b/assessment/libs/Viewer.class old mode 100644 new mode 100755 diff --git a/assessment/libs/acct.html b/assessment/libs/acct.html old mode 100644 new mode 100755 diff --git a/assessment/libs/acct.php b/assessment/libs/acct.php old mode 100644 new mode 100755 diff --git a/assessment/libs/calculus.html b/assessment/libs/calculus.html old mode 100644 new mode 100755 diff --git a/assessment/libs/calculus.php b/assessment/libs/calculus.php old mode 100644 new mode 100755 diff --git a/assessment/libs/chemistry.html b/assessment/libs/chemistry.html old mode 100644 new mode 100755 diff --git a/assessment/libs/chemistry.php b/assessment/libs/chemistry.php old mode 100644 new mode 100755 diff --git a/assessment/libs/chgbase.html b/assessment/libs/chgbase.html old mode 100644 new mode 100755 diff --git a/assessment/libs/chgbase.php b/assessment/libs/chgbase.php old mode 100644 new mode 100755 diff --git a/assessment/libs/construct2.html b/assessment/libs/construct2.html old mode 100644 new mode 100755 diff --git a/assessment/libs/construct2.php b/assessment/libs/construct2.php old mode 100644 new mode 100755 diff --git a/assessment/libs/crypto.html b/assessment/libs/crypto.html old mode 100644 new mode 100755 diff --git a/assessment/libs/crypto.php b/assessment/libs/crypto.php old mode 100644 new mode 100755 diff --git a/assessment/libs/expressInstall.swf b/assessment/libs/expressInstall.swf old mode 100644 new mode 100755 diff --git a/assessment/libs/finance.html b/assessment/libs/finance.html old mode 100644 new mode 100755 diff --git a/assessment/libs/finance.php b/assessment/libs/finance.php old mode 100644 new mode 100755 diff --git a/assessment/libs/fractions.html b/assessment/libs/fractions.html old mode 100644 new mode 100755 diff --git a/assessment/libs/fractions.php b/assessment/libs/fractions.php old mode 100644 new mode 100755 diff --git a/assessment/libs/functioneval.html b/assessment/libs/functioneval.html old mode 100644 new mode 100755 diff --git a/assessment/libs/functioneval.php b/assessment/libs/functioneval.php old mode 100644 new mode 100755 diff --git a/assessment/libs/geogebra.html b/assessment/libs/geogebra.html old mode 100644 new mode 100755 diff --git a/assessment/libs/geogebra.php b/assessment/libs/geogebra.php old mode 100644 new mode 100755 diff --git a/assessment/libs/geom.php b/assessment/libs/geom.php old mode 100644 new mode 100755 diff --git a/assessment/libs/graphtheory.html b/assessment/libs/graphtheory.html old mode 100644 new mode 100755 diff --git a/assessment/libs/graphtheory.php b/assessment/libs/graphtheory.php old mode 100644 new mode 100755 diff --git a/assessment/libs/ineq.html b/assessment/libs/ineq.html old mode 100644 new mode 100755 diff --git a/assessment/libs/ineq.php b/assessment/libs/ineq.php old mode 100644 new mode 100755 diff --git a/assessment/libs/interval.html b/assessment/libs/interval.html old mode 100644 new mode 100755 diff --git a/assessment/libs/interval.php b/assessment/libs/interval.php old mode 100644 new mode 100755 diff --git a/assessment/libs/interval_ext.html b/assessment/libs/interval_ext.html old mode 100644 new mode 100755 diff --git a/assessment/libs/interval_ext.php b/assessment/libs/interval_ext.php old mode 100644 new mode 100755 diff --git a/assessment/libs/libhelp.php b/assessment/libs/libhelp.php old mode 100644 new mode 100755 diff --git a/assessment/libs/lineutil.html b/assessment/libs/lineutil.html old mode 100644 new mode 100755 diff --git a/assessment/libs/lineutil.php b/assessment/libs/lineutil.php old mode 100644 new mode 100755 diff --git a/assessment/libs/matrix.html b/assessment/libs/matrix.html old mode 100644 new mode 100755 diff --git a/assessment/libs/matrix.php b/assessment/libs/matrix.php old mode 100644 new mode 100755 diff --git a/assessment/libs/normalcurve.html b/assessment/libs/normalcurve.html old mode 100644 new mode 100755 diff --git a/assessment/libs/normalcurve.php b/assessment/libs/normalcurve.php old mode 100644 new mode 100755 diff --git a/assessment/libs/plot3d.html b/assessment/libs/plot3d.html old mode 100644 new mode 100755 diff --git a/assessment/libs/plot3d.php b/assessment/libs/plot3d.php old mode 100644 new mode 100755 diff --git a/assessment/libs/poly3.html b/assessment/libs/poly3.html old mode 100644 new mode 100755 diff --git a/assessment/libs/poly3.php b/assessment/libs/poly3.php old mode 100644 new mode 100755 diff --git a/assessment/libs/polys.html b/assessment/libs/polys.html old mode 100644 new mode 100755 diff --git a/assessment/libs/polys.php b/assessment/libs/polys.php old mode 100644 new mode 100755 diff --git a/assessment/libs/polys2.html b/assessment/libs/polys2.html old mode 100644 new mode 100755 diff --git a/assessment/libs/polys2.php b/assessment/libs/polys2.php old mode 100644 new mode 100755 diff --git a/assessment/libs/primes.html b/assessment/libs/primes.html old mode 100644 new mode 100755 diff --git a/assessment/libs/primes.php b/assessment/libs/primes.php old mode 100644 new mode 100755 diff --git a/assessment/libs/radicals.html b/assessment/libs/radicals.html old mode 100644 new mode 100755 diff --git a/assessment/libs/radicals.php b/assessment/libs/radicals.php old mode 100644 new mode 100755 diff --git a/assessment/libs/sagecell.html b/assessment/libs/sagecell.html old mode 100644 new mode 100755 diff --git a/assessment/libs/sagecell.php b/assessment/libs/sagecell.php old mode 100644 new mode 100755 diff --git a/assessment/libs/sagecellframe.html b/assessment/libs/sagecellframe.html old mode 100644 new mode 100755 diff --git a/assessment/libs/simplex.html b/assessment/libs/simplex.html old mode 100644 new mode 100755 diff --git a/assessment/libs/simplex.php b/assessment/libs/simplex.php old mode 100644 new mode 100755 diff --git a/assessment/libs/socchoice.html b/assessment/libs/socchoice.html old mode 100644 new mode 100755 diff --git a/assessment/libs/socchoice.php b/assessment/libs/socchoice.php old mode 100644 new mode 100755 diff --git a/assessment/libs/solvers.html b/assessment/libs/solvers.html old mode 100644 new mode 100755 diff --git a/assessment/libs/solvers.php b/assessment/libs/solvers.php old mode 100644 new mode 100755 diff --git a/assessment/libs/stats.html b/assessment/libs/stats.html old mode 100644 new mode 100755 diff --git a/assessment/libs/stats.php b/assessment/libs/stats.php old mode 100644 new mode 100755 diff --git a/assessment/libs/timedate.php b/assessment/libs/timedate.php old mode 100644 new mode 100755 diff --git a/assessment/libs/vector.html b/assessment/libs/vector.html old mode 100644 new mode 100755 diff --git a/assessment/libs/vector.php b/assessment/libs/vector.php old mode 100644 new mode 100755 diff --git a/assessment/libs/viewer3d.swf b/assessment/libs/viewer3d.swf old mode 100644 new mode 100755 diff --git a/assessment/libs/virtmanip.html b/assessment/libs/virtmanip.html old mode 100644 new mode 100755 diff --git a/assessment/libs/virtmanip.php b/assessment/libs/virtmanip.php old mode 100644 new mode 100755 diff --git a/assessment/macros.php b/assessment/macros.php old mode 100644 new mode 100755 diff --git a/assessment/mathphp2.php b/assessment/mathphp2.php old mode 100644 new mode 100755 diff --git a/assessment/mathquill.css b/assessment/mathquill.css old mode 100644 new mode 100755 diff --git a/assessment/mathquilled.html b/assessment/mathquilled.html old mode 100644 new mode 100755 diff --git a/assessment/mathtest.css b/assessment/mathtest.css old mode 100644 new mode 100755 index 69ec5e35ff..e1e75c0e8a --- a/assessment/mathtest.css +++ b/assessment/mathtest.css @@ -159,7 +159,7 @@ div.spacer { div.navbar { float: left; - width:120px; + max-width: 190px; padding:10px; margin-top:0px; background-color: #e0ffe0; @@ -210,18 +210,18 @@ table.p3longdiv td.right { padding: 0px; } table.p3longdiv td.bottomborder { - border-bottom:1px solid black; - text-align: right; + border-bottom:1px solid black; + text-align: right; padding: 0px; } table.p3longdiv td.topborder { - border-top:1px solid black; - text-align: right; + border-top:1px solid black; + text-align: right; padding: 0px; } -table.p3longdiv td.topleftborder { +table.p3longdiv td.topleftborder { border-left: 1px solid black; - border-top: 1px solid black; + border-top: 1px solid black; text-align: right; padding: 0px; } @@ -973,7 +973,7 @@ a[rel*=noopener]:after { .mce-content-body a[target=_blank]:after { display: none; } -.mce-content-body span.AMedit {border: 1px solid #ff0000;} +.mce-content-body span.AMedit {border: 1px solid #ff0000;} .clearfix:after { content: " "; display: block; diff --git a/assessment/print.css b/assessment/print.css old mode 100644 new mode 100755 diff --git a/assessment/printtest.php b/assessment/printtest.php old mode 100644 new mode 100755 diff --git a/assessment/qimages/Thumbs.db b/assessment/qimages/Thumbs.db old mode 100644 new mode 100755 diff --git a/assessment/showsoln.php b/assessment/showsoln.php old mode 100644 new mode 100755 diff --git a/assessment/showtest.php b/assessment/showtest.php old mode 100644 new mode 100755 index faba32f1b4..ac75c06eab --- a/assessment/showtest.php +++ b/assessment/showtest.php @@ -177,14 +177,14 @@ //check reqscore if ($isRealStudent && abs($adata['reqscore'])>0 && $adata['reqscoreaid']>0 && !$waivereqscore && !$isreview) { $isBlocked = false; - + $query = "SELECT ias.bestscores,ia.ptsposs,ia.name FROM imas_assessments AS ia LEFT JOIN "; $query .= "imas_assessment_sessions AS ias ON ias.assessmentid=ia.id AND ias.userid=:userid "; $query .= "WHERE ia.id=:assessmentid"; $bestscores_stm = $DBH->prepare($query); $bestscores_stm->execute(array(':assessmentid'=>$adata['reqscoreaid'], ':userid'=>$userid)); list($prereqscore,$reqscoreptsposs,$reqscorename) = $bestscores_stm->fetch(PDO::FETCH_NUM); - + if ($prereqscore === null) { $isBlocked = true; } else { @@ -195,7 +195,7 @@ $prereqscoretot += getpts($prereqscore[$i]); } $isBlocked = false; - + if ($adata['reqscoretype']&2) { //using percent-based if ($reqscoreptsposs==-1) { require("../includes/updateptsposs.php"); @@ -220,7 +220,7 @@ require("../footer.php"); exit; } - + } //check for password @@ -545,6 +545,10 @@ $stm = $DBH->prepare("SELECT * FROM imas_assessment_sessions WHERE id=:id"); $stm->execute(array(':id'=>$testid)); $line = $stm->fetch(PDO::FETCH_ASSOC); + $stm = $DBH->prepare("SELECT justintimeorder FROM imas_assessments WHERE id=:id"); + $stm->execute(array(':id'=>$line['assessmentid'])); + $jitorder = $stm->fetch(PDO::FETCH_ASSOC); + $line['JustInTime']=$jitorder; $GLOBALS['assessver'] = $line['ver']; if (strpos($line['questions'],';')===false) { $questions = explode(",",$line['questions']); @@ -838,6 +842,79 @@ $nocolormark = true; } + //JIT addon + $jitParent = array(); + $jitHasChildren = array(); + $jitChildren = array(); + $jitQuestionsFlip = array_flip($questions); +//print_r($qi); + + function getChildren($structure,&$jitParent,&$jitHasChildren,&$jitChildren,$parentID){ + $jitChildren[$parentID] = array(); + foreach ($structure as $q){ + $jitChildren[$parentID][] = $q['id']; + $jitParent[$q['id']] = $parentID; + if(array_key_exists('children', $q)){ + $jitHasChildren[] = $q['id']; + getChildren($q['children'],$jitParent,$jitHasChildren,$jitChildren, $q['id']); + } + } + } + foreach (json_decode($line['JustInTime']['justintimeorder'], true) as $q) { + //print_r($q); + //echo array_key_exists('children', $q); + if(array_key_exists('children', $q)){ + $jitHasChildren[] = $q['id']; + getChildren($q['children'],$jitParent,$jitHasChildren,$jitChildren,$q['id']); + } + } + + function countParents(&$jitParent,$id,$ret){ + if(array_key_exists($id, $jitParent)){ + return countParents($jitParent, $jitParent[$id], $ret+1); + } + return $ret; + } + function isPrevQOnSameLevelIsCorrect($i){ + global $qi,$bestscores,$questions,$scores,$jitParent,$jitChildren,$jitHasChildren,$jitQuestionsFlip; + $parents = countParents($jitParent, $questions[$i],1); + for($j = $i-1; $j >= 0; $j--){ + + if(countParents($jitParent, $questions[$j],1) == $parents){ + //echo "scr:".var_dump(getpts($bestscores[$j])==$qi[$questions[$j]]['points'])."<="; + return getpts($bestscores[$j]) == $qi[$questions[$j]]['points']; + } + } + + } + + function areChildrenCompleted($ii,&$jitHasChildren,&$jitChildren,&$jitQuestionsFlip){ + global $qi,$bestscores; + if(!in_array($ii,$jitHasChildren)){ + return true; + } + + foreach($jitChildren[$ii] as $child){ + //echo " ".$bestscores[$jitQuestionsFlip[$child]]."/".$qi[$child]['points']; + if($bestscores[$jitQuestionsFlip[$child]] < $qi[$child]['points']) + return false; + } + return true; + } + function jitMarkChildrenCorrect($ii){ + global $qi,$bestscores,$scores,$jitChildren,$jitHasChildren,$jitQuestionsFlip; + if(!in_array($ii,$jitHasChildren)){ + return; + } + //echo ":".$ii.":"; +//print_r($jitChildren); + foreach($jitChildren[$ii] as $child){ + $bestscores[$jitQuestionsFlip[$child]] = $qi[$child]['points']; + $scores[$jitQuestionsFlip[$child]] = $qi[$child]['points']; + jitMarkChildrenCorrect($child); + } + } + $reloadqi = false; if (isset($_GET['reattempt'])) { if ($_GET['reattempt']=="all") { @@ -915,7 +992,15 @@ } } else { $toclear = $_GET['reattempt']; - if ($attempts[$toclear]<$qi[$questions[$toclear]]['attempts'] || $qi[$questions[$toclear]]['attempts']==0) { + if ($attempts[$toclear]<$qi[$questions[$toclear]]['attempts'] || $qi[$questions[$toclear]]['attempts']==0 || + ($_GET['action']=="jitskip" && (!in_array($questions[$i],$jitHasChildren) || + areChildrenCompleted($questions[$i],$jitHasChildren,$jitChildren,$jitQuestionsFlip))) + ) { + if($_GET['action']=="jitskip"){ + //Set new seed + $attempts[$toclear]=0; + $qi[$questions[$toclear]]['regen'] = 1; + } //$scores[$toclear] = -1; if (!in_array($toclear,$reattempting)) { $reattempting[] = $toclear; @@ -2046,6 +2131,298 @@ endtest($testsettings); if ($shown) {leavetestmsg();} } + } else if ($_GET['action']=="jitskip") { + + if (isset($_GET['score'])) { //score a problem + global $imasroot,$isteacher,$isdiag,$testsettings,$attempts,$qi,$allowregen,$bestscores,$isreview,$showeachscore,$noindivscores,$CFG,$jitParent,$jitHasChildren,$jitChildren,$jitQuestionsFlip; + $qn = $_GET['score']; + + //TODO: Change the number of attempts to oo if required + //print_r($jitHasChildren); + + + if ($_POST['verattempts']!=$attempts[$qn] && !(!in_array($questions[$qn],$jitHasChildren) || + areChildrenCompleted($questions[$qn],$jitHasChildren,$jitChildren,$jitQuestionsFlip))) { + echo "

", _('This question has been submittted since you viewed it, and that grade is shown below. Your answer just submitted was not scored or recorded.'), "

"; + } else { + if (isset($_POST['disptime']) && !$isreview) { + $used = $now - intval($_POST['disptime']); + $timesontask[$qn] .= (($timesontask[$qn]=='') ? '':'~').$used; + } + $GLOBALS['scoremessages'] = ''; + $GLOBALS['questionmanualgrade'] = false; + $rawscore = scorequestion($qn); + + $immediatereattempt = false; + if (!$superdone && $showeachscore && hasreattempts($qn)) { + if (!(($regenonreattempt && $qi[$questions[$toclear]]['regen']==0) || $qi[$questions[$toclear]]['regen']==1)) { + if (!in_array($qn,$reattempting)) { + //$reattempting[] = $qn; + $immediatereattempt = true; + } + } + } + //cho "score!".array_sum(explode("~",$rawscore))."
point: ".$qi[$questions[$qn]]['points']; + if($rawscore == $qi[$questions[$qn]]['points'] || array_sum(explode("~",$rawscore))){ + //Find all children and mark them as correct + jitMarkChildrenCorrect($questions[$qn]); + + } else{ + //TODO: Reset attempts if the all children are completed + //echo "NOOO "; + if(areChildrenCompleted($questions[$qn],$jitHasChildren,$jitChildren,$jitQuestionsFlip) && + $attempts[$qn] == $qi[$questions[$qn]]['attempts'] + ){ + //echo "Children COMPLETED"; + //$immediatereattempt = true; + } + } + + //record score + recordtestdata(); + } + if (!$superdone) { + echo filter("\n"); + $lefttodo = shownavbarJustInTime($line['JustInTime']['justintimeorder'],$questions,$scores,$qn,$testsettings['showcat'],$testsettings['extrefs']); + + echo "
\n"; + echo "
"._('Start of Questions')."
\n"; + if ($GLOBALS['scoremessages'] != '') { + echo '

'.$GLOBALS['scoremessages'].'

'; + } + + if ($showeachscore) { + $possible = $qi[$questions[$qn]]['points']; + if (getpts($rawscore)!=getpts($scores[$qn])) { + echo "

", _('Score before penalty on last attempt: '); + echo printscore($rawscore,$qn); + echo "

"; + } + echo "

"; + echo _('Score on last attempt: '); + echo printscore($scores[$qn],$qn); + echo "

\n"; + echo "

", _('Score in gradebook: '); + echo printscore($bestscores[$qn],$qn); + echo "

"; + if ($GLOBALS['questionmanualgrade'] == true) { + echo '

', _('Note:'), ' ', _('This question contains parts that can not be auto-graded. Those parts will count as a score of 0 until they are graded by your instructor'), '

'; + } + + + } else { + echo '

'._('Question Scored').'

'; + } + + $reattemptsremain = false; + if (hasreattempts($qn)) { + $reattemptsremain = true; + } + + if ($allowregen && $qi[$questions[$qn]]['allowregen']==1) { + echo '

'; + if ($reattemptsremain && !$immediatereattempt && $reattemptduring) { + echo "", _('Reattempt last question'), ", "; + } + echo "", _('Try another similar question'), ""; + if ($immediatereattempt) { + echo _(", reattempt last question below, or select another question."); + } else { + echo _(", or select another question"); + } + echo "

\n"; + } else if ($reattemptsremain && !$immediatereattempt && $reattemptduring) { + echo "

", _('Reattempt last question'), ""; + if ($lefttodo > 0) { + echo _(", or select another question"); + } + echo '

'; + } else { + if ($reattemptsremain && $immediatereattempt && $reattemptduring) { + echo "

"._('Reattempt last question below, or select another question').'

'; + } else { + echo "

"._('It looks like you had difficulty with the problem. Please select the next question from the menu on the left to help you acquire the necessary knowledge.').'

'; + echo "

"._('If you continue to have trouble, please visit the Math Lab for additional help.').'

'; + } + } + + if ((!$reattemptsremain || $regenonreattempt) && $showeachscore && $testsettings['showans']!='N') { + //TODO i18n + unset($GLOBALS['nocolormark']); + echo "

" . _("This question, with your last answer"); + if (($qi[$questions[$qn]]['showansafterlast'] && !$reattemptsremain) || + ($qi[$questions[$qn]]['showansduring'] && $qi[$questions[$qn]]['showans']<=$attempts[$qn]) || + ($qi[$questions[$qn]]['showans']=='R' && $regenonreattempt)) { + echo _(" and correct answer"); + $showcorrectnow = true; + } else { + $showcorrectnow = false; + } + + echo _(', is displayed below') . '

'; + if (!$noraw && $showeachscore && $GLOBALS['questionmanualgrade'] != true) { + //$colors = scorestocolors($rawscores[$qn], '', $qi[$questions[$qn]]['answeights'], $noraw); + if (strpos($rawscores[$qn],'~')!==false) { + $colors = explode('~',$rawscores[$qn]); + } else { + $colors = array($rawscores[$qn]); + } + } else { + $colors = array(); + } + if ($showcorrectnow) { + displayq($qn,$qi[$questions[$qn]]['questionsetid'],$seeds[$qn],2,false,$attempts[$qn],false,false,false,$colors); + } else { + displayq($qn,$qi[$questions[$qn]]['questionsetid'],$seeds[$qn],false,false,$attempts[$qn],false,false,false,$colors); + } + $contactlinks = showquestioncontactlinks($qn); + if ($contactlinks!='' && !$sessiondata['istutorial']) { + echo '
'.$contactlinks.'
'; + } + + } else if ($immediatereattempt) { + $next = $qn; + if (isset($intropieces)) { + foreach ($introdividers as $k=>$v) { + if ($v[1]<=$next+1 && $next+1<=$v[2]) {//right divider + if ($next+1==$v[1] || !empty($v[3])) { + echo '
'; + echo _('Hide Question Information'), '
'; + echo '
'.filter($intropieces[$k]).'
'; + } else { + echo '
'; + echo ''; + } + break; + } + } + } + echo "
\n"; + echo ""; + echo ''; + echo ""; + echo "
"._('Start of Questions')."
\n"; + basicshowq($next); + showqinfobar($next,true,true); + echo ''; + if ((($testsettings['showans']=='J' && $qi[$questions[$next]]['showans']=='0') || $qi[$questions[$next]]['showans']=='J') && $qi[$questions[$next]]['attempts']>0) { + echo ' '; + } + echo "
\n"; + + } + //Hide 'See summary of your scores' + /* + if ($testsettings['testtype']!="NoScores") { + echo "

". _("When you are done, ") . " " . _("click here to see a summary of your scores") . ".

\n"; + } + */ + + echo "
\n"; + } + } else if (isset($_GET['to'])) { //jump to a problem + $next = $_GET['to']; + echo filter("\n"); + + $lefttodo = shownavbarJustInTime($line['JustInTime']['justintimeorder'],$questions,$scores,$next,$testsettings['showcat'],$testsettings['extrefs']); + if (unans($scores[$next]) || amreattempting($next)) { + echo "
\n"; + if (isset($intropieces)) { + foreach ($introdividers as $k=>$v) { + if ($v[1]<=$next+1 && $next+1<=$v[2]) {//right divider + if ($next+1==$v[1] || !empty($v[3])) { + echo '
'; + echo _('Hide Question Information'), '
'; + echo '
'.filter($intropieces[$k]).'
'; + } else { + echo '
'; + echo ''; + } + break; + } + } + } + echo "
\n"; + echo ""; + echo ''; + echo ""; + echo "
"._('Start of Questions')."
\n"; + basicshowq($next); + showqinfobar($next,true,true); + echo ''; + if ((($testsettings['showans']=='J' && $qi[$questions[$next]]['showans']=='0') || $qi[$questions[$next]]['showans']=='J') && $qi[$questions[$next]]['attempts']>0) { + echo ' '; + } + echo "
\n"; + echo "
\n"; + } else { + echo "
\n"; + echo "
"._('Start of Questions')."
\n"; + if (!isset($_GET['jumptoans'])) { + echo _("You've already done this problem."), "\n"; + } + $reattemptsremain = false; + if ($showeachscore) { + $possible = $qi[$questions[$next]]['points']; + echo "

", _('Score on last attempt: '); + echo printscore($scores[$next],$next); + echo "

\n"; + echo "

", _('Score in gradebook: '); + echo printscore($bestscores[$next],$next); + echo "

"; + } + if (hasreattempts($next)) { + if ($reattemptduring) { + echo "

", _('Reattempt this question'), "

\n"; + } + $reattemptsremain = true; + } + if ($allowregen && $qi[$questions[$next]]['allowregen']==1) { + echo "

", _('Try another similar question'), "

\n"; + } + if ($lefttodo == 0 && $testsettings['testtype']!="NoScores") { + echo "", _('When you are done, click here to see a summary of your score'), "\n"; + } + if ($testsettings['showans']!='N') {// && $showeachscore) { //(!$reattemptsremain || $regenonreattempt) && + unset($GLOBALS['nocolormark']); + //echo "

", _('Question with last attempt is displayed for your review only'), "

"; + echo "

"._('It looks like you had difficulty with the problem. Please select the next question from the menu on the left to help you acquire the necessary knowledge.').'

'; + echo "

"._('If you continue to have trouble, please visit the Math Lab for additional help.').'

'; + + if (!$noraw && $showeachscore) { + //$colors = scorestocolors($rawscores[$next], '', $qi[$questions[$next]]['answeights'], $noraw); + if (strpos($rawscores[$next],'~')!==false) { + $colors = explode('~',$rawscores[$next]); + } else { + $colors = array($rawscores[$next]); + } + } else { + $colors = array(); + } + $qshowans = (($qi[$questions[$next]]['showansafterlast'] && !$reattemptsremain) || + ($qi[$questions[$next]]['showansduring'] && $attempts[$next]>=$qi[$questions[$next]]['showans']) || + ($qi[$questions[$next]]['showans']=='R' && $regenonreattempt)); + if ($qshowans) { + displayq($next,$qi[$questions[$next]]['questionsetid'],$seeds[$next],2,false,$attempts[$next],false,false,false,$colors); + } else { + displayq($next,$qi[$questions[$next]]['questionsetid'],$seeds[$next],false,false,$attempts[$next],false,false,false,$colors); + } + $contactlinks = showquestioncontactlinks($next); + if ($contactlinks!='') { + echo '
'.$contactlinks.'
'; + } + } + echo "
\n"; + } + } + if (isset($_GET['done'])) { //are all done + + $shown = showscores($questions,$attempts,$testsettings); + endtest($testsettings); + if ($shown) {leavetestmsg();} + } } else if ($_GET['action']=="seq") { if (isset($_GET['score'])) { //score a problem $qn = $_GET['score']; @@ -2298,7 +2675,7 @@ if ($allowregen && $qi[$questions[$qn]]['allowregen']==1) { $regenhref = $GLOBALS['basesiteurl'].'/assessment/'."showtest.php?regen=$qn&page=$page&r=".Sanitize::randomQueryStringParam()."#embedqwrapper$qn"; echo '

'; - + //echo "

", _('Try another similar question'), "

\n"; } if (hasreattempts($qn)) { @@ -2647,7 +3024,7 @@ } } $reattempting = array(); - + if ($numdisplayed > 0) { echo '
'; echo ''; @@ -2753,6 +3130,50 @@ } echo "\n"; + } + } else if ($testsettings['displaymethod'] == "JustInTime") { + echo filter("
{$testsettings['intro']}
\n"); + + for ($i = 0; $i
\n"; + echo "
"._('Start of Questions')."
\n"; + + startoftestmessage($perfectscore,$hasreattempts,$allowregen,$noindivscores,$testsettings['testtype']=="NoScores"); + + leavetestmsg(); + + } else { + echo "
\n"; + if (isset($intropieces)) { + foreach ($introdividers as $k=>$v) { + if ($v[1]<=$i+1 && $i+1<=$v[2]) {//right divider + echo ''; + echo '
'.filter($intropieces[$k]).'
'; + break; + } + } + } + echo "
\n"; + echo ""; + echo ''; + echo ""; + echo "
"._('Start of Questions')."
\n"; + basicshowq($i); + showqinfobar($i,true,true); + echo ''; + if ((($testsettings['showans']=='J' && $qi[$questions[$i]]['showans']=='0') || $qi[$questions[$i]]['showans']=='J') && $qi[$questions[$i]]['attempts']>0) { + echo ' '; + } + echo "
\n"; + echo "
\n"; + } } else if ($testsettings['displaymethod'] == "Seq") { for ($i = 0; $i

'; - + //echo "

", _('Try another similar question'), "

\n"; } if ($showeachscore) { @@ -3225,9 +3646,9 @@ function showvideoembednavbar($viddata) { function showembednavbar($pginfo,$curpg) { global $imasroot,$scores,$bestscores,$showeachscore,$qi,$questions,$testsettings; - + echo ''; } + function shownavbarJustInTime($jitorder,$questions,$scores,$current,$showcat,$extrefs) { + global $imasroot,$isteacher,$isdiag,$testsettings,$attempts,$qi,$allowregen,$bestscores,$isreview,$showeachscore,$noindivscores,$CFG,$jitParent,$jitHasChildren,$jitChildren,$jitQuestionsFlip; + $todo = 0; + $earned = 0; + $poss = 0; + //print_r json_decode($jitorder); + + //get array of parents + //TODO: bookmark + //print_r(json_decode($jitorder, true)); + //print_r($jitParent); + //print_r($jitHasChildren); + //print_r($jitChildren); + //print_r($questions); + //print_r($jitChildren); + + + echo '\n"; + return $todo; + } + function shownavbar($questions,$scores,$current,$showcat,$extrefs) { global $imasroot,$isteacher,$isdiag,$testsettings,$attempts,$qi,$allowregen,$bestscores,$isreview,$showeachscore,$noindivscores,$CFG; $todo = 0; $earned = 0; $poss = 0; - echo '"; + html += "
Actions
"; + html += ""; + var text_segment_count = 0; + var curqnum = 0; + var curqitemloc = 0; + var badgrppoints = false; + var badthisgrppoints = false; + var grppoints = -1; + for (var i = 0; i < itemcount; i++) { + + curistext = 0; + curisgroup = 0; + if (itemarray[i][0] == "text") { + var curitems = new Array(); + curitems[0] = itemarray[i]; + curistext = 1; + } else if (itemarray[i].length < 5) { //is group + curitems = itemarray[i][2]; + curisgroup = 1; + } else { //not group + var curitems = new Array(); + curitems[0] = itemarray[i]; + } + curqitemloc = i - text_segment_count; + //var ms = generateMoveSelect(i,itemcount); + var ms = generateMoveSelect2(i); + grppoints = -1; + badthisgrppoints = false; + for (var j = 0; j < curitems.length; j++) { + if (alt == 0) { + curclass = 'even'; + } else { + curclass = 'odd'; + } + if (curistext == 1) { + curclass += ' dd-nochildren textsegmentrow skipmathrender'; + } + if (curitems[j][0] != "text") { + html += "
  • Drag
    "; + } else { + id = htmlEntities(curitems[j][1]); + html += "
  • Drag
    "; + } + + if (curisgroup) { + if (curitems[0][4] == 9999) { //points + curgrppoints = defpoints; + } else { + curgrppoints = curitems[0][4]; + } + } + if (beentaken) { + if (curisgroup) { + if (j == 0) { + html += "
    Q" + (curqnum + 1) + "
    Group, choosing " + itemarray[i][0]; + if (itemarray[i][1] == 0) { + html += " without"; + } else if (itemarray[i][1] == 1) { + html += " with"; + } + html += " replacement
    "; + //html += ""; + html += "
    " + curgrppoints; + if (itemarray[i][0] > 1) { + html += "ea"; + } + html += "
    "; + html += "
    "; + } + html += "
     Q" + (curqnum + 1) + '-' + (j + 1); + } else if (curistext) { + //html += "Text"+(text_segment_count+1); + html += "
    "; //+ ms; + } else { + html += "
    Q" + (curqnum + 1); + } + html += ""; + html += "
    "; + } else { + html += "
    "; + if (j == 0) { + if (!curisgroup) { + html += "
    "; + } else { + if (itemarray[i][3] == 1) { + html += "\"Collapse\"/"; + } else { + html += "\"Expand\"/"; + } + html += '
    '; + } + //html += ms; + if (curisgroup) { + html += "
    Group "; + html += "Select from group of " + curitems.length; + html += " "; + if (itemarray[i][0] > 1) { + html += "ea"; + } + html += "
    "; + if (itemarray[i][3] == 0) { //collapsed group + if (curitems[0][4] == 9999) { //points + curpt = defpoints; + } else { + curpt = curitems[0][4]; + } + break; + } + html += "
    "; + + } + } + if (curisgroup) { + html += ""; + html += "Ungroup"; //FIX + } + html += "
    "; + } + if (curistext == 1) { + text_segment_count++; + //html += ""; //description + //html += 'Show for '; + if (displaymethod == "Embed") { + html += "
    "; + if (curitems[j][3] == 1) { + var header_contents = curitems[j][4]; + html += "

    " + header_contents + "

    "; + html += "
    "; + } + var contents = curitems[j][1]; + html += "
    " + contents + "
    "; //description + html += "
    "; + html += '
    '; + html += '
    "; + html += "
    " + generateShowforSelect(i) + "
    "; + } + //if (beentaken) { + // html += ""; + //} else { + html += "
    "; + //} + } else { + if (beentaken && curitems[j][6] == 1) { + html += '
    '; + } else { + html += '
    '; + } + html += ""; + html += curitems[j][2] + "
    "; //description + html += "
    '; + } + if ((curitems[j][7] & 2) == 2) { + html += 'Help Resource' + altadd + ''; + } + if ((curitems[j][7] & 8) == 8) { + html += 'Detailed solution' + altadd + ''; + } + html += "
    "; + html += "
    ID: " + curitems[j][1] + "
    "; + if (beentaken) { + html += "
    "; //Preview + } else { + html += "
    "; //Preview + } + html += "
    " + curitems[j][3] + "
    "; //question type + html += "
    "; + if (curitems[j][8][0] > 0) { + if (curitems[j][8].length > 3) { + html += ''; + } + html += curitems[j][8][0]; + if (curitems[j][8].length > 3) { + html += ''; + } + } + html += "
    "; + if (curitems[j][4] == 9999) { //points + curpt = defpoints; + } else { + curpt = curitems[j][4]; + } + if (curisgroup) { + if (grppoints == -1) { + grppoints = curpt; + } else if (curpt != grppoints) { + badgrppoints = true; + //fix it + if (grppoints == defpoints) { + itemarray[i][2][j][4] = 9999; + } else { + itemarray[i][2][j][4] = grppoints; + } + } + } + if (curisgroup) { + html += "
    "; + //} else if (badthisgrppoints) { + // html += ""+curpt+""; //points + } else { + if (beentaken) { + html += "
    " + curpt + "
    "; + } else { + html += "
    "; //points + } + } + + html += '
    '; + /* + html += "Change"; //settings + if (curitems[j][5]==1) { + html += "Edit"; //edit + } else { + html += "Edit"; //edit makelocal + } + if (beentaken) { + html += "Clear Attempts"; //add link + if (curitems[j][6]==1) { + html += "Withdrawn"; + } else { + html += "Withdraw"; + } + } else { + html += "Template"; //add link + html += "Remove"; //add link and checkbox + } + */ + } + html += "
  • "; + ln++; + } + if (curistext == 0) { + pttotal += curpt * (curisgroup ? itemarray[i][0] : 1); + curqnum += curisgroup ? itemarray[i][0] : 1; + } + alt = 1 - alt; + } + if (beentaken) { + html += '
    '; + } else { + html += '
    '; + } + html += '
    '; + if (text_segment_count > 1) { + html += "
    "; + html += "
    "; + } + html += '
    Help
    '; + html += '
    '; + + html += "
    "; + if (badgrppoints) { + submitChanges(); + html += "

    WARNING: All question in a group should be given the same point values.

    "; + } + document.getElementById("pttotal").innerHTML = pttotal; + $("#pttotal").parent().css("display", "inline-block"); + return html; +} + +function addtextsegment() { + if (confirm_textseg_dirty()) { + itemarray.push(["text", "", 1, 0, "", 1]); + refreshTable(); + } +} + +function check_textseg_itemarray() { + var lastwastext = false, + numq, j, firstpageloc = -1; + for (var i = 0; i < itemarray.length; i++) { + if (itemarray[i][0] == "text") { //this is text item + if (lastwastext) { //make sure showN matches + itemarray[i][2] = itemarray[i - 1][2]; + } + if (itemarray[i][3] == 1 && firstpageloc == -1) { + firstpageloc = i; + } + numq = 0; + j = i + 1; + while (j < itemarray.length && itemarray[j][0] != "text") { + numq++; + j++; + } + //make sure isn't bigger than number of q, but is at least 1 + itemarray[i][2] = Math.max(1, Math.min(itemarray[i][2], numq)); + + lastwastext = true; + } else { + lastwastext = false; + } + } + if (firstpageloc > 0) { + alert("If you are using page titles, you need to have a page title at the beginning."); + if (itemarray[0][0] == "text") { + itemarray[0][3] = 1; + itemarray[0][4] = "First Page Title"; + } else { + itemarray.unshift(["text", "", 1, 1, "First Page Title", 1]); + } + } +} + +function confirm_textseg_dirty() { + if (anyEditorIsDirty()) { + var discard_other_changes = confirm(_("There are unsaved changes in a question intro text box. Press OK to discard those changes and continue with the most recent action. Press Cancel to return to the page without taking any action.")); + } else { + var discard_other_changes = true; + } + return discard_other_changes; +} + +function submitChanges() { + var target = "submitnotice"; + check_textseg_itemarray(); + document.getElementById(target).innerHTML = _(' Saving Changes... '); + data = generateOutput(); + var outdata = { + order: data[0], + text_order: JSON.stringify(data[1]), + jitorder: JSON.stringify($('.dd3').nestable('serialize')) + }; + if (!beentaken) { + outdata["pts"] = JSON.stringify(data[2]); + outdata["defpts"] = $("#defpts").val() + } + $.ajax({ + type: "POST", + //url: "$imasroot/course/addquestions.php?cid=$cid&aid=$aid", + url: AHAHsaveurl, + data: outdata + }) + .done(function() { + if (!beentaken) { + defpoints = $("#defpts").val(); + } + justintimeorder = $('.dd3').nestable('serialize'); + document.getElementById(target).innerHTML = ''; + refreshTable(); + updateSaveButtonDimming(); + //scroll to top if save action puts the curqtbl out of view + if ($(window).scrollTop() > $("#curqtbl").position().top + $("#curqtbl").height()) { + $(window).scrollTop(0); + } + }) + .fail(function(xhr, status, errorThrown) { + document.getElementById(target).innerHTML = " Couldn't save changes:\n" + + status + "\n" + req.statusText + + "\nError: " + errorThrown + itemarray = olditemarray; + refreshTable(); + }) +} + +function htmlEntities(str) { + return String(str).replace(/"/g, ''); +} + +/* +function submitChanges() { + url = AHAHsaveurl + '&order='+generateOutput(); + var target = "submitnotice"; + document.getElementById(target).innerHTML = ' Saving Changes... '; + if (window.XMLHttpRequest) { + req = new XMLHttpRequest(); + } else if (window.ActiveXObject) { + req = new ActiveXObject("Microsoft.XMLHTTP"); + } + if (typeof req != 'undefined') { + req.onreadystatechange = function() {ahahDone(url, target);}; + req.open("GET", url, true); + req.send(""); + } +} + +function ahahDone(url, target) { + if (req.readyState == 4) { // only if req is "loaded" + if (req.status == 200) { // only if "OK" + if (req.responseText=='OK') { + document.getElementById(target).innerHTML=''; + refreshTable(); + } else { + document.getElementById(target).innerHTML=req.responseText; + itemarray = olditemarray; + } + } else { + document.getElementById(target).innerHTML=" Couldn't save changes:\n"+ req.status + "\n" +req.statusText; + itemarray = olditemarray; + } + } +} +*/ \ No newline at end of file diff --git a/javascript/addquestions.js b/javascript/addquestions.js old mode 100644 new mode 100755 diff --git a/javascript/assessment_min.js b/javascript/assessment_min.js old mode 100644 new mode 100755 diff --git a/javascript/codemirror/LICENSE b/javascript/codemirror/LICENSE old mode 100644 new mode 100755 diff --git a/javascript/codemirror/codemirror-compressed.js b/javascript/codemirror/codemirror-compressed.js old mode 100644 new mode 100755 diff --git a/javascript/codemirror/codemirror_min.css b/javascript/codemirror/codemirror_min.css old mode 100644 new mode 100755 diff --git a/javascript/codemirror/imathas.js b/javascript/codemirror/imathas.js old mode 100644 new mode 100755 diff --git a/javascript/colorpicker.js b/javascript/colorpicker.js old mode 100644 new mode 100755 diff --git a/javascript/confirmsubmit.js b/javascript/confirmsubmit.js old mode 100644 new mode 100755 diff --git a/javascript/copyitemslist.js b/javascript/copyitemslist.js old mode 100644 new mode 100755 diff --git a/javascript/course.js b/javascript/course.js old mode 100644 new mode 100755 diff --git a/javascript/coursebrowserprops.js.dist b/javascript/coursebrowserprops.js.dist old mode 100644 new mode 100755 diff --git a/javascript/cpimages/blank.gif b/javascript/cpimages/blank.gif old mode 100644 new mode 100755 diff --git a/javascript/cpimages/cp_arrows.gif b/javascript/cpimages/cp_arrows.gif old mode 100644 new mode 100755 diff --git a/javascript/cpimages/cp_color_slider.png b/javascript/cpimages/cp_color_slider.png old mode 100644 new mode 100755 diff --git a/javascript/cpimages/cp_cur_color_background.png b/javascript/cpimages/cp_cur_color_background.png old mode 100644 new mode 100755 diff --git a/javascript/cpimages/cp_horizontal_picker.png b/javascript/cpimages/cp_horizontal_picker.png old mode 100644 new mode 100755 diff --git a/javascript/cpimages/cp_lg_background.png b/javascript/cpimages/cp_lg_background.png old mode 100644 new mode 100755 diff --git a/javascript/cpimages/cp_lg_overlay.png b/javascript/cpimages/cp_lg_overlay.png old mode 100644 new mode 100755 diff --git a/javascript/cpimages/cp_mini_icon.png b/javascript/cpimages/cp_mini_icon.png old mode 100644 new mode 100755 diff --git a/javascript/cpimages/cp_web_safe.gif b/javascript/cpimages/cp_web_safe.gif old mode 100644 new mode 100755 diff --git a/javascript/d.svg b/javascript/d.svg old mode 100644 new mode 100755 diff --git a/javascript/diag.js b/javascript/diag.js old mode 100644 new mode 100755 diff --git a/javascript/drawing.js b/javascript/drawing.js old mode 100644 new mode 100755 diff --git a/javascript/eqnhelper.js b/javascript/eqnhelper.js old mode 100644 new mode 100755 diff --git a/javascript/eqntips.js b/javascript/eqntips.js old mode 100644 new mode 100755 diff --git a/javascript/excanvas.js b/javascript/excanvas.js old mode 100644 new mode 100755 diff --git a/javascript/excanvas_min.js b/javascript/excanvas_min.js old mode 100644 new mode 100755 diff --git a/javascript/fuse.min.js b/javascript/fuse.min.js old mode 100644 new mode 100755 diff --git a/javascript/gb-scoretools.js b/javascript/gb-scoretools.js old mode 100644 new mode 100755 diff --git a/javascript/general.js b/javascript/general.js old mode 100644 new mode 100755 diff --git a/javascript/gradebook.js b/javascript/gradebook.js old mode 100644 new mode 100755 diff --git a/javascript/iframeSizer_contentWindow_min.js b/javascript/iframeSizer_contentWindow_min.js old mode 100644 new mode 100755 diff --git a/javascript/jquery-sortable.js b/javascript/jquery-sortable.js old mode 100644 new mode 100755 diff --git a/javascript/jquery.min.js b/javascript/jquery.min.js old mode 100644 new mode 100755 diff --git a/javascript/jquery.nestable.js b/javascript/jquery.nestable.js new file mode 100755 index 0000000000..b22a2eaac9 --- /dev/null +++ b/javascript/jquery.nestable.js @@ -0,0 +1,1087 @@ +/*! + * Nestable jQuery Plugin - Copyright (c) 2014 Ramon Smit - https://github.com/RamonSmit/Nestable + */ + +(function($, window, document, undefined) { + var hasTouch = 'ontouchstart' in document; + + /** + * Detect CSS pointer-events property + * events are normally disabled on the dragging element to avoid conflicts + * https://github.com/ausi/Feature-detection-technique-for-pointer-events/blob/master/modernizr-pointerevents.js + */ + var hasPointerEvents = (function() { + var el = document.createElement('div'), + docEl = document.documentElement; + if (!('pointerEvents' in el.style)) { + return false; + } + el.style.pointerEvents = 'auto'; + el.style.pointerEvents = 'x'; + docEl.appendChild(el); + var supports = window.getComputedStyle && window.getComputedStyle(el, '').pointerEvents === 'auto'; + docEl.removeChild(el); + return !!supports; + })(); + + var defaults = { + contentCallback: function(item) { + return item.content || '' ? item.content : item.id; + }, + listNodeName: 'ol', + itemNodeName: 'li', + handleNodeName: 'div', + contentNodeName: 'span', + rootClass: 'dd3', + listClass: 'dd-list', + itemClass: 'dd-item', + dragClass: 'dd-dragel', + handleClass: 'dd-handle', + contentClass: 'dd-content', + collapsedClass: 'dd-collapsed', + placeClass: 'dd-placeholder', + noDragClass: 'dd-nodrag', + noChildrenClass: 'dd-nochildren', + emptyClass: 'dd-empty', + expandBtnHTML: '', + collapseBtnHTML: '', + group: 0, + maxDepth: 5, + threshold: 20, + fixedDepth: false, //fixed item's depth + fixed: false, + includeContent: false, + scroll: false, + scrollSensitivity: 1, + scrollSpeed: 5, + scrollTriggers: { + top: 40, + left: 40, + right: -40, + bottom: -40 + }, + effect: { + animation: 'none', + time: 'slow' + }, + callback: function(l, e, p) {}, + onDragStart: function(l, e, p) {}, + beforeDragStop: function(l, e, p) {}, + listRenderer: function(children, options) { + var html = '<' + options.listNodeName + ' class="' + options.listClass + '">'; + html += children; + html += ''; + + return html; + }, + itemRenderer: function(item_attrs, content, children, options, item) { + var item_attrs_string = $.map(item_attrs, function(value, key) { + return ' ' + key + '="' + value + '"'; + }).join(' '); + + var html = '<' + options.itemNodeName + item_attrs_string + '>'; + html += '<' + options.handleNodeName + ' class="' + options.handleClass + '">'; + html += ''; + html += '<' + options.contentNodeName + ' class="' + options.contentClass + '">'; + html += content; + html += ''; + html += children; + html += ''; + + return html; + } + }; + + function Plugin(element, options) { + this.w = $(document); + this.el = $(element); + options = options || defaults; + + if (options.rootClass !== undefined && options.rootClass !== 'dd') { + options.listClass = options.listClass ? options.listClass : options.rootClass + '-list'; + options.itemClass = options.itemClass ? options.itemClass : options.rootClass + '-item'; + options.dragClass = options.dragClass ? options.dragClass : options.rootClass + '-dragel'; + options.handleClass = options.handleClass ? options.handleClass : options.rootClass + '-handle'; + options.collapsedClass = options.collapsedClass ? options.collapsedClass : options.rootClass + '-collapsed'; + options.placeClass = options.placeClass ? options.placeClass : options.rootClass + '-placeholder'; + options.noDragClass = options.noDragClass ? options.noDragClass : options.rootClass + '-nodrag'; + options.noChildrenClass = options.noChildrenClass ? options.noChildrenClass : options.rootClass + '-nochildren'; + options.emptyClass = options.emptyClass ? options.emptyClass : options.rootClass + '-empty'; + } + + this.options = $.extend({}, defaults, options); + + // build HTML from serialized JSON if passed + if (this.options.json !== undefined) { + this._build(); + } + + this.init(); + } + + Plugin.prototype = { + + init: function() { + var list = this; + + list.reset(); + list.el.data('nestable-group', this.options.group); + list.placeEl = $('
    '); + + var items = this.el.find(list.options.itemNodeName); + $.each(items, function(k, el) { + var item = $(el), + parent = item.parent(); + list.setParent(item); + if (parent.hasClass(list.options.collapsedClass)) { + list.collapseItem(parent.parent()); + } + }); + + // Append the .dd-empty div if the list don't have any items on init + if (!items.length) { + this.appendEmptyElement(this.el); + } + + list.el.on('click', 'button', function(e) { + if (list.dragEl) { + return; + } + var target = $(e.currentTarget), + action = target.data('action'), + item = target.parents(list.options.itemNodeName).eq(0); + if (action === 'collapse') { + list.collapseItem(item); + } + if (action === 'expand') { + list.expandItem(item); + } + }); + + var onStartEvent = function(e) { + var handle = $(e.target); + if (!handle.hasClass(list.options.handleClass)) { + if (handle.closest('.' + list.options.noDragClass).length) { + return; + } + handle = handle.closest('.' + list.options.handleClass); + } + if (!handle.length || list.dragEl) { + return; + } + + list.isTouch = /^touch/.test(e.type); + if (list.isTouch && e.touches.length !== 1) { + return; + } + + e.preventDefault(); + list.dragStart(e.touches ? e.touches[0] : e); + }; + + var onMoveEvent = function(e) { + if (list.dragEl) { + e.preventDefault(); + list.dragMove(e.touches ? e.touches[0] : e); + } + }; + + var onEndEvent = function(e) { + if (list.dragEl) { + e.preventDefault(); + list.dragStop(e.touches ? e.changedTouches[0] : e); + } + }; + + if (hasTouch) { + list.el[0].addEventListener('touchstart', onStartEvent, false); + window.addEventListener('touchmove', onMoveEvent, false); + window.addEventListener('touchend', onEndEvent, false); + window.addEventListener('touchcancel', onEndEvent, false); + } + + list.el.on('mousedown', onStartEvent); + list.w.on('mousemove', onMoveEvent); + list.w.on('mouseup', onEndEvent); + + var destroyNestable = function() { + if (hasTouch) { + list.el[0].removeEventListener('touchstart', onStartEvent, false); + window.removeEventListener('touchmove', onMoveEvent, false); + window.removeEventListener('touchend', onEndEvent, false); + window.removeEventListener('touchcancel', onEndEvent, false); + } + + list.el.off('mousedown', onStartEvent); + list.w.off('mousemove', onMoveEvent); + list.w.off('mouseup', onEndEvent); + + list.el.off('click'); + list.el.unbind('destroy-nestable'); + + list.el.data("nestable", null); + }; + + list.el.bind('destroy-nestable', destroyNestable); + + }, + + destroy: function() { + this.el.trigger('destroy-nestable'); + }, + + add: function(item) { + var listClassSelector = '.' + this.options.listClass; + var tree = $(this.el).children(listClassSelector); + + if (item.parent_id !== undefined) { + tree = tree.find('[data-id="' + item.parent_id + '"]'); + delete item.parent_id; + + if (tree.children(listClassSelector).length === 0) { + tree = tree.append(this.options.listRenderer('', this.options)); + } + + tree = tree.find(listClassSelector + ':first'); + this.setParent(tree.parent()); + } + + tree.append(this._buildItem(item, this.options)); + }, + + replace: function(item) { + var html = this._buildItem(item, this.options); + + this._getItemById(item.id) + .replaceWith(html); + }, + + //removes item and additional elements from list + removeItem: function(item) { + var opts = this.options, + el = this.el; + + // remove item + item = item || this; + item.remove(); + + // remove empty children lists + var emptyListsSelector = '.' + opts.listClass + + ' .' + opts.listClass + ':not(:has(*))'; + $(el).find(emptyListsSelector).remove(); + + // remove buttons if parents do not have children + var buttonsSelector = '[data-action="expand"], [data-action="collapse"]'; + $(el).find(buttonsSelector).each(function() { + var siblings = $(this).siblings('.' + opts.listClass); + if (siblings.length === 0) { + $(this).remove(); + } + }); + }, + + //removes item by itemId and run callback at the end + remove: function(itemId, callback) { + var opts = this.options; + var list = this; + var item = this._getItemById(itemId); + + //animation style + var animation = opts.effect.animation || 'fade'; + + //animation time + var time = opts.effect.time || 'slow'; + + //add fadeOut effect when removing + if (animation === 'fade') { + item.fadeOut(time, function() { + list.removeItem(item); + }); + } else { + this.removeItem(item); + } + + if (callback) callback(); + }, + + //removes all items from the list and run callback at the end + removeAll: function(callback) { + + var list = this, + opts = this.options, + node = list.el.find(opts.listNodeName).first(), + items = node.children(opts.itemNodeName); + + //animation style + var animation = opts.effect.animation || 'fade'; + + //animation time + var time = opts.effect.time || 'slow'; + + function remove() { + //Removes each item and its children. + items.each(function() { + list.removeItem($(this)); + }); + //Now we can again show our node element + node.show(); + if (callback) callback(); + } + + //add fadeOut effect when removing + if (animation === 'fade') { + node.fadeOut(time, remove); + } else { + remove(); + } + }, + + _getItemById: function(itemId) { + return $(this.el).children('.' + this.options.listClass) + .find('[data-id="' + itemId + '"]'); + }, + + _build: function() { + var json = this.options.json; + + if (typeof json === 'string') { + json = JSON.parse(json); + } + + $(this.el).html(this._buildList(json, this.options)); + }, + + _buildList: function(items, options) { + if (!items) { + return ''; + } + + var children = ''; + var that = this; + + $.each(items, function(index, sub) { + children += that._buildItem(sub, options); + }); + + return options.listRenderer(children, options); + }, + + _buildItem: function(item, options) { + function escapeHtml(text) { + var map = { + '&': '&', + '<': '<', + '>': '>', + '"': '"', + "'": ''' + }; + + return text + "".replace(/[&<>"']/g, function(m) { + return map[m]; + }); + } + + function filterClasses(classes) { + var new_classes = {}; + + for (var k in classes) { + // Remove duplicates + new_classes[classes[k]] = classes[k]; + } + + return new_classes; + } + + function createClassesString(item, options) { + var classes = item.classes || {}; + + if (typeof classes === 'string') { + classes = [classes]; + } + + var item_classes = filterClasses(classes); + item_classes[options.itemClass] = options.itemClass; + + // create class string + return $.map(item_classes, function(val) { + return val; + }).join(' '); + } + + function createDataAttrs(attr) { + attr = $.extend({}, attr); + + delete attr.children; + delete attr.classes; + delete attr.content; + + var data_attrs = {}; + + $.each(attr, function(key, value) { + if (typeof value === 'object') { + value = JSON.stringify(value); + } + + data_attrs["data-" + key] = escapeHtml(value); + }); + + return data_attrs; + } + + var item_attrs = createDataAttrs(item); + item_attrs["class"] = createClassesString(item, options); + + var content = options.contentCallback(item); + var children = this._buildList(item.children, options); + var html = $(options.itemRenderer(item_attrs, content, children, options, item)); + + this.setParent(html); + + return html[0].outerHTML; + }, + + serialize: function() { + var data, list = this, + step = function(level) { + var array = [], + items = level.children(list.options.itemNodeName); + items.each(function() { + var li = $(this), + item = $.extend({}, li.data()), + sub = li.children(list.options.listNodeName); + + if (list.options.includeContent) { + var content = li.find('.' + list.options.contentClass).html(); + + if (content) { + item.content = content; + } + } + + if (sub.length) { + item.children = step(sub); + } + array.push(item); + }); + return array; + }; + data = step(list.el.find(list.options.listNodeName).first()); + return data; + }, + + asNestedSet: function() { + var list = this, + o = list.options, + depth = -1, + ret = [], + lft = 1; + var items = list.el.find(o.listNodeName).first().children(o.itemNodeName); + + items.each(function() { + lft = traverse(this, depth + 1, lft); + }); + + ret = ret.sort(function(a, b) { + return (a.lft - b.lft); + }); + return ret; + + function traverse(item, depth, lft) { + var rgt = lft + 1, + id, pid; + + if ($(item).children(o.listNodeName).children(o.itemNodeName).length > 0) { + depth++; + $(item).children(o.listNodeName).children(o.itemNodeName).each(function() { + rgt = traverse($(this), depth, rgt); + }); + depth--; + } + + id = $(item).attr('data-id'); + if (isInt(id)) { + id = parseInt(id); + } + + pid = $(item).parent(o.listNodeName).parent(o.itemNodeName).attr('data-id') || ''; + if (isInt(pid)) { + pid = parseInt(pid); + } + + if (id) { + ret.push({ + "id": id, + "parent_id": pid, + "depth": depth, + "lft": lft, + "rgt": rgt + }); + } + + lft = rgt + 1; + return lft; + } + + function isInt(value) { + return $.isNumeric(value) && Math.floor(value) == value; + } + }, + + returnOptions: function() { + return this.options; + }, + + serialise: function() { + return this.serialize(); + }, + + toHierarchy: function(options) { + + var o = $.extend({}, this.options, options), + ret = []; + + $(this.element).children(o.items).each(function() { + var level = _recursiveItems(this); + ret.push(level); + }); + + return ret; + + function _recursiveItems(item) { + var id = ($(item).attr(o.attribute || 'id') || '').match(o.expression || (/(.+)[-=_](.+)/)); + if (id) { + var currentItem = { + "id": id[2] + }; + if ($(item).children(o.listType).children(o.items).length > 0) { + currentItem.children = []; + $(item).children(o.listType).children(o.items).each(function() { + var level = _recursiveItems(this); + currentItem.children.push(level); + }); + } + return currentItem; + } + } + }, + + toArray: function() { + + var o = $.extend({}, this.options, this), + sDepth = o.startDepthCount || 0, + ret = [], + left = 2, + list = this, + element = list.el.find(list.options.listNodeName).first(); + + var items = element.children(list.options.itemNodeName); + items.each(function() { + left = _recursiveArray($(this), sDepth + 1, left); + }); + + ret = ret.sort(function(a, b) { + return (a.left - b.left); + }); + + return ret; + + function _recursiveArray(item, depth, left) { + + var right = left + 1, + id, + pid; + + if (item.children(o.options.listNodeName).children(o.options.itemNodeName).length > 0) { + depth++; + item.children(o.options.listNodeName).children(o.options.itemNodeName).each(function() { + right = _recursiveArray($(this), depth, right); + }); + depth--; + } + + id = item.data().id; + + + if (depth === sDepth + 1) { + pid = o.rootID; + } else { + + var parentItem = (item.parent(o.options.listNodeName) + .parent(o.options.itemNodeName) + .data()); + pid = parentItem.id; + + } + + if (id) { + ret.push({ + "id": id, + "parent_id": pid, + "depth": depth, + "left": left, + "right": right + }); + } + + left = right + 1; + return left; + } + + }, + + reset: function() { + this.mouse = { + offsetX: 0, + offsetY: 0, + startX: 0, + startY: 0, + lastX: 0, + lastY: 0, + nowX: 0, + nowY: 0, + distX: 0, + distY: 0, + dirAx: 0, + dirX: 0, + dirY: 0, + lastDirX: 0, + lastDirY: 0, + distAxX: 0, + distAxY: 0 + }; + this.isTouch = false; + this.moving = false; + this.dragEl = null; + this.dragRootEl = null; + this.dragDepth = 0; + this.hasNewRoot = false; + this.pointEl = null; + }, + + expandItem: function(li) { + li.removeClass(this.options.collapsedClass); + }, + + collapseItem: function(li) { + var lists = li.children(this.options.listNodeName); + if (lists.length) { + li.addClass(this.options.collapsedClass); + } + }, + + expandAll: function() { + var list = this; + list.el.find(list.options.itemNodeName).each(function() { + list.expandItem($(this)); + }); + }, + + collapseAll: function() { + var list = this; + list.el.find(list.options.itemNodeName).each(function() { + list.collapseItem($(this)); + }); + }, + + setParent: function(li) { + //Check if li is an element of itemNodeName type and has children + if (li.is(this.options.itemNodeName) && li.children(this.options.listNodeName).length) { + // make sure NOT showing two or more sets data-action buttons + li.children('[data-action]').remove(); + li.prepend($(this.options.expandBtnHTML)); + li.prepend($(this.options.collapseBtnHTML)); + } + }, + + unsetParent: function(li) { + li.removeClass(this.options.collapsedClass); + li.children('[data-action]').remove(); + li.children(this.options.listNodeName).remove(); + }, + + dragStart: function(e) { + var mouse = this.mouse, + target = $(e.target), + dragItem = target.closest(this.options.itemNodeName), + position = { + top: e.pageY, + left: e.pageX + }; + + var continueExecution = this.options.onDragStart.call(this, this.el, dragItem, position); + + if (typeof continueExecution !== 'undefined' && continueExecution === false) { + return; + } + + this.placeEl.css('height', dragItem.height()); + + mouse.offsetX = e.pageX - dragItem.offset().left; + mouse.offsetY = e.pageY - dragItem.offset().top; + mouse.startX = mouse.lastX = e.pageX; + mouse.startY = mouse.lastY = e.pageY; + + this.dragRootEl = this.el; + this.dragEl = $(document.createElement(this.options.listNodeName)).addClass(this.options.listClass + ' ' + this.options.dragClass); + this.dragEl.css('width', dragItem.outerWidth()); + + this.setIndexOfItem(dragItem); + + // fix for zepto.js + //dragItem.after(this.placeEl).detach().appendTo(this.dragEl); + dragItem.after(this.placeEl); + dragItem[0].parentNode.removeChild(dragItem[0]); + dragItem.appendTo(this.dragEl); + + $(document.body).append(this.dragEl); + this.dragEl.css({ + 'left': e.pageX - mouse.offsetX, + 'top': e.pageY - mouse.offsetY + }); + // total depth of dragging item + var i, depth, + items = this.dragEl.find(this.options.itemNodeName); + for (i = 0; i < items.length; i++) { + depth = $(items[i]).parents(this.options.listNodeName).length; + if (depth > this.dragDepth) { + this.dragDepth = depth; + } + } + }, + + //Create sublevel. + // element : element which become parent + // item : something to place into new sublevel + createSubLevel: function(element, item) { + var list = $('<' + this.options.listNodeName + '/>').addClass(this.options.listClass); + if (item) list.append(item); + element.append(list); + this.setParent(element); + return list; + }, + + setIndexOfItem: function(item, index) { + index = index || []; + + index.unshift(item.index()); + + if ($(item[0].parentNode)[0] !== this.dragRootEl[0]) { + this.setIndexOfItem($(item[0].parentNode), index); + } else { + this.dragEl.data('indexOfItem', index); + } + }, + + restoreItemAtIndex: function(dragElement, indexArray) { + var currentEl = this.el, + lastIndex = indexArray.length - 1; + + //Put drag element at current element position. + function placeElement(currentEl, dragElement) { + if (indexArray[lastIndex] === 0) { + $(currentEl).prepend(dragElement.clone(true)); //using true saves added to element events. + } else { + $(currentEl.children[indexArray[lastIndex] - 1]).after(dragElement.clone(true)); //using true saves added to element events. + } + } + //Diggin through indexArray to get home for dragElement. + for (var i = 0; i < indexArray.length; i++) { + if (lastIndex === parseInt(i)) { + placeElement(currentEl, dragElement); + return; + } + //element can have no indexes, so we have to use conditional here to avoid errors. + //if element doesn't exist we defenetly need to add new list. + var element = (currentEl[0]) ? currentEl[0] : currentEl; + var nextEl = element.children[indexArray[i]]; + currentEl = (!nextEl) ? this.createSubLevel($(element)) : nextEl; + } + }, + + dragStop: function(e) { + // fix for zepto.js + //this.placeEl.replaceWith(this.dragEl.children(this.options.itemNodeName + ':first').detach()); + var position = { + top: e.pageY, + left: e.pageX + }; + //Get indexArray of item at drag start. + var srcIndex = this.dragEl.data('indexOfItem'); + + var el = this.dragEl.children(this.options.itemNodeName).first(); + + el[0].parentNode.removeChild(el[0]); + + this.dragEl.remove(); //Remove dragEl, cause it can affect on indexing in html collection. + + //Before drag stop callback + var continueExecution = this.options.beforeDragStop.call(this, this.el, el, this.placeEl.parent()); + if (typeof continueExecution !== 'undefined' && continueExecution === false) { + var parent = this.placeEl.parent(); + this.placeEl.remove(); + if (!parent.children().length) { + this.unsetParent(parent.parent()); + } + this.restoreItemAtIndex(el, srcIndex); + this.reset(); + return; + } + + this.placeEl.replaceWith(el); + + if (this.hasNewRoot) { + if (this.options.fixed === true) { + this.restoreItemAtIndex(el, srcIndex); + } else { + this.el.trigger('lostItem'); + } + this.dragRootEl.trigger('gainedItem'); + } else { + this.dragRootEl.trigger('change'); + } + + this.options.callback.call(this, this.dragRootEl, el, position); + + this.reset(); + }, + + dragMove: function(e) { + var list, parent, prev, next, depth, + opt = this.options, + mouse = this.mouse; + + this.dragEl.css({ + 'left': e.pageX - mouse.offsetX, + 'top': e.pageY - mouse.offsetY + }); + + // mouse position last events + mouse.lastX = mouse.nowX; + mouse.lastY = mouse.nowY; + // mouse position this events + mouse.nowX = e.pageX; + mouse.nowY = e.pageY; + // distance mouse moved between events + mouse.distX = mouse.nowX - mouse.lastX; + mouse.distY = mouse.nowY - mouse.lastY; + // direction mouse was moving + mouse.lastDirX = mouse.dirX; + mouse.lastDirY = mouse.dirY; + // direction mouse is now moving (on both axis) + mouse.dirX = mouse.distX === 0 ? 0 : mouse.distX > 0 ? 1 : -1; + mouse.dirY = mouse.distY === 0 ? 0 : mouse.distY > 0 ? 1 : -1; + // axis mouse is now moving on + var newAx = Math.abs(mouse.distX) > Math.abs(mouse.distY) ? 1 : 0; + + // do nothing on first move + if (!mouse.moving) { + mouse.dirAx = newAx; + mouse.moving = true; + return; + } + + // do scrolling if enable + if (opt.scroll) { + if (typeof window.jQuery.fn.scrollParent !== 'undefined') { + var scrolled = false; + var scrollParent = this.el.scrollParent()[0]; + if (scrollParent !== document && scrollParent.tagName !== 'HTML') { + if ((opt.scrollTriggers.bottom + scrollParent.offsetHeight) - e.pageY < opt.scrollSensitivity) + scrollParent.scrollTop = scrolled = scrollParent.scrollTop + opt.scrollSpeed; + else if (e.pageY - opt.scrollTriggers.top < opt.scrollSensitivity) + scrollParent.scrollTop = scrolled = scrollParent.scrollTop - opt.scrollSpeed; + + if ((opt.scrollTriggers.right + scrollParent.offsetWidth) - e.pageX < opt.scrollSensitivity) + scrollParent.scrollLeft = scrolled = scrollParent.scrollLeft + opt.scrollSpeed; + else if (e.pageX - opt.scrollTriggers.left < opt.scrollSensitivity) + scrollParent.scrollLeft = scrolled = scrollParent.scrollLeft - opt.scrollSpeed; + } else { + if (e.pageY - $(document).scrollTop() < opt.scrollSensitivity) + scrolled = $(document).scrollTop($(document).scrollTop() - opt.scrollSpeed); + else if ($(window).height() - (e.pageY - $(document).scrollTop()) < opt.scrollSensitivity) + scrolled = $(document).scrollTop($(document).scrollTop() + opt.scrollSpeed); + + if (e.pageX - $(document).scrollLeft() < opt.scrollSensitivity) + scrolled = $(document).scrollLeft($(document).scrollLeft() - opt.scrollSpeed); + else if ($(window).width() - (e.pageX - $(document).scrollLeft()) < opt.scrollSensitivity) + scrolled = $(document).scrollLeft($(document).scrollLeft() + opt.scrollSpeed); + } + } else { + console.warn('To use scrolling you need to have scrollParent() function, check documentation for more information'); + } + } + + if (this.scrollTimer) { + clearTimeout(this.scrollTimer); + } + + if (opt.scroll && scrolled) { + this.scrollTimer = setTimeout(function() { + $(window).trigger(e); + }, 10); + } + + // calc distance moved on this axis (and direction) + if (mouse.dirAx !== newAx) { + mouse.distAxX = 0; + mouse.distAxY = 0; + } else { + mouse.distAxX += Math.abs(mouse.distX); + if (mouse.dirX !== 0 && mouse.dirX !== mouse.lastDirX) { + mouse.distAxX = 0; + } + mouse.distAxY += Math.abs(mouse.distY); + if (mouse.dirY !== 0 && mouse.dirY !== mouse.lastDirY) { + mouse.distAxY = 0; + } + } + mouse.dirAx = newAx; + + /** + * move horizontal + */ + if (mouse.dirAx && mouse.distAxX >= opt.threshold) { + // reset move distance on x-axis for new phase + mouse.distAxX = 0; + prev = this.placeEl.prev(opt.itemNodeName); + // increase horizontal level if previous sibling exists, is not collapsed, and can have children + if (mouse.distX > 0 && prev.length && !prev.hasClass(opt.collapsedClass) && !prev.hasClass(opt.noChildrenClass)) { + // cannot increase level when item above is collapsed + list = prev.find(opt.listNodeName).last(); + // check if depth limit has reached + depth = this.placeEl.parents(opt.listNodeName).length; + if (depth + this.dragDepth <= opt.maxDepth) { + // create new sub-level if one doesn't exist + if (!list.length) { + this.createSubLevel(prev, this.placeEl); + } else { + // else append to next level up + list = prev.children(opt.listNodeName).last(); + list.append(this.placeEl); + } + } + } + // decrease horizontal level + if (mouse.distX < 0) { + // we can't decrease a level if an item preceeds the current one + next = this.placeEl.next(opt.itemNodeName); + if (!next.length) { + parent = this.placeEl.parent(); + this.placeEl.closest(opt.itemNodeName).after(this.placeEl); + if (!parent.children().length) { + this.unsetParent(parent.parent()); + } + } + } + } + + var isEmpty = false; + + // find list item under cursor + if (!hasPointerEvents) { + this.dragEl[0].style.visibility = 'hidden'; + } + this.pointEl = $(document.elementFromPoint(e.pageX - document.body.scrollLeft, e.pageY - (window.pageYOffset || document.documentElement.scrollTop))); + if (!hasPointerEvents) { + this.dragEl[0].style.visibility = 'visible'; + } + if (this.pointEl.hasClass(opt.handleClass)) { + this.pointEl = this.pointEl.closest(opt.itemNodeName); + } + if (this.pointEl.hasClass(opt.emptyClass)) { + isEmpty = true; + } else if (!this.pointEl.length || !this.pointEl.hasClass(opt.itemClass)) { + return; + } + + // find parent list of item under cursor + var pointElRoot = this.pointEl.closest('.' + opt.rootClass), + isNewRoot = this.dragRootEl.data('nestable-id') !== pointElRoot.data('nestable-id'); + + /** + * move vertical + */ + if (!mouse.dirAx || isNewRoot || isEmpty) { + // check if groups match if dragging over new root + if (isNewRoot && opt.group !== pointElRoot.data('nestable-group')) { + return; + } + + // fixed item's depth, use for some list has specific type, eg:'Volume, Section, Chapter ...' + if (this.options.fixedDepth && this.dragDepth + 1 !== this.pointEl.parents(opt.listNodeName).length) { + return; + } + + // check depth limit + depth = this.dragDepth - 1 + this.pointEl.parents(opt.listNodeName).length; + if (depth > opt.maxDepth) { + return; + } + var before = e.pageY < (this.pointEl.offset().top + this.pointEl.height() / 2); + parent = this.placeEl.parent(); + // if empty create new list to replace empty placeholder + if (isEmpty) { + list = $(document.createElement(opt.listNodeName)).addClass(opt.listClass); + list.append(this.placeEl); + this.pointEl.replaceWith(list); + } else if (before) { + this.pointEl.before(this.placeEl); + } else { + this.pointEl.after(this.placeEl); + } + if (!parent.children().length) { + this.unsetParent(parent.parent()); + } + if (!this.dragRootEl.find(opt.itemNodeName).length) { + this.appendEmptyElement(this.dragRootEl); + } + // parent root list has changed + this.dragRootEl = pointElRoot; + if (isNewRoot) { + this.hasNewRoot = this.el[0] !== this.dragRootEl[0]; + } + } + }, + + // Append the .dd-empty div to the list so it can be populated and styled + appendEmptyElement: function(element) { + element.append('
    '); + } + }; + + $.fn.nestable = function(params) { + var lists = this, + retval = this, + args = arguments; + + if (!('Nestable' in window)) { + window.Nestable = {}; + Nestable.counter = 0; + } + + lists.each(function() { + var plugin = $(this).data("nestable"); + + if (!plugin) { + Nestable.counter++; + $(this).data("nestable", new Plugin(this, params)); + $(this).data("nestable-id", Nestable.counter); + } else { + if (typeof params === 'string' && typeof plugin[params] === 'function') { + if (args.length > 1) { + var pluginArgs = []; + for (var i = 1; i < args.length; i++) { + pluginArgs.push(args[i]); + } + retval = plugin[params].apply(plugin, pluginArgs); + } else { + retval = plugin[params](); + } + } + } + }); + + return retval || lists; + }; + +})(window.jQuery || window.Zepto, window, document); \ No newline at end of file diff --git a/javascript/jquery.validate.min.js b/javascript/jquery.validate.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_ar.min.js b/javascript/jqvalidatei18n/messages_ar.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_az.min.js b/javascript/jqvalidatei18n/messages_az.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_bg.min.js b/javascript/jqvalidatei18n/messages_bg.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_bn_BD.min.js b/javascript/jqvalidatei18n/messages_bn_BD.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_ca.min.js b/javascript/jqvalidatei18n/messages_ca.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_cs.min.js b/javascript/jqvalidatei18n/messages_cs.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_da.min.js b/javascript/jqvalidatei18n/messages_da.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_de.min.js b/javascript/jqvalidatei18n/messages_de.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_el.min.js b/javascript/jqvalidatei18n/messages_el.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_es.min.js b/javascript/jqvalidatei18n/messages_es.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_es_AR.min.js b/javascript/jqvalidatei18n/messages_es_AR.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_es_PE.min.js b/javascript/jqvalidatei18n/messages_es_PE.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_et.min.js b/javascript/jqvalidatei18n/messages_et.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_eu.min.js b/javascript/jqvalidatei18n/messages_eu.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_fa.min.js b/javascript/jqvalidatei18n/messages_fa.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_fi.min.js b/javascript/jqvalidatei18n/messages_fi.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_fr.min.js b/javascript/jqvalidatei18n/messages_fr.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_ge.min.js b/javascript/jqvalidatei18n/messages_ge.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_gl.min.js b/javascript/jqvalidatei18n/messages_gl.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_he.min.js b/javascript/jqvalidatei18n/messages_he.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_hr.min.js b/javascript/jqvalidatei18n/messages_hr.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_hu.min.js b/javascript/jqvalidatei18n/messages_hu.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_hy_AM.min.js b/javascript/jqvalidatei18n/messages_hy_AM.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_id.min.js b/javascript/jqvalidatei18n/messages_id.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_is.min.js b/javascript/jqvalidatei18n/messages_is.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_it.min.js b/javascript/jqvalidatei18n/messages_it.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_ja.min.js b/javascript/jqvalidatei18n/messages_ja.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_ka.min.js b/javascript/jqvalidatei18n/messages_ka.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_kk.min.js b/javascript/jqvalidatei18n/messages_kk.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_ko.min.js b/javascript/jqvalidatei18n/messages_ko.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_lt.min.js b/javascript/jqvalidatei18n/messages_lt.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_lv.min.js b/javascript/jqvalidatei18n/messages_lv.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_mk.min.js b/javascript/jqvalidatei18n/messages_mk.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_my.min.js b/javascript/jqvalidatei18n/messages_my.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_nl.min.js b/javascript/jqvalidatei18n/messages_nl.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_no.min.js b/javascript/jqvalidatei18n/messages_no.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_pl.min.js b/javascript/jqvalidatei18n/messages_pl.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_pt_BR.min.js b/javascript/jqvalidatei18n/messages_pt_BR.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_pt_PT.min.js b/javascript/jqvalidatei18n/messages_pt_PT.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_ro.min.js b/javascript/jqvalidatei18n/messages_ro.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_ru.min.js b/javascript/jqvalidatei18n/messages_ru.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_si.min.js b/javascript/jqvalidatei18n/messages_si.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_sk.min.js b/javascript/jqvalidatei18n/messages_sk.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_sl.min.js b/javascript/jqvalidatei18n/messages_sl.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_sr.min.js b/javascript/jqvalidatei18n/messages_sr.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_sr_lat.min.js b/javascript/jqvalidatei18n/messages_sr_lat.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_sv.min.js b/javascript/jqvalidatei18n/messages_sv.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_th.min.js b/javascript/jqvalidatei18n/messages_th.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_tj.min.js b/javascript/jqvalidatei18n/messages_tj.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_tr.min.js b/javascript/jqvalidatei18n/messages_tr.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_uk.min.js b/javascript/jqvalidatei18n/messages_uk.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_ur.min.js b/javascript/jqvalidatei18n/messages_ur.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_vi.min.js b/javascript/jqvalidatei18n/messages_vi.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_zh.min.js b/javascript/jqvalidatei18n/messages_zh.min.js old mode 100644 new mode 100755 diff --git a/javascript/jqvalidatei18n/messages_zh_TW.min.js b/javascript/jqvalidatei18n/messages_zh_TW.min.js old mode 100644 new mode 100755 diff --git a/javascript/jstz_min.js b/javascript/jstz_min.js old mode 100644 new mode 100755 diff --git a/javascript/junkflag.js b/javascript/junkflag.js old mode 100644 new mode 100755 diff --git a/javascript/libtree.js b/javascript/libtree.js old mode 100644 new mode 100755 diff --git a/javascript/libtree2.js b/javascript/libtree2.js old mode 100644 new mode 100755 diff --git a/javascript/livepoll.js b/javascript/livepoll.js old mode 100644 new mode 100755 diff --git a/javascript/masschgdates.js b/javascript/masschgdates.js old mode 100644 new mode 100755 diff --git a/javascript/mathgraphcheck.js b/javascript/mathgraphcheck.js old mode 100644 new mode 100755 diff --git a/javascript/mathjax/InputToDataAttr.js b/javascript/mathjax/InputToDataAttr.js old mode 100644 new mode 100755 diff --git a/javascript/mathjax/InputToDataAttrCDN.js b/javascript/mathjax/InputToDataAttrCDN.js old mode 100644 new mode 100755 diff --git a/javascript/mathjs.js b/javascript/mathjs.js old mode 100644 new mode 100755 diff --git a/javascript/mathquill.js b/javascript/mathquill.js old mode 100644 new mode 100755 diff --git a/javascript/mathquill_min.js b/javascript/mathquill_min.js old mode 100644 new mode 100755 diff --git a/javascript/mathquilled.js b/javascript/mathquilled.js old mode 100644 new mode 100755 diff --git a/javascript/md5.js b/javascript/md5.js old mode 100644 new mode 100755 diff --git a/javascript/md5_min.js b/javascript/md5_min.js old mode 100644 new mode 100755 diff --git a/javascript/mootools.js b/javascript/mootools.js old mode 100644 new mode 100755 diff --git a/javascript/moveitem.js b/javascript/moveitem.js old mode 100644 new mode 100755 diff --git a/javascript/msg.js b/javascript/msg.js old mode 100644 new mode 100755 diff --git a/javascript/nested1.js b/javascript/nested1.js old mode 100644 new mode 100755 diff --git a/javascript/pngbehavior.htc b/javascript/pngbehavior.htc old mode 100644 new mode 100755 diff --git a/javascript/posts.js b/javascript/posts.js old mode 100644 new mode 100755 diff --git a/javascript/rubric.js b/javascript/rubric.js old mode 100644 new mode 100755 diff --git a/javascript/solver.js b/javascript/solver.js old mode 100644 new mode 100755 diff --git a/javascript/solversagecell.html b/javascript/solversagecell.html old mode 100644 new mode 100755 diff --git a/javascript/tablescroller.js b/javascript/tablescroller.js old mode 100644 new mode 100755 diff --git a/javascript/tablescroller2.js b/javascript/tablescroller2.js old mode 100644 new mode 100755 diff --git a/javascript/tablesorter.js b/javascript/tablesorter.js old mode 100644 new mode 100755 diff --git a/javascript/testmathjs.html b/javascript/testmathjs.html old mode 100644 new mode 100755 diff --git a/javascript/thread.js b/javascript/thread.js old mode 100644 new mode 100755 diff --git a/javascript/validateform.js b/javascript/validateform.js old mode 100644 new mode 100755 diff --git a/javascript/viewwiki.js b/javascript/viewwiki.js old mode 100644 new mode 100755 diff --git a/javascript/ytapi.js b/javascript/ytapi.js old mode 100644 new mode 100755 diff --git a/katex/README.md b/katex/README.md old mode 100644 new mode 100755 diff --git a/katex/auto-render.js b/katex/auto-render.js old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_AMS-Regular.eot b/katex/fonts/KaTeX_AMS-Regular.eot old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_AMS-Regular.ttf b/katex/fonts/KaTeX_AMS-Regular.ttf old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_AMS-Regular.woff b/katex/fonts/KaTeX_AMS-Regular.woff old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_AMS-Regular.woff2 b/katex/fonts/KaTeX_AMS-Regular.woff2 old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Caligraphic-Bold.eot b/katex/fonts/KaTeX_Caligraphic-Bold.eot old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Caligraphic-Bold.ttf b/katex/fonts/KaTeX_Caligraphic-Bold.ttf old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Caligraphic-Bold.woff b/katex/fonts/KaTeX_Caligraphic-Bold.woff old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Caligraphic-Bold.woff2 b/katex/fonts/KaTeX_Caligraphic-Bold.woff2 old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Caligraphic-Regular.eot b/katex/fonts/KaTeX_Caligraphic-Regular.eot old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Caligraphic-Regular.ttf b/katex/fonts/KaTeX_Caligraphic-Regular.ttf old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Caligraphic-Regular.woff b/katex/fonts/KaTeX_Caligraphic-Regular.woff old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Caligraphic-Regular.woff2 b/katex/fonts/KaTeX_Caligraphic-Regular.woff2 old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Fraktur-Bold.eot b/katex/fonts/KaTeX_Fraktur-Bold.eot old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Fraktur-Bold.ttf b/katex/fonts/KaTeX_Fraktur-Bold.ttf old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Fraktur-Bold.woff b/katex/fonts/KaTeX_Fraktur-Bold.woff old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Fraktur-Bold.woff2 b/katex/fonts/KaTeX_Fraktur-Bold.woff2 old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Fraktur-Regular.eot b/katex/fonts/KaTeX_Fraktur-Regular.eot old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Fraktur-Regular.ttf b/katex/fonts/KaTeX_Fraktur-Regular.ttf old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Fraktur-Regular.woff b/katex/fonts/KaTeX_Fraktur-Regular.woff old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Fraktur-Regular.woff2 b/katex/fonts/KaTeX_Fraktur-Regular.woff2 old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Main-Bold.eot b/katex/fonts/KaTeX_Main-Bold.eot old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Main-Bold.ttf b/katex/fonts/KaTeX_Main-Bold.ttf old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Main-Bold.woff b/katex/fonts/KaTeX_Main-Bold.woff old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Main-Bold.woff2 b/katex/fonts/KaTeX_Main-Bold.woff2 old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Main-Italic.eot b/katex/fonts/KaTeX_Main-Italic.eot old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Main-Italic.ttf b/katex/fonts/KaTeX_Main-Italic.ttf old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Main-Italic.woff b/katex/fonts/KaTeX_Main-Italic.woff old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Main-Italic.woff2 b/katex/fonts/KaTeX_Main-Italic.woff2 old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Main-Regular.eot b/katex/fonts/KaTeX_Main-Regular.eot old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Main-Regular.ttf b/katex/fonts/KaTeX_Main-Regular.ttf old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Main-Regular.woff b/katex/fonts/KaTeX_Main-Regular.woff old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Main-Regular.woff2 b/katex/fonts/KaTeX_Main-Regular.woff2 old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Math-BoldItalic.eot b/katex/fonts/KaTeX_Math-BoldItalic.eot old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Math-BoldItalic.ttf b/katex/fonts/KaTeX_Math-BoldItalic.ttf old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Math-BoldItalic.woff b/katex/fonts/KaTeX_Math-BoldItalic.woff old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Math-BoldItalic.woff2 b/katex/fonts/KaTeX_Math-BoldItalic.woff2 old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Math-Italic.eot b/katex/fonts/KaTeX_Math-Italic.eot old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Math-Italic.ttf b/katex/fonts/KaTeX_Math-Italic.ttf old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Math-Italic.woff b/katex/fonts/KaTeX_Math-Italic.woff old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Math-Italic.woff2 b/katex/fonts/KaTeX_Math-Italic.woff2 old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Math-Regular.eot b/katex/fonts/KaTeX_Math-Regular.eot old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Math-Regular.ttf b/katex/fonts/KaTeX_Math-Regular.ttf old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Math-Regular.woff b/katex/fonts/KaTeX_Math-Regular.woff old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Math-Regular.woff2 b/katex/fonts/KaTeX_Math-Regular.woff2 old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_SansSerif-Bold.eot b/katex/fonts/KaTeX_SansSerif-Bold.eot old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_SansSerif-Bold.ttf b/katex/fonts/KaTeX_SansSerif-Bold.ttf old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_SansSerif-Bold.woff b/katex/fonts/KaTeX_SansSerif-Bold.woff old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_SansSerif-Bold.woff2 b/katex/fonts/KaTeX_SansSerif-Bold.woff2 old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_SansSerif-Italic.eot b/katex/fonts/KaTeX_SansSerif-Italic.eot old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_SansSerif-Italic.ttf b/katex/fonts/KaTeX_SansSerif-Italic.ttf old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_SansSerif-Italic.woff b/katex/fonts/KaTeX_SansSerif-Italic.woff old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_SansSerif-Italic.woff2 b/katex/fonts/KaTeX_SansSerif-Italic.woff2 old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_SansSerif-Regular.eot b/katex/fonts/KaTeX_SansSerif-Regular.eot old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_SansSerif-Regular.ttf b/katex/fonts/KaTeX_SansSerif-Regular.ttf old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_SansSerif-Regular.woff b/katex/fonts/KaTeX_SansSerif-Regular.woff old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_SansSerif-Regular.woff2 b/katex/fonts/KaTeX_SansSerif-Regular.woff2 old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Script-Regular.eot b/katex/fonts/KaTeX_Script-Regular.eot old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Script-Regular.ttf b/katex/fonts/KaTeX_Script-Regular.ttf old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Script-Regular.woff b/katex/fonts/KaTeX_Script-Regular.woff old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Script-Regular.woff2 b/katex/fonts/KaTeX_Script-Regular.woff2 old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Size1-Regular.eot b/katex/fonts/KaTeX_Size1-Regular.eot old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Size1-Regular.ttf b/katex/fonts/KaTeX_Size1-Regular.ttf old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Size1-Regular.woff b/katex/fonts/KaTeX_Size1-Regular.woff old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Size1-Regular.woff2 b/katex/fonts/KaTeX_Size1-Regular.woff2 old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Size2-Regular.eot b/katex/fonts/KaTeX_Size2-Regular.eot old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Size2-Regular.ttf b/katex/fonts/KaTeX_Size2-Regular.ttf old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Size2-Regular.woff b/katex/fonts/KaTeX_Size2-Regular.woff old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Size2-Regular.woff2 b/katex/fonts/KaTeX_Size2-Regular.woff2 old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Size3-Regular.eot b/katex/fonts/KaTeX_Size3-Regular.eot old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Size3-Regular.ttf b/katex/fonts/KaTeX_Size3-Regular.ttf old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Size3-Regular.woff b/katex/fonts/KaTeX_Size3-Regular.woff old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Size3-Regular.woff2 b/katex/fonts/KaTeX_Size3-Regular.woff2 old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Size4-Regular.eot b/katex/fonts/KaTeX_Size4-Regular.eot old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Size4-Regular.ttf b/katex/fonts/KaTeX_Size4-Regular.ttf old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Size4-Regular.woff b/katex/fonts/KaTeX_Size4-Regular.woff old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Size4-Regular.woff2 b/katex/fonts/KaTeX_Size4-Regular.woff2 old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Typewriter-Regular.eot b/katex/fonts/KaTeX_Typewriter-Regular.eot old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Typewriter-Regular.ttf b/katex/fonts/KaTeX_Typewriter-Regular.ttf old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Typewriter-Regular.woff b/katex/fonts/KaTeX_Typewriter-Regular.woff old mode 100644 new mode 100755 diff --git a/katex/fonts/KaTeX_Typewriter-Regular.woff2 b/katex/fonts/KaTeX_Typewriter-Regular.woff2 old mode 100644 new mode 100755 diff --git a/katex/katex.min.css b/katex/katex.min.css old mode 100644 new mode 100755 diff --git a/katex/katex.min.js b/katex/katex.min.js old mode 100644 new mode 100755 diff --git a/katex/test.html b/katex/test.html old mode 100644 new mode 100755 diff --git a/license.txt b/license.txt old mode 100644 new mode 100755 diff --git a/loginpage.php.dist b/loginpage.php.dist old mode 100644 new mode 100755 diff --git a/ltihome.php b/ltihome.php old mode 100644 new mode 100755 diff --git a/ltisessionsetup.php b/ltisessionsetup.php old mode 100644 new mode 100755 diff --git a/migrations/.htaccess b/migrations/.htaccess old mode 100644 new mode 100755 diff --git a/migrations/120_rollback_available_bug.php b/migrations/120_rollback_available_bug.php old mode 100644 new mode 100755 diff --git a/migrations/121_add_userprefs.php b/migrations/121_add_userprefs.php old mode 100644 new mode 100755 diff --git a/migrations/123_config_basesiteurl.php b/migrations/123_config_basesiteurl.php old mode 100644 new mode 100755 diff --git a/migrations/124_rewrite_s3.php b/migrations/124_rewrite_s3.php old mode 100644 new mode 100755 diff --git a/migrations/125_db_sessions.php b/migrations/125_db_sessions.php old mode 100644 new mode 100755 diff --git a/migrations/126_federation.php b/migrations/126_federation.php old mode 100644 new mode 100755 diff --git a/migrations/127_add_indices.php b/migrations/127_add_indices.php old mode 100644 new mode 100755 diff --git a/migrations/128_add_indices_2.php b/migrations/128_add_indices_2.php old mode 100644 new mode 100755 diff --git a/migrations/129_add_indices_3.php b/migrations/129_add_indices_3.php old mode 100644 new mode 100755 diff --git a/migrations/130_acct_taskrights.php b/migrations/130_acct_taskrights.php old mode 100644 new mode 100755 diff --git a/migrations/132_expand_gbmode.php b/migrations/132_expand_gbmode.php old mode 100644 new mode 100755 diff --git a/migrations/133_add_indices_4.php b/migrations/133_add_indices_4.php old mode 100644 new mode 100755 diff --git a/migrations/134_add_user_jsondata.php b/migrations/134_add_user_jsondata.php old mode 100644 new mode 100755 diff --git a/migrations/135_add_course_jsondata.php b/migrations/135_add_course_jsondata.php old mode 100644 new mode 100755 diff --git a/migrations/137_add_forcepwreset.php b/migrations/137_add_forcepwreset.php old mode 100644 new mode 100755 diff --git a/migrations/138_loginformat_warning.php b/migrations/138_loginformat_warning.php old mode 100644 new mode 100755 diff --git a/migrations/139_new_instr_req.php b/migrations/139_new_instr_req.php old mode 100644 new mode 100755 diff --git a/migrations/141_add_lticourse_copiedfrom.php b/migrations/141_add_lticourse_copiedfrom.php old mode 100644 new mode 100755 diff --git a/migrations/142_assess_ptspossible.php b/migrations/142_assess_ptspossible.php old mode 100644 new mode 100755 diff --git a/migrations/143_dates_by_lti.php b/migrations/143_dates_by_lti.php old mode 100644 new mode 100755 diff --git a/migrations/144_assess_reqscoretype.php b/migrations/144_assess_reqscoretype.php old mode 100644 new mode 100755 diff --git a/migrations/146_add_course_startenddates.php b/migrations/146_add_course_startenddates.php old mode 100644 new mode 100755 diff --git a/migrations/147_bugfix_datesbylti.php b/migrations/147_bugfix_datesbylti.php old mode 100644 new mode 100755 diff --git a/migrations/148_add_contextlabel.php b/migrations/148_add_contextlabel.php old mode 100644 new mode 100755 diff --git a/migrations/149_expand_latepassnum.php b/migrations/149_expand_latepassnum.php old mode 100644 new mode 100755 diff --git a/migrations/150_add_indices_5.php b/migrations/150_add_indices_5.php old mode 100644 new mode 100755 diff --git a/migrations/151_add_indices_6.php b/migrations/151_add_indices_6.php old mode 100644 new mode 100755 diff --git a/migrations/152_add_cleanupdate.php b/migrations/152_add_cleanupdate.php old mode 100644 new mode 100755 diff --git a/migrations/153_add_LPcutoff.php b/migrations/153_add_LPcutoff.php old mode 100644 new mode 100755 diff --git a/migrations/154_add_ltiqueue.php b/migrations/154_add_ltiqueue.php old mode 100644 new mode 100755 diff --git a/migrations/155_add_assess_extrefs.php b/migrations/155_add_assess_extrefs.php old mode 100644 new mode 100755 diff --git a/migrations/156_add_dbschema_details.php b/migrations/156_add_dbschema_details.php old mode 100644 new mode 100755 diff --git a/migrations/157_expand_namefields.php b/migrations/157_expand_namefields.php old mode 100644 new mode 100755 diff --git a/migrations/readme.md b/migrations/readme.md old mode 100644 new mode 100755 diff --git a/migrator.php b/migrator.php old mode 100644 new mode 100755 diff --git a/msgs/allstumsglist.php b/msgs/allstumsglist.php old mode 100644 new mode 100755 diff --git a/msgs/msghistory.php b/msgs/msghistory.php old mode 100644 new mode 100755 diff --git a/msgs/msglist.php b/msgs/msglist.php old mode 100644 new mode 100755 diff --git a/msgs/newmsglist.php b/msgs/newmsglist.php old mode 100644 new mode 100755 diff --git a/msgs/savetagged.php b/msgs/savetagged.php old mode 100644 new mode 100755 diff --git a/msgs/sentlist.php b/msgs/sentlist.php old mode 100644 new mode 100755 diff --git a/msgs/viewmsg.php b/msgs/viewmsg.php old mode 100644 new mode 100755 diff --git a/multiembedq.php b/multiembedq.php old mode 100644 new mode 100755 diff --git a/newinstructor.php.dist b/newinstructor.php.dist old mode 100644 new mode 100755 diff --git a/pdochanges.md b/pdochanges.md old mode 100644 new mode 100755 diff --git a/phpunit.xml b/phpunit.xml old mode 100644 new mode 100755 diff --git a/plannedchanges.html b/plannedchanges.html old mode 100644 new mode 100755 diff --git a/setupdb.php b/setupdb.php old mode 100644 new mode 100755 index 2922bff809..8ccc107aa6 --- a/setupdb.php +++ b/setupdb.php @@ -239,6 +239,7 @@ . ' `calrtag` VARCHAR(254) NOT NULL DEFAULT \'R\', ' . ' `tutoredit` TINYINT(1) UNSIGNED NOT NULL DEFAULT \'0\', ' . ' `ancestors` TEXT NOT NULL, ' + . ' `justintimeorder` MEDIUMTEXT NULL DEFAULT NULL, ' . ' INDEX (`courseid`), INDEX(`startdate`), INDEX(`enddate`),' . ' INDEX(`cntingb`), INDEX(`reviewdate`), INDEX(`avail`), INDEX(`ancestors`(10))' . ' )' diff --git a/tests/.htaccess b/tests/.htaccess old mode 100644 new mode 100755 diff --git a/tests/README.md b/tests/README.md old mode 100644 new mode 100755 diff --git a/tests/_data/.gitkeep b/tests/_data/.gitkeep old mode 100644 new mode 100755 diff --git a/tests/_support/AcceptanceTester.php b/tests/_support/AcceptanceTester.php old mode 100644 new mode 100755 diff --git a/tests/_support/FunctionalTester.php b/tests/_support/FunctionalTester.php old mode 100644 new mode 100755 diff --git a/tests/_support/Helper/Acceptance.php b/tests/_support/Helper/Acceptance.php old mode 100644 new mode 100755 diff --git a/tests/_support/Helper/Functional.php b/tests/_support/Helper/Functional.php old mode 100644 new mode 100755 diff --git a/tests/_support/Helper/Unit.php b/tests/_support/Helper/Unit.php old mode 100644 new mode 100755 diff --git a/tests/_support/UnitTester.php b/tests/_support/UnitTester.php old mode 100644 new mode 100755 diff --git a/tests/acceptance.suite.yml b/tests/acceptance.suite.yml old mode 100644 new mode 100755 diff --git a/tests/acceptance/AdminLoginCest.php b/tests/acceptance/AdminLoginCest.php old mode 100644 new mode 100755 diff --git a/tests/functional.suite.yml b/tests/functional.suite.yml old mode 100644 new mode 100755 diff --git a/tests/functional/.gitkeep b/tests/functional/.gitkeep old mode 100644 new mode 100755 diff --git a/tests/unit.suite.yml b/tests/unit.suite.yml old mode 100644 new mode 100755 diff --git a/tests/unit/sanitizeTest.php b/tests/unit/sanitizeTest.php old mode 100644 new mode 100755 diff --git a/themes/angelish.css b/themes/angelish.css old mode 100644 new mode 100755 diff --git a/themes/angelishmore.css b/themes/angelishmore.css old mode 100644 new mode 100755 diff --git a/themes/default.css b/themes/default.css old mode 100644 new mode 100755 diff --git a/themes/facebookish.css b/themes/facebookish.css old mode 100644 new mode 100755 diff --git a/themes/highcontrast.css b/themes/highcontrast.css old mode 100644 new mode 100755 diff --git a/themes/highcontrast_dark.css b/themes/highcontrast_dark.css old mode 100644 new mode 100755 diff --git a/themes/howtotheme.md b/themes/howtotheme.md old mode 100644 new mode 100755 diff --git a/themes/modern.css b/themes/modern.css old mode 100644 new mode 100755 diff --git a/themes/oea.css b/themes/oea.css old mode 100644 new mode 100755 diff --git a/tinymce4/demo.html b/tinymce4/demo.html old mode 100644 new mode 100755 diff --git a/tinymce4/file_manager.php b/tinymce4/file_manager.php old mode 100644 new mode 100755 diff --git a/tinymce4/file_manager/file_small.png b/tinymce4/file_manager/file_small.png old mode 100644 new mode 100755 diff --git a/tinymce4/file_manager/lang/lang_eng.php b/tinymce4/file_manager/lang/lang_eng.php old mode 100644 new mode 100755 diff --git a/tinymce4/file_manager/styles.css b/tinymce4/file_manager/styles.css old mode 100644 new mode 100755 diff --git a/tinymce4/file_manager/x.png b/tinymce4/file_manager/x.png old mode 100644 new mode 100755 diff --git a/tinymce4/getsnippets.php b/tinymce4/getsnippets.php old mode 100644 new mode 100755 diff --git a/tinymce4/license.txt b/tinymce4/license.txt old mode 100644 new mode 100755 diff --git a/tinymce4/maketinymcebundle.php b/tinymce4/maketinymcebundle.php old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/advlist/plugin.min.js b/tinymce4/plugins/advlist/plugin.min.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/anchor/plugin.min.js b/tinymce4/plugins/anchor/plugin.min.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/asciimath/amcharmap.css b/tinymce4/plugins/asciimath/amcharmap.css old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/asciimath/amcharmap.htm b/tinymce4/plugins/asciimath/amcharmap.htm old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/asciimath/img/charmapsprite.png b/tinymce4/plugins/asciimath/img/charmapsprite.png old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/asciimath/img/ed_mathformula.gif b/tinymce4/plugins/asciimath/img/ed_mathformula.gif old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/asciimath/img/ed_mathformula2.gif b/tinymce4/plugins/asciimath/img/ed_mathformula2.gif old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/asciimath/js/ASCIIMathMLwFallback.js b/tinymce4/plugins/asciimath/js/ASCIIMathMLwFallback.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/asciimath/langs/en.js b/tinymce4/plugins/asciimath/langs/en.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/asciimath/plugin.min.js b/tinymce4/plugins/asciimath/plugin.min.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/asciimathjax/amcharmap.htm b/tinymce4/plugins/asciimathjax/amcharmap.htm old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/asciimathjax/img/ed_mathformula.gif b/tinymce4/plugins/asciimathjax/img/ed_mathformula.gif old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/asciimathjax/img/ed_mathformula2.gif b/tinymce4/plugins/asciimathjax/img/ed_mathformula2.gif old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/asciimathjax/js/ASCIIMathMLwFallback.js b/tinymce4/plugins/asciimathjax/js/ASCIIMathMLwFallback.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/asciimathjax/langs/en.js b/tinymce4/plugins/asciimathjax/langs/en.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/asciimathjax/plugin.min.js b/tinymce4/plugins/asciimathjax/plugin.min.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/asciisvg/asciisvgdlg.htm b/tinymce4/plugins/asciisvg/asciisvgdlg.htm old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/asciisvg/img/ed_asciisvg.gif b/tinymce4/plugins/asciisvg/img/ed_asciisvg.gif old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/asciisvg/js/asciisvgdlg.js b/tinymce4/plugins/asciisvg/js/asciisvgdlg.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/asciisvg/js/d.svg b/tinymce4/plugins/asciisvg/js/d.svg old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/asciisvg/langs/en.js b/tinymce4/plugins/asciisvg/langs/en.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/asciisvg/plugin.min.js b/tinymce4/plugins/asciisvg/plugin.min.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/asciisvg2/asciisvgdlg.htm b/tinymce4/plugins/asciisvg2/asciisvgdlg.htm old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/asciisvg2/img/ed_asciisvg.gif b/tinymce4/plugins/asciisvg2/img/ed_asciisvg.gif old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/asciisvg2/js/ASCIIsvg.js b/tinymce4/plugins/asciisvg2/js/ASCIIsvg.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/asciisvg2/js/asciisvgdlg.js b/tinymce4/plugins/asciisvg2/js/asciisvgdlg.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/asciisvg2/js/d.svg b/tinymce4/plugins/asciisvg2/js/d.svg old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/asciisvg2/langs/en.js b/tinymce4/plugins/asciisvg2/langs/en.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/asciisvg2/plugin.min.js b/tinymce4/plugins/asciisvg2/plugin.min.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/attach/ed_attach.gif b/tinymce4/plugins/attach/ed_attach.gif old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/attach/plugin.min.js b/tinymce4/plugins/attach/plugin.min.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/autolink/plugin.js b/tinymce4/plugins/autolink/plugin.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/autolink/plugin.min.js b/tinymce4/plugins/autolink/plugin.min.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/charmap/plugin.min.js b/tinymce4/plugins/charmap/plugin.min.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/code/plugin.min.js b/tinymce4/plugins/code/plugin.min.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/colorpicker/plugin.min.js b/tinymce4/plugins/colorpicker/plugin.min.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/contextmenu/plugin.min.js b/tinymce4/plugins/contextmenu/plugin.min.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/hr/plugin.js b/tinymce4/plugins/hr/plugin.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/hr/plugin.min.js b/tinymce4/plugins/hr/plugin.min.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/image/plugin.min.js b/tinymce4/plugins/image/plugin.min.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/imagetools/config/bolt/atomic.js b/tinymce4/plugins/imagetools/config/bolt/atomic.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/imagetools/config/bolt/browser.js b/tinymce4/plugins/imagetools/config/bolt/browser.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/imagetools/config/bolt/demo.js b/tinymce4/plugins/imagetools/config/bolt/demo.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/imagetools/config/bolt/prod.js b/tinymce4/plugins/imagetools/config/bolt/prod.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/imagetools/plugin.js b/tinymce4/plugins/imagetools/plugin.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/imagetools/plugin.min.js b/tinymce4/plugins/imagetools/plugin.min.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/imagetools/src/demo/html/demo.html b/tinymce4/plugins/imagetools/src/demo/html/demo.html old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/imagetools/src/demo/js/Demo.js b/tinymce4/plugins/imagetools/src/demo/js/Demo.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/imagetools/src/main/js/CropRect.js b/tinymce4/plugins/imagetools/src/main/js/CropRect.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/imagetools/src/main/js/Dialog.js b/tinymce4/plugins/imagetools/src/main/js/Dialog.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/imagetools/src/main/js/ImagePanel.js b/tinymce4/plugins/imagetools/src/main/js/ImagePanel.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/imagetools/src/main/js/Plugin.js b/tinymce4/plugins/imagetools/src/main/js/Plugin.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/imagetools/src/main/js/UndoStack.js b/tinymce4/plugins/imagetools/src/main/js/UndoStack.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/link/plugin.js b/tinymce4/plugins/link/plugin.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/link/plugin.min.js b/tinymce4/plugins/link/plugin.min.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/lists/plugin.min.js b/tinymce4/plugins/lists/plugin.min.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/media/plugin.min.js b/tinymce4/plugins/media/plugin.min.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/paste/plugin.min.js b/tinymce4/plugins/paste/plugin.min.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/rollups/plugin.min.js b/tinymce4/plugins/rollups/plugin.min.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/searchreplace/plugin.min.js b/tinymce4/plugins/searchreplace/plugin.min.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/snippet/plugin.js b/tinymce4/plugins/snippet/plugin.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/table/plugin.min.js b/tinymce4/plugins/table/plugin.min.js old mode 100644 new mode 100755 diff --git a/tinymce4/plugins/textcolor/plugin.min.js b/tinymce4/plugins/textcolor/plugin.min.js old mode 100644 new mode 100755 diff --git a/tinymce4/skins/lightgray/content.inline.min.css b/tinymce4/skins/lightgray/content.inline.min.css old mode 100644 new mode 100755 diff --git a/tinymce4/skins/lightgray/content.min.css b/tinymce4/skins/lightgray/content.min.css old mode 100644 new mode 100755 diff --git a/tinymce4/skins/lightgray/fonts/tinymce-small.eot b/tinymce4/skins/lightgray/fonts/tinymce-small.eot old mode 100644 new mode 100755 diff --git a/tinymce4/skins/lightgray/fonts/tinymce-small.json b/tinymce4/skins/lightgray/fonts/tinymce-small.json old mode 100644 new mode 100755 diff --git a/tinymce4/skins/lightgray/fonts/tinymce-small.svg b/tinymce4/skins/lightgray/fonts/tinymce-small.svg old mode 100644 new mode 100755 diff --git a/tinymce4/skins/lightgray/fonts/tinymce-small.ttf b/tinymce4/skins/lightgray/fonts/tinymce-small.ttf old mode 100644 new mode 100755 diff --git a/tinymce4/skins/lightgray/fonts/tinymce-small.woff b/tinymce4/skins/lightgray/fonts/tinymce-small.woff old mode 100644 new mode 100755 diff --git a/tinymce4/skins/lightgray/fonts/tinymce.eot b/tinymce4/skins/lightgray/fonts/tinymce.eot old mode 100644 new mode 100755 diff --git a/tinymce4/skins/lightgray/fonts/tinymce.json b/tinymce4/skins/lightgray/fonts/tinymce.json old mode 100644 new mode 100755 diff --git a/tinymce4/skins/lightgray/fonts/tinymce.svg b/tinymce4/skins/lightgray/fonts/tinymce.svg old mode 100644 new mode 100755 diff --git a/tinymce4/skins/lightgray/fonts/tinymce.ttf b/tinymce4/skins/lightgray/fonts/tinymce.ttf old mode 100644 new mode 100755 diff --git a/tinymce4/skins/lightgray/fonts/tinymce.woff b/tinymce4/skins/lightgray/fonts/tinymce.woff old mode 100644 new mode 100755 diff --git a/tinymce4/skins/lightgray/img/anchor.gif b/tinymce4/skins/lightgray/img/anchor.gif old mode 100644 new mode 100755 diff --git a/tinymce4/skins/lightgray/img/loader.gif b/tinymce4/skins/lightgray/img/loader.gif old mode 100644 new mode 100755 diff --git a/tinymce4/skins/lightgray/img/object.gif b/tinymce4/skins/lightgray/img/object.gif old mode 100644 new mode 100755 diff --git a/tinymce4/skins/lightgray/img/trans.gif b/tinymce4/skins/lightgray/img/trans.gif old mode 100644 new mode 100755 diff --git a/tinymce4/skins/lightgray/skin.ie7.min.css b/tinymce4/skins/lightgray/skin.ie7.min.css old mode 100644 new mode 100755 diff --git a/tinymce4/skins/lightgray/skin.min - Copy.css b/tinymce4/skins/lightgray/skin.min - Copy.css old mode 100644 new mode 100755 diff --git a/tinymce4/skins/lightgray/skin.min.css b/tinymce4/skins/lightgray/skin.min.css old mode 100644 new mode 100755 diff --git a/tinymce4/themes/modern/theme.min.js b/tinymce4/themes/modern/theme.min.js old mode 100644 new mode 100755 diff --git a/tinymce4/tinymce.min.js b/tinymce4/tinymce.min.js old mode 100644 new mode 100755 diff --git a/tinymce4/tinymce_bundled.js b/tinymce4/tinymce_bundled.js old mode 100644 new mode 100755 diff --git a/tinymce4/to_add_imagetools.txt b/tinymce4/to_add_imagetools.txt old mode 100644 new mode 100755 diff --git a/tinymce4/upload_handler.php b/tinymce4/upload_handler.php old mode 100644 new mode 100755 diff --git a/upgrade.php b/upgrade.php old mode 100644 new mode 100755 index a49ef6b298..f1149eeb71 --- a/upgrade.php +++ b/upgrade.php @@ -6,7 +6,7 @@ //don't use this anymore: create files in the /migrations/ directory //old approach: change counter; increase by 1 each time a change is made -$latest_oldstyle = 119; +$latest_oldstyle = 120; ini_set("max_input_time", "6000"); ini_set("max_execution_time", "6000"); @@ -1864,11 +1864,18 @@ echo "

    Query failed: ($query) : ".$DBH->errorInfo()."

    "; } } + if ($last<120) { + $query = "ALTER TABLE `imas_assessments` ADD `justintimeorder` MEDIUMTEXT NULL DEFAULT NULL;"; + $res = $DBH->query($query); + if ($res===false) { + echo "

    Query failed: ($query) : ".$DBH->errorInfo()."

    "; + } + } /*** end older DB update stuff ***/ - if ($last<119) { + if ($last<120) { //if we just ran any of those changes, update DB, otherwise //let Migrator handle updating the ver $stm = $DBH->prepare("UPDATE imas_dbschema SET ver=:ver WHERE id=1"); diff --git a/upgrade.txt b/upgrade.txt old mode 100644 new mode 100755 index 31bc383c6e..90b0a9fb32 --- a/upgrade.txt +++ b/upgrade.txt @@ -1,5 +1,12 @@ Upgrade Notes +**************************** +** JustInTime assignments ** +**************************** +// by Ondrej Zjevik +Database change: + ALTER TABLE `imas_assessments` ADD `justintimeorder` MEDIUMTEXT NULL DEFAULT NULL; + ********************* ** IMathAS 1.8 ** ********************* @@ -7,10 +14,10 @@ Upgrade Notes All database changes are now in upgrade.php. Run that file to apply updates to the database. -SimpleLTI has been deprecated and replaced with BasicLTI. If you have +SimpleLTI has been deprecated and replaced with BasicLTI. If you have $enablesimplelti in your config.php, change it to enablebasiclti. -If you do not have either currently in your config.php and want to allow +If you do not have either currently in your config.php and want to allow imathas to act as a BasicLTI producer, add $enablebasiclti = true to config.php ********************* @@ -20,7 +27,7 @@ imathas to act as a BasicLTI producer, add $enablebasiclti = true to config.php *** Database Changes *** All database changes are now in upgrade.php. Run that file to apply updates -to the database. +to the database. ********************* ** IMathAS 1.6 ** @@ -31,8 +38,8 @@ Added $enablesimplelti Added $mathchaturl *** Loginpage Changes *** -Reference loginpage.php.dist for changes. - +Reference loginpage.php.dist for changes. + *** Database Changes *** ALTER TABLE `imas_msgs` ADD `parent` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' , ADD `baseid` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0' ; @@ -66,7 +73,7 @@ CREATE TABLE `imas_ltiusers` ( `id` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , `org` VARCHAR( 32 ) NOT NULL , `ltiuserid` VARCHAR( 32 ) NOT NULL , -`userid` INT( 10 ) UNSIGNED NOT NULL +`userid` INT( 10 ) UNSIGNED NOT NULL ) TYPE = innodb; CREATE TABLE `imas_ltiaccess` ( @@ -75,13 +82,13 @@ CREATE TABLE `imas_ltiaccess` ( `userid` INT( 10 ) UNSIGNED NOT NULL , `itemid` INT( 10 ) UNSIGNED NOT NULL , `itemtype` TINYINT( 1 ) UNSIGNED NOT NULL , -`created` INT( 10 ) UNSIGNED NOT NULL +`created` INT( 10 ) UNSIGNED NOT NULL ) TYPE = innodb; CREATE TABLE `imas_ltinonces` ( `id` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , `nonce` TEXT NOT NULL , -`time` INT( 10 ) UNSIGNED NOT NULL +`time` INT( 10 ) UNSIGNED NOT NULL ) TYPE = innodb; ALTER TABLE `imas_assessments` CHANGE `timelimit` `timelimit` INT( 10 ) NOT NULL DEFAULT '0' ; @@ -112,7 +119,7 @@ CREATE TABLE `imas_calitems` ( `date` INT( 10 ) UNSIGNED NOT NULL , `title` VARCHAR( 254 ) NOT NULL , `tag` CHAR( 1 ) NOT NULL , -INDEX ( `courseid` ), INDEX(`date`) +INDEX ( `courseid` ), INDEX(`date`) ) TYPE = innodb COMMENT = 'Calendar Items'; @@ -142,7 +149,7 @@ ALTER TABLE `imas_forums` ADD INDEX ( `postby` ) ; *** Database Changes *** ALTER TABLE `imas_sessions` ADD INDEX ( `time` ) ; -ALTER TABLE `imas_users` ADD INDEX ( `rights` ); +ALTER TABLE `imas_users` ADD INDEX ( `rights` ); ALTER TABLE `imas_grades` CHANGE `score` `score` DECIMAL( 6, 1 ) UNSIGNED NULL DEFAULT '0.0'; @@ -289,7 +296,7 @@ CREATE TABLE `imas_msgs` ( `msgto` INT( 10 ) NOT NULL , `msgfrom` INT( 10 ) NOT NULL , `senddate` INT( 10 ) NOT NULL , -`isread` TINYINT( 1 ) NOT NULL +`isread` TINYINT( 1 ) NOT NULL ) TYPE = innodb COMMENT = 'Internal messages'; ALTER TABLE `imas_students` ADD `section` VARCHAR( 10 ) NULL , @@ -303,9 +310,9 @@ CREATE TABLE `imas_forum_subscriptions` ( `id` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , `forumid` INT( 10 ) UNSIGNED NOT NULL , `userid` INT( 10 ) UNSIGNED NOT NULL , -INDEX ( `forumid` , `userid` ) +INDEX ( `forumid` , `userid` ) ) TYPE = innodb COMMENT = 'Forum subscriptions'; - + CREATE TABLE `imas_gbscheme` ( `id` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , `courseid` INT( 10 ) UNSIGNED NOT NULL , @@ -323,7 +330,7 @@ CREATE TABLE `imas_gbitems` ( `points` SMALLINT( 4 ) NOT NULL DEFAULT '0', `showdate` INT( 10 ) UNSIGNED NOT NULL , `gbcategory` INT( 10 ) UNSIGNED NOT NULL , -INDEX ( `courseid` , `showdate` ) +INDEX ( `courseid` , `showdate` ) ) TYPE = innodb COMMENT = 'Gradebook offline items'; CREATE TABLE `imas_grades` ( @@ -331,7 +338,7 @@ CREATE TABLE `imas_grades` ( `gbitemid` INT( 10 ) UNSIGNED NOT NULL , `userid` INT( 10 ) UNSIGNED NOT NULL , `score` DECIMAL( 6, 1 ) UNSIGNED NOT NULL , -INDEX ( `userid` ) +INDEX ( `userid` ) ) TYPE = innodb COMMENT = 'Offline grades'; CREATE TABLE `imas_gbcats` ( @@ -343,7 +350,7 @@ CREATE TABLE `imas_gbcats` ( `chop` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT '1', `dropn` TINYINT( 2 ) NOT NULL DEFAULT '0', `weight` SMALLINT( 4 ) NOT NULL DEFAULT '-1', -INDEX ( `courseid` ) +INDEX ( `courseid` ) ) TYPE = innodb COMMENT = 'Gradebook Categories'; ALTER TABLE `imas_assessments` ADD `password` VARCHAR( 15 ) NOT NULL ; @@ -366,22 +373,22 @@ UPDATE imas_forums SET settings=2 WHERE settings=0; ALTER TABLE `imas_msgs` ADD INDEX ( `msgto` ); ALTER TABLE `imas_msgs` ADD INDEX ( `isread` ); -ALTER TABLE `imas_exceptions` ADD INDEX ( `assessmentid` ); +ALTER TABLE `imas_exceptions` ADD INDEX ( `assessmentid` ); ALTER TABLE `imas_items` ADD INDEX ( `typeid` ) ; ALTER TABLE `imas_items` ADD INDEX ( `itemtype` ); -ALTER TABLE `imas_assessments` ADD INDEX ( `startdate` ); +ALTER TABLE `imas_assessments` ADD INDEX ( `startdate` ); ALTER TABLE `imas_assessments` ADD INDEX ( `enddate` ) ; ALTER TABLE `imas_forum_posts` ADD INDEX ( `threadid` ) ; ALTER TABLE `imas_forum_views` ADD INDEX ( `threadid` ) ; -ALTER TABLE `imas_assessment_sessions` ADD INDEX ( `assessmentid` ); -ALTER TABLE `imas_assessments` ADD INDEX ( `cntingb` ); -ALTER TABLE `imas_courses` ADD INDEX ( `ownerid` ); +ALTER TABLE `imas_assessment_sessions` ADD INDEX ( `assessmentid` ); +ALTER TABLE `imas_assessments` ADD INDEX ( `cntingb` ); +ALTER TABLE `imas_courses` ADD INDEX ( `ownerid` ); ALTER TABLE `imas_diags` ADD INDEX (`cid`); ALTER TABLE `imas_grades` ADD INDEX ( `gbitemid` ); ALTER TABLE `imas_assessments` ADD `minscore` SMALLINT( 4 ) UNSIGNED NOT NULL DEFAULT '0'; ALTER TABLE `imas_courses` ADD `cploc` TINYINT( 1 ) UNSIGNED NOT NULL DEFAULT '0'; -ALTER TABLE `imas_gbscheme` ADD INDEX ( `courseid` ) +ALTER TABLE `imas_gbscheme` ADD INDEX ( `courseid` ) ALTER TABLE `imas_assessments` CHANGE `defpoints` `defpoints` SMALLINT( 4 ) UNSIGNED NOT NULL DEFAULT '10', CHANGE `defattempts` `defattempts` SMALLINT( 4 ) UNSIGNED NOT NULL DEFAULT '1'; @@ -417,7 +424,7 @@ while ($row = mysql_fetch_row($result)) { $items = explode(',',$row[1]); foreach ($items as $item) { if (strpos($item,'~')===FALSE) { - $newarray[] = $item; + $newarray[] = $item; } else { $sub = explode('~',$item); $newblock = array(); @@ -435,9 +442,9 @@ while ($row = mysql_fetch_row($result)) { } $newitemorder = addslashes(serialize($newarray)); $query = "UPDATE imas_courses SET itemorder='$newitemorder',blockcnt='$blockcnt' WHERE id='{$row[0]}'"; - mysql_query($query) or die("Query failed : " . mysql_error()); - - + mysql_query($query) or die("Query failed : " . mysql_error()); + + } echo "Done"; @@ -447,7 +454,7 @@ echo "Done"; ** IMathAS 1.0 ** ********************* -Create subdirectory "qimages" in "assessment" directory. Set permissions to +Create subdirectory "qimages" in "assessment" directory. Set permissions to allow server to write to this directory. *** Database Changes *** @@ -459,7 +466,7 @@ CREATE TABLE `imas_qimages` ( `var` VARCHAR( 50 ) NOT NULL , `filename` VARCHAR( 100 ) NOT NULL , `alttext` VARCHAR( 254 ) NOT NULL , -INDEX ( `qsetid` ) +INDEX ( `qsetid` ) ); ALTER TABLE `imas_questionset` ADD `hasimg` INT( 1 ) UNSIGNED NOT NULL DEFAULT '0'; @@ -473,10 +480,10 @@ CREATE TABLE `imas_instr_files` ( `description` VARCHAR( 254 ) NOT NULL , `filename` VARCHAR( 100 ) NOT NULL , `itemid` INT( 10 ) UNSIGNED NOT NULL , -INDEX ( `itemid` ) +INDEX ( `itemid` ) ) TYPE = innodb; -ALTER TABLE `imas_inlinetext` ADD `fileorder` TEXT NOT NULL ; +ALTER TABLE `imas_inlinetext` ADD `fileorder` TEXT NOT NULL ; ALTER TABLE `imas_courses` ADD `allowunenroll` INT( 1 ) UNSIGNED NOT NULL DEFAULT '0', ADD `copyrights` INT( 1 ) UNSIGNED NOT NULL DEFAULT '0'; @@ -488,7 +495,7 @@ ADD `copyrights` INT( 1 ) UNSIGNED NOT NULL DEFAULT '0'; *** Database Changes *** Required changes. -ALTER TABLE `imas_assessment_sessions` +ALTER TABLE `imas_assessment_sessions` ADD `bestseeds` TEXT NOT NULL , ADD `bestattempts` TEXT NOT NULL , ADD `bestscores` TEXT NOT NULL , @@ -521,7 +528,7 @@ CREATE TABLE `imas_diags` ( `aidlist` TEXT NOT NULL , `sel2name` VARCHAR( 254 ) NOT NULL , `sel2list` TEXT NOT NULL , -INDEX ( `ownerid` , `public` ) +INDEX ( `ownerid` , `public` ) ) TYPE = innodb; @@ -537,8 +544,8 @@ None //if you do not have a local install, feel free to use: // $mathimgurl = "http://www.imathas.com/cgi-bin/mimetex.cgi" $mathimgurl = "/mimetex/mimetex.exe"; - - //set to true if you have FreeType library installed + + //set to true if you have FreeType library installed $freetypeinstalled = true; @@ -550,11 +557,11 @@ CourseCreator rights level was removed. Any existing CourseCreators need to hav rights reassigned before upgrading. *** Database Changes *** -Required changes. +Required changes. CREATE TABLE `imas_groups` ( `id` INT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY , -`name` VARCHAR( 255 ) NOT NULL +`name` VARCHAR( 255 ) NOT NULL ); ALTER TABLE `imas_users` ADD `groupid` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0'; @@ -574,7 +581,7 @@ Required changes. Add to config.php: //use the Groups features, set to false $allownongrouplibs = false; -//should anyone be allowed to import/export questions and libraries from the +//should anyone be allowed to import/export questions and libraries from the //course page? Intended for easy sharing between systems, but the course page //is cleaner if turned off. $allowcourseimport = false; @@ -585,7 +592,7 @@ $allowcourseimport = false; ********************* *** Database Changes *** -Required changes. +Required changes. ALTER TABLE `imas_sessions` ADD `sessiondata` TEXT NOT NULL ; @@ -599,7 +606,7 @@ Recommended changes (to allow assessments with more than ~50 questions) ALTER TABLE `imas_assessment_sessions` CHANGE `scores` `scores` TEXT NOT NULL; ALTER TABLE `imas_assessment_sessions` CHANGE `questions` `questions` TEXT NOT NULL; -Required changes. +Required changes. ALTER TABLE `imas_library_items` ADD `ownerid` INT( 10 ) UNSIGNED NOT NULL; @@ -628,7 +635,7 @@ No changes required ********************* *** Database Changes *** -Required changes. +Required changes. ALTER TABLE `imas_users` ADD `lastaccess` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0'; ALTER TABLE `imas_users` ADD INDEX ( `lastaccess` ) ; @@ -674,7 +681,7 @@ Added $sessionpath. No change required if things are working fine already. ******************** *** Database Changes **** -First change is required. New tables are needed if you want to use forums. +First change is required. New tables are needed if you want to use forums. ALTER TABLE `imas_sessions` ADD `tzoffset` INT( 4 ) NOT NULL DEFAULT '0'; @@ -727,5 +734,5 @@ Generalized database name. No changed needed for existing installs. *** Database changes: (required, backwards compatible) *** ALTER TABLE `imas_libraries` ADD `parent` INT( 10 ) UNSIGNED NOT NULL DEFAULT '0'; ALTER TABLE `imas_questionset` ADD `author` VARCHAR( 254 ) NOT NULL DEFAULT 'unknown' AFTER `ownerid` ; - + *** No changes to config.php *** diff --git a/util/batchanon.php b/util/batchanon.php old mode 100644 new mode 100755 diff --git a/util/batchcreateinstr.php b/util/batchcreateinstr.php old mode 100644 new mode 100755 diff --git a/util/blocksearch.php b/util/blocksearch.php old mode 100644 new mode 100755 diff --git a/util/copystudata.php b/util/copystudata.php old mode 100644 new mode 100755 diff --git a/util/coursetolibs.php b/util/coursetolibs.php old mode 100644 new mode 100755 diff --git a/util/delwronglibs.php b/util/delwronglibs.php old mode 100644 new mode 100755 diff --git a/util/getqcnt.php b/util/getqcnt.php old mode 100644 new mode 100755 diff --git a/util/getstucnt.php b/util/getstucnt.php old mode 100644 new mode 100755 diff --git a/util/getstucntdet.php b/util/getstucntdet.php old mode 100644 new mode 100755 diff --git a/util/itemsearch.php b/util/itemsearch.php old mode 100644 new mode 100755 diff --git a/util/listdeprecated.php b/util/listdeprecated.php old mode 100644 new mode 100755 diff --git a/util/listextref.php b/util/listextref.php old mode 100644 new mode 100755 diff --git a/util/listnewteachers.php b/util/listnewteachers.php old mode 100644 new mode 100755 diff --git a/util/listwronglibs.php b/util/listwronglibs.php old mode 100644 new mode 100755 diff --git a/util/makeconditional.php b/util/makeconditional.php old mode 100644 new mode 100755 diff --git a/util/makeminjs.php b/util/makeminjs.php old mode 100644 new mode 100755 diff --git a/util/mbx.php b/util/mbx.php old mode 100644 new mode 100755 diff --git a/util/mbxfilter.php b/util/mbxfilter.php old mode 100644 new mode 100755 diff --git a/util/mergescores.php b/util/mergescores.php old mode 100644 new mode 100755 diff --git a/util/mergestus.php b/util/mergestus.php old mode 100644 new mode 100755 diff --git a/util/mergeteachers.php b/util/mergeteachers.php old mode 100644 new mode 100755 diff --git a/util/ptx.php b/util/ptx.php old mode 100644 new mode 100755 diff --git a/util/replaceurls.php b/util/replaceurls.php old mode 100644 new mode 100755 diff --git a/util/replacevids.php b/util/replacevids.php old mode 100644 new mode 100755 diff --git a/util/rescoreassess.php b/util/rescoreassess.php old mode 100644 new mode 100755 diff --git a/util/rescuecourse.php b/util/rescuecourse.php old mode 100644 new mode 100755 diff --git a/util/runcoursecleanup.php b/util/runcoursecleanup.php old mode 100644 new mode 100755 diff --git a/util/tagcoursecleanup.php b/util/tagcoursecleanup.php old mode 100644 new mode 100755 diff --git a/util/updatedeprecated.php b/util/updatedeprecated.php old mode 100644 new mode 100755 diff --git a/util/updateextref.php b/util/updateextref.php old mode 100644 new mode 100755 diff --git a/util/updatewronglibs.php b/util/updatewronglibs.php old mode 100644 new mode 100755 diff --git a/util/utils.php b/util/utils.php old mode 100644 new mode 100755 diff --git a/validate.php b/validate.php old mode 100644 new mode 100755 diff --git a/vendor/.gitignore b/vendor/.gitignore old mode 100644 new mode 100755 diff --git a/vendor/.htaccess b/vendor/.htaccess old mode 100644 new mode 100755 diff --git a/wamaphome.css b/wamaphome.css old mode 100644 new mode 100755 diff --git a/wikis/editwiki.php b/wikis/editwiki.php old mode 100644 new mode 100755 diff --git a/wikis/viewwiki.php b/wikis/viewwiki.php old mode 100644 new mode 100755 diff --git a/wikis/viewwikipublic.php b/wikis/viewwikipublic.php old mode 100644 new mode 100755 diff --git a/wikis/wikirev.php b/wikis/wikirev.php old mode 100644 new mode 100755