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("{$testsettings['intro']}
\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 '
'.filter($intropieces[$k]).'
';
+ } else {
+ echo '
';
+ echo '
'.filter($intropieces[$k]).'
';
+ }
+ break;
+ }
+ }
+ }
+ 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("{$testsettings['intro']}
\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 '
'.filter($intropieces[$k]).'
';
+ } else {
+ echo '
';
+ echo '
'.filter($intropieces[$k]).'
';
+ }
+ break;
+ }
+ }
+ }
+ 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 ''._('Try another similar question').'
';
-
+
//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 "
\n";
+
}
} else if ($testsettings['displaymethod'] == "Seq") {
for ($i = 0; $i'._('Try another similar question').'
';
-
+
//echo "';
echo "
", _('Skip Navigation'), " \n";
$extrefs = json_decode($extrefs, true);
@@ -3660,7 +4351,7 @@ function showscores($questions,&$attempts,$testsettings) {
}
- if (!$superdone) { // $total < $totpossible &&
+ if (!$superdone && $_GET["action"] != "jitskip") { // $total < $totpossible &&
if ($noindivscores && hasreattemptsany()) {
echo "
", _('Reattempt assessment on questions allowed (note: where reattempts are allowed, all scores, correct and incorrect, will be cleared)'), "
";
} else {
diff --git a/assessment/testutil.php b/assessment/testutil.php
old mode 100644
new mode 100755
diff --git a/assessment/watchvid.php b/assessment/watchvid.php
old mode 100644
new mode 100755
diff --git a/bltilaunch.php b/bltilaunch.php
old mode 100644
new mode 100755
diff --git a/calcqtimes.php b/calcqtimes.php
old mode 100644
new mode 100755
diff --git a/canvas.php b/canvas.php
old mode 100644
new mode 100755
diff --git a/canvasnav.php b/canvasnav.php
old mode 100644
new mode 100755
diff --git a/changelog.html b/changelog.html
old mode 100644
new mode 100755
diff --git a/checkbrowser.php b/checkbrowser.php
old mode 100644
new mode 100755
diff --git a/codeception.yml b/codeception.yml
old mode 100644
new mode 100755
diff --git a/composer.json b/composer.json
old mode 100644
new mode 100755
diff --git a/composer.lock b/composer.lock
old mode 100644
new mode 100755
diff --git a/config.php.dist b/config.php.dist
old mode 100644
new mode 100755
diff --git a/course/addassessment.php b/course/addassessment.php
old mode 100644
new mode 100755
index 01b7128050..6f63f3a8d0
--- a/course/addassessment.php
+++ b/course/addassessment.php
@@ -2,6 +2,8 @@
//IMathAS: Add/modify blocks of items on course page
//(c) 2006 David Lippman
+// Modified by Ondrej Zjevik 2018
+
/*** master php includes *******/
require("../init.php");
require("../includes/htmlutil.php");
@@ -1025,6 +1027,7 @@ function removeextref(el) {
writeHtmlSelected($line['displaymethod'],"LivePoll",0);
echo '>Live Poll (experimental)';
}?>
+
>Just In time
diff --git a/course/addblock.php b/course/addblock.php
old mode 100644
new mode 100755
diff --git a/course/addcalendar.php b/course/addcalendar.php
old mode 100644
new mode 100755
diff --git a/course/adddrillassess.php b/course/adddrillassess.php
old mode 100644
new mode 100755
diff --git a/course/addforum.php b/course/addforum.php
old mode 100644
new mode 100755
diff --git a/course/addgrades.php b/course/addgrades.php
old mode 100644
new mode 100755
diff --git a/course/addinlinetext.php b/course/addinlinetext.php
old mode 100644
new mode 100755
diff --git a/course/addlinkedtext.php b/course/addlinkedtext.php
old mode 100644
new mode 100755
diff --git a/course/addoutcomes.php b/course/addoutcomes.php
old mode 100644
new mode 100755
diff --git a/course/addquestions.css b/course/addquestions.css
old mode 100644
new mode 100755
diff --git a/course/addquestions.php b/course/addquestions.php
old mode 100644
new mode 100755
index 93b4bf4bb9..2974cc5f69
--- a/course/addquestions.php
+++ b/course/addquestions.php
@@ -2,6 +2,8 @@
//IMathAS: Add/modify blocks of items on course page
//(c) 2006 David Lippman
+//Modified by Ondrej Zjevik 2018
+
/*** master php includes *******/
require("../init.php");
include("../includes/htmlutil.php");
@@ -39,7 +41,7 @@
echo "Invalid ID";
exit;
}
-
+
if (isset($_GET['grp'])) { $sessiondata['groupopt'.$aid] = Sanitize::onlyInt($_GET['grp']); writesessiondata();}
if (isset($_GET['selfrom'])) {
$sessiondata['selfrom'.$aid] = Sanitize::stripHtmlTags($_GET['selfrom']);
@@ -375,6 +377,7 @@
var addqaddr = '$address';
";
$placeinhead .= "";
+ $placeinhead .= "";
$placeinhead .= "";
$placeinhead .= "";
$placeinhead .= "";
@@ -395,11 +398,17 @@
} else {
$beentaken = false;
}
- $stm = $DBH->prepare("SELECT itemorder,name,defpoints,displaymethod,showhints,intro FROM imas_assessments WHERE id=:id");
+ $stm = $DBH->prepare("SELECT itemorder,name,defpoints,displaymethod,showhints,intro,justintimeorder FROM imas_assessments WHERE id=:id");
$stm->execute(array(':id'=>$aid));
- list($itemorder,$page_assessmentName,$defpoints,$displaymethod,$showhintsdef, $assessintro) = $stm->fetch(PDO::FETCH_NUM);
+ list($itemorder,$page_assessmentName,$defpoints,$displaymethod,$showhintsdef, $assessintro, $justintimeorder) = $stm->fetch(PDO::FETCH_NUM);
$ln = 1;
+ if($displaymethod == "JustInTime"){
+ $placeinhead .= "";
+ } else{
+ $placeinhead .= "";
+ }
+
// Format of imas_assessments.intro is a JSON representation like
// [ "original (main) intro text",
// { displayBefore: question number to display before,
@@ -492,7 +501,7 @@
$timeout = array(0);
}
if (isset($avgtimepts[3]) && $avgtimepts[3]>10) {
- $timeout[1] = round($avgtimepts[2]); //score
+ $timeout[1] = round($avgtimepts[2]); //score
$timeout[2] = round($avgtimepts[1]/60,1); //time first try
$timeout[3] = Sanitize::onlyInt($avgtimepts[3]); //# of data
}
@@ -524,7 +533,7 @@
$jsarr[] = array("text", $text_seg['text'],
Sanitize::onlyInt($text_seg['displayUntil']-$text_seg['displayBefore']+1),
Sanitize::onlyInt($text_seg['ispage']),
- $text_seg['pagetitle'],
+ $text_seg['pagetitle'],
isset($text_seg['forntype'])?$text_seg['forntype']:0);
}
}
@@ -570,6 +579,7 @@
}
}
+
unset($questionjsarr);
//DATA MANIPULATION FOR POTENTIAL QUESTIONS
@@ -740,7 +750,7 @@
$query .= " AND (imas_library_items.libid > 0 OR imas_questionset.ownerid=?) ";
$qarr[] = $userid;
}
-
+
}
$query .= " ORDER BY imas_library_items.libid,imas_library_items.junkflag,imas_questionset.id";
if ($searchall==1) {
@@ -1194,6 +1204,28 @@ function addtoassessmentlist($items) {
var itemarray = ;
var beentaken = ;
var displaymethod = "";
+ /*document.getElementById("curqtbl").innerHTML = generateTable();
+ initeditor("selector","div.textsegment",null,true ,editorSetup);
+ tinymce.init({
+ selector: "h4.textsegment",
+ inline: true,
+ menubar: false,
+ statusbar: false,
+ branding: false,
+ plugins: ["charmap"],
+ toolbar: "charmap saveclose",
+ setup: editorSetup
+ });
+ */
+
//$(refreshTable);
refreshTable();
diff --git a/course/addquestionssave.php b/course/addquestionssave.php
old mode 100644
new mode 100755
index d50d7ded8d..27b84ed8ac
--- a/course/addquestionssave.php
+++ b/course/addquestionssave.php
@@ -138,9 +138,9 @@
}
}
}
-
- $qarr = array(':itemorder'=>$_REQUEST['order'], ':viddata'=>$viddata, ':intro'=>$new_intro, ':id'=>$aid, ':courseid'=>$cid);
- $query = "UPDATE imas_assessments SET itemorder=:itemorder,viddata=:viddata,intro=:intro";
+
+ $qarr = array(':itemorder'=>$_REQUEST['order'], ':viddata'=>$viddata, ':intro'=>$new_intro, ':id'=>$aid, ':courseid'=>$cid, ':jitorder'=>$_REQUEST['jitorder']);
+ $query = "UPDATE imas_assessments SET itemorder=:itemorder,viddata=:viddata,intro=:intro,justintimeorder=:jitorder";
if (isset($_POST['defpts'])) {
$defpoints = Sanitize::onlyInt($_POST['defpts']);
$query .= ",defpoints=:defpts";
diff --git a/course/addrubric.php b/course/addrubric.php
old mode 100644
new mode 100755
diff --git a/course/addvideotimes.php b/course/addvideotimes.php
old mode 100644
new mode 100755
diff --git a/course/addwiki.php b/course/addwiki.php
old mode 100644
new mode 100755
diff --git a/course/assessendmsg.php b/course/assessendmsg.php
old mode 100644
new mode 100755
diff --git a/course/categorize.php b/course/categorize.php
old mode 100644
new mode 100755
diff --git a/course/chgassessments.php b/course/chgassessments.php
old mode 100644
new mode 100755
diff --git a/course/chgblocks.php b/course/chgblocks.php
old mode 100644
new mode 100755
diff --git a/course/chgforums.php b/course/chgforums.php
old mode 100644
new mode 100755
diff --git a/course/chgoffline.php b/course/chgoffline.php
old mode 100644
new mode 100755
diff --git a/course/contentstats.php b/course/contentstats.php
old mode 100644
new mode 100755
diff --git a/course/convertintro.php b/course/convertintro.php
old mode 100644
new mode 100755
diff --git a/course/copyitems.php b/course/copyitems.php
old mode 100644
new mode 100755
diff --git a/course/copyoneitem.php b/course/copyoneitem.php
old mode 100644
new mode 100755
diff --git a/course/course.php b/course/course.php
old mode 100644
new mode 100755
diff --git a/course/coursemap.php b/course/coursemap.php
old mode 100644
new mode 100755
diff --git a/course/coursereports.php b/course/coursereports.php
old mode 100644
new mode 100755
diff --git a/course/courseshowitems.php b/course/courseshowitems.php
old mode 100644
new mode 100755
diff --git a/course/coursetolibrary.php b/course/coursetolibrary.php
old mode 100644
new mode 100755
diff --git a/course/deleteassessment.php b/course/deleteassessment.php
old mode 100644
new mode 100755
diff --git a/course/deleteblock.php b/course/deleteblock.php
old mode 100644
new mode 100755
diff --git a/course/deletedrillassess.php b/course/deletedrillassess.php
old mode 100644
new mode 100755
diff --git a/course/deleteforum.php b/course/deleteforum.php
old mode 100644
new mode 100755
diff --git a/course/deleteinlinetext.php b/course/deleteinlinetext.php
old mode 100644
new mode 100755
diff --git a/course/deletelinkedtext.php b/course/deletelinkedtext.php
old mode 100644
new mode 100755
diff --git a/course/deletewiki.php b/course/deletewiki.php
old mode 100644
new mode 100755
diff --git a/course/delitembyid.php b/course/delitembyid.php
old mode 100644
new mode 100755
diff --git a/course/drillassess.php b/course/drillassess.php
old mode 100644
new mode 100755
diff --git a/course/editsnippets.php b/course/editsnippets.php
old mode 100644
new mode 100755
diff --git a/course/edittoolscores.php b/course/edittoolscores.php
old mode 100644
new mode 100755
diff --git a/course/embedhelper.php b/course/embedhelper.php
old mode 100644
new mode 100755
diff --git a/course/enrollfromothercourse.php b/course/enrollfromothercourse.php
old mode 100644
new mode 100755
diff --git a/course/exception.php b/course/exception.php
old mode 100644
new mode 100755
diff --git a/course/exportcalfeed.php b/course/exportcalfeed.php
old mode 100644
new mode 100755
diff --git a/course/files/.gitignore b/course/files/.gitignore
old mode 100644
new mode 100755
diff --git a/course/gb-aidexport.php b/course/gb-aidexport.php
old mode 100644
new mode 100755
diff --git a/course/gb-export.php b/course/gb-export.php
old mode 100644
new mode 100755
diff --git a/course/gb-itemanalysis.php b/course/gb-itemanalysis.php
old mode 100644
new mode 100755
diff --git a/course/gb-itemanalysisdetail.php b/course/gb-itemanalysisdetail.php
old mode 100644
new mode 100755
diff --git a/course/gb-itemresults.php b/course/gb-itemresults.php
old mode 100644
new mode 100755
diff --git a/course/gb-testing.php b/course/gb-testing.php
old mode 100644
new mode 100755
diff --git a/course/gb-viewasid.php b/course/gb-viewasid.php
old mode 100644
new mode 100755
diff --git a/course/gb-viewdrill.php b/course/gb-viewdrill.php
old mode 100644
new mode 100755
diff --git a/course/gbcomments.php b/course/gbcomments.php
old mode 100644
new mode 100755
diff --git a/course/gbsettings.php b/course/gbsettings.php
old mode 100644
new mode 100755
diff --git a/course/gbtable2.php b/course/gbtable2.php
old mode 100644
new mode 100755
diff --git a/course/getblockitems.php b/course/getblockitems.php
old mode 100644
new mode 100755
diff --git a/course/getblockitemspublic.php b/course/getblockitemspublic.php
old mode 100644
new mode 100755
diff --git a/course/gradeallq.php b/course/gradeallq.php
old mode 100644
new mode 100755
diff --git a/course/gradebook.php b/course/gradebook.php
old mode 100644
new mode 100755
diff --git a/course/improvoerassess.php b/course/improvoerassess.php
old mode 100644
new mode 100755
diff --git a/course/isolateassessbygroup.php b/course/isolateassessbygroup.php
old mode 100644
new mode 100755
diff --git a/course/isolateassessgrade.php b/course/isolateassessgrade.php
old mode 100644
new mode 100755
diff --git a/course/latepasses.php b/course/latepasses.php
old mode 100644
new mode 100755
diff --git a/course/libtree.css b/course/libtree.css
old mode 100644
new mode 100755
diff --git a/course/libtree.php b/course/libtree.php
old mode 100644
new mode 100755
diff --git a/course/libtree2.php b/course/libtree2.php
old mode 100644
new mode 100755
diff --git a/course/listusers.php b/course/listusers.php
old mode 100644
new mode 100755
diff --git a/course/lockstu.php b/course/lockstu.php
old mode 100644
new mode 100755
diff --git a/course/logingrid.php b/course/logingrid.php
old mode 100644
new mode 100755
diff --git a/course/managecalitems.php b/course/managecalitems.php
old mode 100644
new mode 100755
diff --git a/course/managelibs.php b/course/managelibs.php
old mode 100644
new mode 100755
diff --git a/course/manageqset.php b/course/manageqset.php
old mode 100644
new mode 100755
diff --git a/course/managestugrps.php b/course/managestugrps.php
old mode 100644
new mode 100755
diff --git a/course/managetutors.php b/course/managetutors.php
old mode 100644
new mode 100755
diff --git a/course/masschgdates.php b/course/masschgdates.php
old mode 100644
new mode 100755
diff --git a/course/massexception.php b/course/massexception.php
old mode 100644
new mode 100755
diff --git a/course/masssend.php b/course/masssend.php
old mode 100644
new mode 100755
diff --git a/course/mergeassess.php b/course/mergeassess.php
old mode 100644
new mode 100755
diff --git a/course/moddataset.php b/course/moddataset.php
old mode 100644
new mode 100755
diff --git a/course/modquestion.php b/course/modquestion.php
old mode 100644
new mode 100755
diff --git a/course/modquestiongrid.php b/course/modquestiongrid.php
old mode 100644
new mode 100755
diff --git a/course/modtutorialq.php b/course/modtutorialq.php
old mode 100644
new mode 100755
diff --git a/course/moveitem.php b/course/moveitem.php
old mode 100644
new mode 100755
diff --git a/course/outcomemap.php b/course/outcomemap.php
old mode 100644
new mode 100755
diff --git a/course/outcomereport.php b/course/outcomereport.php
old mode 100644
new mode 100755
diff --git a/course/outcometable.php b/course/outcometable.php
old mode 100644
new mode 100755
diff --git a/course/printlayout.php b/course/printlayout.php
old mode 100644
new mode 100755
diff --git a/course/printlayoutbare.php b/course/printlayoutbare.php
old mode 100644
new mode 100755
diff --git a/course/printlayoutword.php b/course/printlayoutword.php
old mode 100644
new mode 100755
diff --git a/course/printtest.php b/course/printtest.php
old mode 100644
new mode 100755
diff --git a/course/public.php b/course/public.php
old mode 100644
new mode 100755
diff --git a/course/quickdrill.php b/course/quickdrill.php
old mode 100644
new mode 100755
diff --git a/course/rectrack.php b/course/rectrack.php
old mode 100644
new mode 100755
diff --git a/course/redeemlatepass.php b/course/redeemlatepass.php
old mode 100644
new mode 100755
diff --git a/course/redeemlatepassforum.php b/course/redeemlatepassforum.php
old mode 100644
new mode 100755
diff --git a/course/report-commonstu.php b/course/report-commonstu.php
old mode 100644
new mode 100755
diff --git a/course/report-weeklylab.php b/course/report-weeklylab.php
old mode 100644
new mode 100755
diff --git a/course/reviewlibrary.php b/course/reviewlibrary.php
old mode 100644
new mode 100755
diff --git a/course/savebrokenqflag.php b/course/savebrokenqflag.php
old mode 100644
new mode 100755
diff --git a/course/savecalendardrag.php b/course/savecalendardrag.php
old mode 100644
new mode 100755
diff --git a/course/savelibassignflag.php b/course/savelibassignflag.php
old mode 100644
new mode 100755
diff --git a/course/savequickreorder.php b/course/savequickreorder.php
old mode 100644
new mode 100755
diff --git a/course/sendmsgmodal.php b/course/sendmsgmodal.php
old mode 100644
new mode 100755
diff --git a/course/showcalendar.php b/course/showcalendar.php
old mode 100644
new mode 100755
diff --git a/course/showfeedback.php b/course/showfeedback.php
old mode 100644
new mode 100755
diff --git a/course/showfeedbackall.php b/course/showfeedbackall.php
old mode 100644
new mode 100755
diff --git a/course/showlicense.php b/course/showlicense.php
old mode 100644
new mode 100755
diff --git a/course/showlinkedtext.php b/course/showlinkedtext.php
old mode 100644
new mode 100755
diff --git a/course/showlinkedtextpublic.php b/course/showlinkedtextpublic.php
old mode 100644
new mode 100755
diff --git a/course/showstugroup.php b/course/showstugroup.php
old mode 100644
new mode 100755
diff --git a/course/solver.css b/course/solver.css
old mode 100644
new mode 100755
diff --git a/course/testquestion.php b/course/testquestion.php
old mode 100644
new mode 100755
diff --git a/course/timeshift.php b/course/timeshift.php
old mode 100644
new mode 100755
diff --git a/course/treereader.php b/course/treereader.php
old mode 100644
new mode 100755
diff --git a/course/unenroll.php b/course/unenroll.php
old mode 100644
new mode 100755
diff --git a/course/uploadgrades.php b/course/uploadgrades.php
old mode 100644
new mode 100755
diff --git a/course/uploadmultgrades.php b/course/uploadmultgrades.php
old mode 100644
new mode 100755
diff --git a/course/viewactionlog.php b/course/viewactionlog.php
old mode 100644
new mode 100755
diff --git a/course/viewemails.php b/course/viewemails.php
old mode 100644
new mode 100755
diff --git a/course/viewforumgrade.php b/course/viewforumgrade.php
old mode 100644
new mode 100755
diff --git a/course/viewloginlog.php b/course/viewloginlog.php
old mode 100644
new mode 100755
diff --git a/course/viewsource.php b/course/viewsource.php
old mode 100644
new mode 100755
diff --git a/csrfp/index.php b/csrfp/index.php
old mode 100644
new mode 100755
diff --git a/csrfp/js/index.php b/csrfp/js/index.php
old mode 100644
new mode 100755
diff --git a/csrfp/js/simplecsrfprotector.js b/csrfp/js/simplecsrfprotector.js
old mode 100644
new mode 100755
diff --git a/csrfp/licence.md b/csrfp/licence.md
old mode 100644
new mode 100755
diff --git a/csrfp/log/.gitignore b/csrfp/log/.gitignore
old mode 100644
new mode 100755
diff --git a/csrfp/log/.htaccess b/csrfp/log/.htaccess
old mode 100644
new mode 100755
diff --git a/csrfp/log/index.php b/csrfp/log/index.php
old mode 100644
new mode 100755
diff --git a/csrfp/simplecsrfp.php b/csrfp/simplecsrfp.php
old mode 100644
new mode 100755
diff --git a/diag/index.php b/diag/index.php
old mode 100644
new mode 100755
diff --git a/directaccess.php b/directaccess.php
old mode 100644
new mode 100755
diff --git a/docs/AccessingOnlineHomeworkinWAMAP.doc b/docs/AccessingOnlineHomeworkinWAMAP.doc
old mode 100644
new mode 100755
diff --git a/docs/GettingStarted.pdf b/docs/GettingStarted.pdf
old mode 100644
new mode 100755
diff --git a/docs/administration.html b/docs/administration.html
old mode 100644
new mode 100755
diff --git a/docs/asciimathref.html b/docs/asciimathref.html
old mode 100644
new mode 100755
diff --git a/docs/commontasks.html b/docs/commontasks.html
old mode 100644
new mode 100755
diff --git a/docs/diagnostics.html b/docs/diagnostics.html
old mode 100644
new mode 100755
diff --git a/docs/docs.css b/docs/docs.css
old mode 100644
new mode 100755
diff --git a/docs/docs.php b/docs/docs.php
old mode 100644
new mode 100755
diff --git a/docs/gettingstarted.html b/docs/gettingstarted.html
old mode 100644
new mode 100755
diff --git a/docs/introquestionwriting.html b/docs/introquestionwriting.html
old mode 100644
new mode 100755
diff --git a/docs/langquickref.doc b/docs/langquickref.doc
old mode 100644
new mode 100755
diff --git a/docs/managing.html b/docs/managing.html
old mode 100644
new mode 100755
diff --git a/docs/morequestions.html b/docs/morequestions.html
old mode 100644
new mode 100755
diff --git a/docs/questionoddities.html b/docs/questionoddities.html
old mode 100644
new mode 100755
diff --git a/embedq.php b/embedq.php
old mode 100644
new mode 100755
diff --git a/filestore/.gitignore b/filestore/.gitignore
old mode 100644
new mode 100755
diff --git a/filter/basiclti/blti_util.php b/filter/basiclti/blti_util.php
old mode 100644
new mode 100755
diff --git a/filter/basiclti/post.php b/filter/basiclti/post.php
old mode 100644
new mode 100755
diff --git a/filter/filter.php b/filter/filter.php
old mode 100644
new mode 100755
diff --git a/filter/graph/FreeSerifItalic.ttf b/filter/graph/FreeSerifItalic.ttf
old mode 100644
new mode 100755
diff --git a/filter/graph/asciisvgimg.php b/filter/graph/asciisvgimg.php
old mode 100644
new mode 100755
diff --git a/filter/graph/imgs/.gitignore b/filter/graph/imgs/.gitignore
old mode 100644
new mode 100755
diff --git a/filter/graph/sscrtotext.php b/filter/graph/sscrtotext.php
old mode 100644
new mode 100755
diff --git a/filter/graph/svgimg.php b/filter/graph/svgimg.php
old mode 100644
new mode 100755
diff --git a/filter/math/ASCIIMath2TeX.php b/filter/math/ASCIIMath2TeX.php
old mode 100644
new mode 100755
diff --git a/firebase-messaging-sw.php b/firebase-messaging-sw.php
old mode 100644
new mode 100755
diff --git a/footer.php b/footer.php
old mode 100644
new mode 100755
diff --git a/forms.php b/forms.php
old mode 100644
new mode 100755
diff --git a/forums/embeddone.php b/forums/embeddone.php
old mode 100644
new mode 100755
diff --git a/forums/flaggedthreads.php b/forums/flaggedthreads.php
old mode 100644
new mode 100755
diff --git a/forums/forums.css b/forums/forums.css
old mode 100644
new mode 100755
diff --git a/forums/forums.php b/forums/forums.php
old mode 100644
new mode 100755
diff --git a/forums/listlikes.php b/forums/listlikes.php
old mode 100644
new mode 100755
diff --git a/forums/listviews.php b/forums/listviews.php
old mode 100644
new mode 100755
diff --git a/forums/newthreads.php b/forums/newthreads.php
old mode 100644
new mode 100755
diff --git a/forums/posthandler.php b/forums/posthandler.php
old mode 100644
new mode 100755
diff --git a/forums/posts.php b/forums/posts.php
old mode 100644
new mode 100755
diff --git a/forums/postsbyname.php b/forums/postsbyname.php
old mode 100644
new mode 100755
diff --git a/forums/recordlikes.php b/forums/recordlikes.php
old mode 100644
new mode 100755
diff --git a/forums/savetagged.php b/forums/savetagged.php
old mode 100644
new mode 100755
diff --git a/forums/thread.php b/forums/thread.php
old mode 100644
new mode 100755
diff --git a/gethomemenu.php b/gethomemenu.php
old mode 100644
new mode 100755
diff --git a/getpostlist.php b/getpostlist.php
old mode 100644
new mode 100755
diff --git a/handheld.css b/handheld.css
old mode 100644
new mode 100755
diff --git a/header.php b/header.php
old mode 100644
new mode 100755
diff --git a/help.html b/help.html
old mode 100644
new mode 100755
diff --git a/help.php b/help.php
old mode 100644
new mode 100755
diff --git a/i18n/de.po b/i18n/de.po
old mode 100644
new mode 100755
diff --git a/i18n/extractjsfrompo.php b/i18n/extractjsfrompo.php
old mode 100644
new mode 100755
diff --git a/i18n/getjsmessages.php b/i18n/getjsmessages.php
old mode 100644
new mode 100755
diff --git a/i18n/i18n.php b/i18n/i18n.php
old mode 100644
new mode 100755
diff --git a/i18n/locale/de/LC_MESSAGES/imathas.mo b/i18n/locale/de/LC_MESSAGES/imathas.mo
old mode 100644
new mode 100755
diff --git a/i18n/locale/de/messages.js b/i18n/locale/de/messages.js
old mode 100644
new mode 100755
diff --git a/i18n/messages.js b/i18n/messages.js
old mode 100644
new mode 100755
diff --git a/i18n/messages.po b/i18n/messages.po
old mode 100644
new mode 100755
diff --git a/i18n/notes.txt b/i18n/notes.txt
old mode 100644
new mode 100755
diff --git a/i18n/translating.md b/i18n/translating.md
old mode 100644
new mode 100755
diff --git a/iconfonts/caledit.css b/iconfonts/caledit.css
old mode 100644
new mode 100755
diff --git a/iconfonts/font_contents.html b/iconfonts/font_contents.html
old mode 100644
new mode 100755
diff --git a/iconfonts/fonts/addquestions.eot b/iconfonts/fonts/addquestions.eot
old mode 100644
new mode 100755
diff --git a/iconfonts/fonts/addquestions.svg b/iconfonts/fonts/addquestions.svg
old mode 100644
new mode 100755
diff --git a/iconfonts/fonts/addquestions.ttf b/iconfonts/fonts/addquestions.ttf
old mode 100644
new mode 100755
diff --git a/iconfonts/fonts/addquestions.woff b/iconfonts/fonts/addquestions.woff
old mode 100644
new mode 100755
diff --git a/iconfonts/fonts/caledit.eot b/iconfonts/fonts/caledit.eot
old mode 100644
new mode 100755
diff --git a/iconfonts/fonts/caledit.svg b/iconfonts/fonts/caledit.svg
old mode 100644
new mode 100755
diff --git a/iconfonts/fonts/caledit.ttf b/iconfonts/fonts/caledit.ttf
old mode 100644
new mode 100755
diff --git a/iconfonts/fonts/caledit.woff b/iconfonts/fonts/caledit.woff
old mode 100644
new mode 100755
diff --git a/iconfonts/fonts/imathas.eot b/iconfonts/fonts/imathas.eot
old mode 100644
new mode 100755
diff --git a/iconfonts/fonts/imathas.svg b/iconfonts/fonts/imathas.svg
old mode 100644
new mode 100755
diff --git a/iconfonts/fonts/imathas.ttf b/iconfonts/fonts/imathas.ttf
old mode 100644
new mode 100755
diff --git a/iconfonts/fonts/imathas.woff b/iconfonts/fonts/imathas.woff
old mode 100644
new mode 100755
diff --git a/iconfonts/imathasfont.css b/iconfonts/imathasfont.css
old mode 100644
new mode 100755
diff --git a/iconfonts/imathasfontie7.css b/iconfonts/imathasfontie7.css
old mode 100644
new mode 100755
diff --git a/iconfonts/selection.json b/iconfonts/selection.json
old mode 100644
new mode 100755
diff --git a/iconfonts/style.css b/iconfonts/style.css
old mode 100644
new mode 100755
diff --git a/imas.css b/imas.css
old mode 100644
new mode 100755
diff --git a/imascore.css b/imascore.css
old mode 100644
new mode 100755
index 7ecaeb5066..f7a8184c98
--- a/imascore.css
+++ b/imascore.css
@@ -1,1200 +1,1418 @@
-html {
-
-}
-body {
-
- margin: 10px;
- padding: 0px;
-}
-div {
- margin: 0px;
- padding: 0px;
-}
-p {
- margin: 0;
- padding: .5em 0;
-}
-br {
- line-height: 1em;
-}
-h1,h2,h3,h4,h5,h6 {
- padding: 0;
- font-weight: bold;
-}
-h1 {
- font-size: 1.5em;
- margin: .7em 0;
-}
-h2,h3,h4,h5,h6 {
- margin: 1em 0;
-}
-h2 {
- font-size: 1.25em;
-}
-h3 {
- font-size: 1.1em;
-}
-h4 {
- font-size: 1.05em;
-}
-h5,h6 {
- font-size: 1em;
-}
-
-div.pagetitle h2, div.pagetitle h1 {
- margin: 10px 0px 20px 0px;
-}
-div.item {
- margin-bottom: 10px;
- padding: 5px;
- border-radius: 5px;
- border-bottom: 1px solid #ccc;
-}
-div.signup {
- border: 1px solid #000;
- margin-bottom: 10px;
- margin-top: 10px;
- padding: 5px;
-}
-div#headerhome, div#homelinkbox {
- padding-top: 8px;
-}
-div.itemsum {
- margin-left: 45px;
- overflow: auto;
- padding: 5px 0px;
- /*margin-top: -.5em;
- margin-bottom: -.5em;*/
-}
-span.iteminfo {
- margin-left: 30px;
-}
-.info {
- color: #4bb6e8;
-}
-.noticetext, a.noticetext, a.noticetext:link, a.noticetext:visited {
- color: #db0000;
-}
-label.error {
- color: #db0000;
- font-style: italic;
- display: block;
-}
-input.form + label.error {
- float: left;
- display: inline;
- margin-left: 10px;
-}
-
-input[type=checkbox] + label.error {
- float:none;
- display: inline;
- margin-left: 10px;
-}
-div.title {
- /*display: inline;*/
- margin-left: 30px;
-}
-div.itemhdr {
- position: relative;
- min-height: 26px;
-}
-.itemhdricon {
- position: absolute;
-}
-.itemhdricon div {
- padding-left: 5px;
- padding-right: 5px;
- margin-right: 5px;
-}
-div.itemhdr div.title {
- margin-right: 30px;
-}
-div.itemhdrdd, div.itemhdrright {
- position: absolute;
- right: 0px;
- top:0px;
-}
-
-@media only screen and (min-width: 1005px) {
- /* put dropdown next to item when wide*/
- .notfw .itemhdr .title {
- display: inline-block;
- }
- .notfw div.itemhdrdd {
- display: inline-block;
- position: relative;
- vertical-align: top;
- }
-}
-
-div.block, div.blockitems div.blockitems div.block {
- padding: 5px;
- margin-bottom: 10px;
- border-radius: 4px 4px 0 0;
-}
-div.blockitems, div.blockitems div.blockitems div.blockitems {
- padding: 10px;
- margin-top: -10px;
- margin-bottom: 10px;
-}
-div.block.grouptoggle {
- margin-bottom: 0px;
- margin-top: 10px
-}
-div.block.grouptoggle + div.blockitems {
- margin-top: 0px
-}
-div.hidden {
- display:none;
-}
-.showinmobile {
- display:none;
-}
-div.icon {
- float: left;
- padding-left: 5px;
- padding-right: 5px;
- margin-right: 5px;
-}
-span.icon {
- padding-left: 5px;
- padding-right: 5px;
- margin-right: 5px;
-}
-div.breadcrumb {
- border: 1px solid #000;
- margin-bottom: 10px;
- padding: 5px;
- background-color: #ddddff;
-}
-div.cp {
- min-height: 1%;
- padding: 5px;
- margin-top: 20px;
- border-radius: 4px;
-}
-div.cpmid {
- min-height: 1%;
- padding: 5px;
- margin-top: 10px;
- margin-bottom: 10px;
- border-radius: 4px;
-}
-.pointer {
- cursor:pointer;
-}
-ul.nomark {
- margin-top: 5px;
- list-style-type: none;
- margin-left: 15px;
- padding-left: 0px;
-}
-ul.nomark li {
- margin-left: 0px;
- padding-left: 0px;
-}
-
-ul.qview {
- list-style-type: none;
- margin-left: 12px;
- padding-left: 0px;
- margin-bottom: 6px;
-}
-ul.qview ul {
- padding-left: 10px;
- border-left: 1px dashed #ccc;
-}
-ul.qview li {
- margin-left: 0px;
- padding-left: 0px;
- margin-top: 2px;
-}
-div#tbl-container {
- position: relative;
- margin-top: 10px;
- margin-bottom: 10px;
- width:99.5%;
- height:auto;
-
-}
-table.gb {
- border-collapse: collapse;
- margin: 0px;
- position:relative;
-}
-
-table.gb thead th {
- position: relative;
- text-align: center;
- z-index: 20;
- background-color: #fff;
-}
-td, th {
- margin: 0px;
- padding: 2px 5px 2px 5px;
-}
-tr {
- margin: 0px;
- padding: 0px;
-}
-
-td.c, input.c {
- text-align: center;
-}
-td.r {
- text-align: right;
-}
-span.form {
- display: block;
- width: 200px;
- float: left;
- margin-bottom: 10px;
- text-align: right;
- padding-right: 20px;
-}
-span.formright {
- display: block;
- width: 500px;
- float: left;
- margin-bottom: 10px;
- text-align: left;
-}
-
-span.wideformright {
- display: block;
- float: left;
- margin-bottom: 10px;
- text-align: left;
-}
-input.form {
- display: block;
- width: 200px;
- float: left;
- margin-bottom: 10px;
-}
-
-div.submit {
- margin-top: 10px;
- width: 400px;
- text-align: right;
-}
-span#leftcontenttoggle {
- display:none;
- vertical-align:middle;
- padding: 0px 5px;
-}
-span#leftcontenttoggle:hover {
- background-color: #eee;
-}
-span#leftcontenttoggle.leftcontentactive {
- background-color: #eee;
-}
-
-@media only screen and (max-width: 760px) {
- span.form {
- width: auto;
- float: none;
- text-align: left;
- margin-bottom: 5px;
- padding-right: 0px;
- }
- span.formright, span.wideformright {
- width: auto;
- float: none;
- }
- div.submit {
- width: auto;
- }
- span.formright input[type="text"], span.formright input[type="password"] {
- max-width: 100%;
- }
-}
-
-div.editor {
- margin-bottom: 10px;
-}
-.fbbox {
- background-color: #fff;
- border: 1px solid #ccc;
- margin: 5px;
- padding: 0px 5px;
-}
-
-span.column {
- display: block;
- width: 200px;
- float: left;
- padding-right: 20px;
-}
-
-span.left {
- float: left;
-}
-
-
-
-br.form {
- clear: left;
-}
-img {
- border: 0;
-}
-img.mida {
- vertical-align: middle;
-}
-p img {
- max-width: 95%;
- height: auto;
-}
-div.right {
- text-align: right;
-}
-span.right {
- float:right;
-}
-.floatright {
- float:right;
-}
-.floatleft {
- float:left;
-}
-span.padright {
- float:right;
- padding-right: 120px;
-}
-.clear {
- clear: both;
-}
-br.clear {
- line-height: 0px;
- height: 0px;
-}
-span.hdr1 {
- font-size: 120%;
- font-weight: bold;
-}
-.small {
- font-size: 70%;
-}
-#leftcontent {
- position: absolute;
- left: 0px;
- width:170px;
- padding:5px;
- margin-top:10px;
- border-radius: 5px;
-}
-.leftnavp a {
- display: inline-block;
- margin-left: 6px;
- text-indent: -6px;
- padding-top: 5px;
-}
-.leftnavp a:first-of-type {
- padding-top: 2px;
-}
-#centercontent {
- margin-left:180px;
- padding-left:10px;
- margin-top:10px;
-}
-
-.midwrapper {
- position: relative;
-}
-
-.red {
- color: red;
-}
-
-table.cal {
- border-collapse: collapse;
- width: 100%;
-}
-table.cal thead th {
- text-align: center;
- background-color: #ddf;
- border: 1px solid #000;
-}
-table.cal td {
- border: 1px solid #000;
- width: 14%;
- height: 2.5em;
- vertical-align: top;
-}
-.day {
- font-size: 80%;
- background-color: #ddf;
-}
-.today {
- background-color: #fdd;
-}
-.caldatebar {
- background-color: #ddf;
-}
-div.center {
- text-align: center;
-}
-span.calitem {
- padding: 0 4px;
- background-color: #0ff;
- margin: 1px;
-}
-table.cal span.calitem {
- display: inline-block;
-}
-/*
-div.td {
- width: 100%;
- height: 100%;
- overflow: hidden;
-}
-*/
-img.faded {
- filter: alpha(opacity: 30);
- KHTMLOpacity: .3;
- MozOpacity: .3;
- opacity: .3;
-}
-.grey {
- color: #999;
-}
-.itemgrey {
- opacity: .5;
-}
-div.ddmenu {
- position: absolute;
- right: 10px;
- visibility: hidden;
- margin: 0px;
- z-index: 100;
- padding: 5px;
- background: #eeffee;
-}
-
-.nowrap {
- white-space: nowrap;
-}
-.dpTable {
- font-size: 90%;
- text-align: center;
- color: #505050;
- background-color: #ece9d8;
- border: 1px solid #AAAAAA;
- }
-.dpTD {
- border: 1px solid #ece9d8;
- }
-.dpDayHighlightTD {
- background-color: #CCCCCC;
- border: 1px solid #AAAAAA;
- }
-.dpTDHover {
- background-color: #aca998;
- border: 1px solid #888888;
- cursor: pointer;
- color: red;
- }
-.dpDayTD {
- background-color: #CCCCCC;
- border: 1px solid #AAAAAA;
- color: white;
- }
-.dpTitleText {
- font-weight: bold;
- }
-.dpDayHighlight {
- color: #4060ff;
- font-weight: bold;
- }
-.dpButton, .dpTodayButton {
- font-size: 90%;
- color: gray;
- background: #d8e8ff;
- font-weight: bold;
- padding: 0px;
- }
-
-/*div.inactivewrapper, div.activewrapper {
- margin: 0px;
- padding: 0px;
-}*/
-div.blockwrapper {
- margin: 0; padding:0;
-}
-
-div.tips {
- border: 1px solid #91d5d5;
- border-radius: 8px;
- background-color: #cff;
- position: absolute;
- padding: 3px 6px;
- z-index: 100;
-}
-/*
- need to resolve tips below first
-div.tips:after, div.tips:before {
- top: 100%;
- left: 15px;
- border: solid transparent;
- content: " ";
- height: 0;
- width: 0;
- position: absolute;
- pointer-events: none;
-}
-div.tips.tipsright:after, div.tips.tipsright:before {
- left: auto;
- right: 15px;
-}
-
-div.tips:after {
- border-color: rgba(204, 255, 255, 0);
- border-top-color: #cff;
- border-width: 6px;
- margin-left: -6px;
-}
-div.tips:before {
- border-color: rgba(145, 213, 213, 0);
- border-top-color: #91d5d5;
- border-width: 7px;
- margin-left: -7px;
-}
-*/
-#headerlogo {
- position: absolute;
- right:0px;
- top: 7px;
- cursor: pointer;
-}
-a:hover:focus {
- outline: none;
-}
-a:link:focus {
- text-decoration: underline;
-}
-ul.tablist {
- padding: 0;
- margin: 0;
- margin-bottom: -1px;
-}
-ul.tablist li {
- display: inline-block;
- border: 1px solid #ccc;
- background-color: #eee;
- margin-right: 2px;
-}
-ul.tablist li a {
- display: inline-block;
- padding: 0.2em 1em;
- text-decoration: none;
- color: #000;
-}
-
-ul.tablist li.active {
- border-bottom: 1px solid #fff;
- background-color: #fff;
-}
-div.tabpanel {
- border: 1px solid #ccc;
- background-color: #fff;
- margin:0px;
- padding:5px 10px;
-}
-
-ul#navlist
-{
-clear: both;
-padding: 0px;
-margin: 0px;
-list-style-type: none;
-float: left;
-width: 100%;
-color: #fff;
-background-color: #036;
-}
-
-ul#navlist li {
-display: inline;
-}
-
-ul#navlist li a
-{
-float: left;
-/*width: 5em;*/
-color: #fff;
-background-color: #036;
-padding: 0.2em 1em;
-text-decoration: none;
-border-right: 1px solid #fff;
-}
-
-ul#navlist li a:hover, ul#navlist li a:focus
-{
-background-color: #369;
-color: #fff;
-}
-
-div.additembox {
- margin-bottom: 2px;
-}
-div.additembox span {
- font-size: 85%;
- background-color: #ccc;
- padding: 0 10px;
-}
-
-.newnote {
- color: #f00;
-}
-div#leftcolumn {float: left; width: 25%; min-width: 200px;}
-div#rightcolumn {float: right; width: 74%; min-width: 250px;}
-
-@media (max-width:805px) {
- div#leftcolumn, div#rightcolumn {
- float: none;
- width: auto;
- }
-}
-
-ul.courselist {
- margin: 0px;
- padding-left: 0px;
-}
-ul.courselist li {
- list-style-type: none;
-}
-ul.courselist ul {
- margin-left: 2px;
- padding-left: 5px;
-}
-li.coursegroup ul {
- border-left: 1px dashed #ccc;
-}
-ul.courselist > li {
- border-bottom: 1px solid #999;
- padding: 3px 0px 2px;
-}
-ul.courselist > li:last-child {
- border: 0;
-}
-div > ul.courselist {
- margin-bottom: 15px;
-}
-ul.courselist > li > a {
- display:inline-block;
- margin-right:20px;
- padding-left: 5px;
- text-indent: -5px;
-}
-ul.courselist li {
- position: relative;
-}
-div.coursedd {
- position: absolute;
- right: 0px;
- top: 2px;
-}
-
-div.block h3,div.block h2 {
- margin: 2px;
-}
-div#viewbuttoncont {
- float: right;
- background: #fff;
-}
-div#viewbuttoncont a {
- color: #fff;
- display: inline-block;
- padding: 3px 5px;
- margin-left: 2px;
-}
-div#viewbuttoncont a:hover, div#viewbuttoncont a:focus {
- text-decoration: none;
-}
-div#viewbuttoncont a.buttonactive {
- background-color: #369;
- cursor: default;
- border-radius: 4px;
-}
-div#viewbuttoncont a.buttoninactive {
- background-color: #297bbb;
- border-radius: 4px;
-}
-div#viewbuttoncont a.buttoninactive:hover {
- background-color: #036;
-}
-a.abutton {
- padding: 3px 8px;
- display: inline-block;
-}
-a.abutton, a.abutton:hover, a.abutton:focus {
- text-decoration: none;
-}
-input[type=submit],input[type=button], button, a.abutton {
- color: #000;
- background-color: #eee;
- border-radius: 4px;
- border: 1px solid #ccc;
- font: inherit;
- height:1.5em;
- line-height: 1.5em;
- padding: 0 8px;
- margin: 2px 3px;
-}
-input[type=submit].secondarybtn,input[type=button].secondarybtn, button.secondarybtn {
- background-color: #f9f9f9;
-}
-input[type=submit]:hover, button:hover,input[type=button]:hover, a.abutton:hover {
- background-color: #e3e3ff;
-}
-input[type=submit]:focus, button:focus,input[type=button]:focus, a.abutton:focus {
- background-color: #e3e3ff;
-}
-input[type=submit]:disabled,input[type=button]:disabled {
- color: #666;
-}
-input[type=submit]:disabled:hover,input[type=button]:disabled:hover {
- background-color: #eee;
-}
-#GB_overlay {
- position: fixed;
- margin: auto;
- top: 0;
- left: 0;
- z-index: 100;
- width: 100%;
- height: 100%;
- opacity: 0.65;
- -moz-opacity: 0.65; /* older Gecko-based browsers */
- filter:alpha(opacity=65); /* For IE6&7 */
- background-color: #000;
-}
-#GB_frameoverlay {
- position: absolute;
- left: 0;
- top: 0;
- width: 100%;
- height: 100%;
- z-index: 1000;
- opacity: 0.01;
- -moz-opacity: 0.01;
- filter:alpha(opacity=1); /* For IE6&7 */
- background-color: #fff;
-}
-#GB_resizehandle {
- position: absolute;
- right: 0;
- bottom: 0;
- width: 20px;
- height: 20px;
- overflow: hidden;
- cursor: nwse-resize;
- z-index: 1001;
-}
-
-#GB_resizehandle::after {
- content: '';
- position: absolute;
- display: block;
- width: 50px;
- height: 0;
- box-shadow: 0 10px 0 1px black, 0 17px 0 1px black, 0 24px 0 1px black;
- transform: translate(-50%, -50%) rotate(-45deg) scale(0.5);
- top: 50%;
- left: 50%;
-}
-#GB_window {
- top: 10px;
- left: 0px;
- right: 0px;
- margin: 0 auto;
- position: fixed;
- background: #fff;
- border: 3px solid #369;
- overflow: hidden;/*auto;*/
- width: 400px;
- height: 400px;
- z-index: 150;
-}
-
-#GB_frameholder {
- position: relative;
- overflow: auto;
- width: 100%;
- height: 500px;
- -webkit-overflow-scrolling: touch;
-}
-#GB_frame {
- border: 0;
- width: 100%;
- height: 100%;
- position: absolute;
-}
-
-#GB_caption {
- color: #fff;
- background: #369;
- padding: 2px 0 2px 5px;
- margin: 0;
- text-align: left;
- cursor: pointer;
-}
-#GB_caption a, #GB_caption a:hover, #GB_caption a:focus {
- color: #fff;
- text-decoration: none;
-}
-
-ol li ol {
- list-style-type: lower-alpha;
-}
-
-svg {
- overflow: hidden;
-}
-
-table.gridded {
- border-collapse: collapse;
- margin: 0px;
-}
-table.gridded.centered {
- margin: 0px auto;
-}
-
-table.gridded thead th, table.gridded thead td {
- text-align: center;
- z-index: 20;
- background-color: #eef;
- border: 1px solid #333;
- font-weight: bold;
- border-bottom: 2px solid #333;
-}
-table.gridded td {
- border: 1px solid #333;
-}
-table.gridded tbody th {
- z-index: 20;
- background-color: #eef;
- border: 1px solid #333;
- font-weight: bold;
- border-right: 2px solid #333;
-}
-span.boxed {
- border: 1px solid #000;
- padding: 2px 5px;
-}
-a.attach {
- background: url(tinymce4/plugins/attach/ed_attach.gif) center left no-repeat;
- padding-left: 20px;
-}
-a[target=_blank]::after {
- content: "";
- width:16px;
- height:1em;
- display: inline-block;
- background: url(img/extlink.png) center right no-repeat;
-}
-.mce-content-body a[target=_blank]:after {
- display: none;
-}
-.mce-content-body span.AMedit {border: 1px solid #ff0000;}
-div.forumgrp img {
- max-width: 90%;
- height: auto;
-}
-div.multisel {
- display: inline-block;
-}
-div.multiselitem {
- background-color: #eee;
- margin-bottom: 2px;
-}
-.videoembedbtn {
- color: #999;
- cursor: pointer;
-}
-.ind1 {
- margin-left: .75em;
-}
-.ind2 {
- margin-left: 1.5em;
-}
-.ind3 {
- margin-left: 2.25em;
-}
-.ind4 {
- margin-left: 3em;
-}
-.delx {
- position: absolute;
- right: 0px;
- width: 16px;
- text-align: center;
- top: 0px;
- cursor: pointer;
-}
-.delx a:hover, .delx a, .delx a:focus {
- font-family: sans-serif;
- color: #6d6d6d;
- text-decoration: none;
-}
-
-pre {
- font-size: medium;
-}
-
-.noselect {
- -webkit-touch-callout: none; /* iOS Safari */
- -webkit-user-select: none; /* Chrome/Safari/Opera */
- -khtml-user-select: none; /* Konqueror */
- -moz-user-select: none; /* Firefox */
- -ms-user-select: none; /* Internet Explorer/Edge */
- user-select: none; /* Non-prefixed version, currently
- not supported by any browser */
-}
-
-.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}
-.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}
-.video-wrapper-wrapper{width:100%;padding:0;}
-
-.vidmute { background: url(img/vidicons.png) no-repeat 0px 0px; width:24px; height:20px; display: inline-block;}
-.vidmute:hover { background: url(img/vidicons.png) no-repeat -24px 0px; width:24px; height:20px; display: inline-block;}
-.vidmuteI { background: url(img/vidicons.png) no-repeat -48px 0px; width:24px; height:20px; display: inline-block;}
-.vidvol { background: url(img/vidicons.png) no-repeat 0px -24px; width:24px; height:20px; display: inline-block;}
-.vidvol:hover { background: url(img/vidicons.png) no-repeat -24px -24px; width:24px; height:20px; display: inline-block;}
-.vidvolI { background: url(img/vidicons.png) no-repeat -48px -24px; width:24px; height:20px; display: inline-block;}
-.vidpause { background: url(img/vidicons.png) no-repeat 0px -48px; width:24px; height:20px; display: inline-block;}
-.vidpause:hover { background: url(img/vidicons.png) no-repeat -24px -48px; width:24px; height:20px; display: inline-block;}
-.vidpauseI { background: url(img/vidicons.png) no-repeat -48px -48px; width:24px; height:20px; display: inline-block;}
-.vidrew { background: url(img/vidicons.png) no-repeat 0px -72px; width:24px; height:20px; display: inline-block;}
-.vidrew:hover { background: url(img/vidicons.png) no-repeat -24px -72px; width:24px; height:20px; display: inline-block;}
-.vidrewI { background: url(img/vidicons.png) no-repeat -48px -72px; width:24px; height:20px; display: inline-block;}
-.vidff { background: url(img/vidicons.png) no-repeat 0px -96px; width:24px; height:20px; display: inline-block;}
-.vidff:hover { background: url(img/vidicons.png) no-repeat -24px -96px; width:24px; height:20px; display: inline-block;}
-.vidffI { background: url(img/vidicons.png) no-repeat -48px -96px; width:24px; height:20px; display: inline-block;}
-.vidplay { background: url(img/vidicons.png) no-repeat 0px -120px; width:24px; height:20px; display: inline-block;}
-.vidplay:hover { background: url(img/vidicons.png) no-repeat -24px -120px; width:24px; height:20px; display: inline-block;}
-.vidplayI { background: url(img/vidicons.png) no-repeat -48px -120px; width:24px; height:20px; display: inline-block;}
-.vidtracksA { background: url(img/vidicons.png) no-repeat 0px -144px; width:24px; height:20px; margin-right: 5px; display: inline-block;}
-.vidtracksA:hover { background: url(img/vidicons.png) no-repeat -24px -144px; width:24px; height:20px; margin-right: 5px; display: inline-block;}
-.vidtracks { background: url(img/vidicons.png) no-repeat 0px -168px; width:24px; height:20px; margin-right: 5px; display: inline-block;}
-.vidtracks:hover { background: url(img/vidicons.png) no-repeat -24px -168px; width:24px; height:20px; margin-right: 5px; display: inline-block;}
-.vidtracksI { background: url(img/vidicons.png) no-repeat -48px -144px; width:24px; height:20px; margin-right: 5px; display: inline-block;}
-
-.playlistbar { background-color: #ccc; padding: 3px;}
-.playlistbar > * {vertical-align: top;}
-.playlistwrap { border: 1px solid #ccc; padding: 10px; position:relative;}
-.playlistbar, .playlistwrap {margin-left: 0px;}
-
-.clearfix:before,
-.clearfix:after {
- content: " ";
- display: table;
-}
-.clearfix:after {
- clear: both;
-}
-.clearfix {
- *zoom: 1;
-}
-
-.greystrike {
- text-decoration: line-through;
- opacity: .6;
-}
-.greystrike.a {
-
-}
-.altContentOff {
- display:none;
-}
-.ccvid {
- position: relative;
-}
-.ccvid:after {
- display: block;
- content:"";
- width: 20px;
- height: 20px;
- position: absolute;
- top: 0;
- left: 0;
- background: transparent url("img/cc.png") no-repeat right bottom;
-}
-
-.circoverlay {
- width: 9px;
- position: absolute;
- left: 0;
- bottom: 0;
-}
-
-/*dropdown CSS from bootstrap */
-.dropup,
-.dropdown {
- position: relative;
-}
-.dropdown.floatright {
- padding-left: 15px;
-}
-.dropdown-toggle {
- cursor: pointer;
-}
-.dropdown-toggle:focus {
- /*outline: 0;*/
-}
-a.dropdown-toggle:hover {
- text-decoration: none;
-}
-a.dropdown-toggle.arrow-down:hover {
- color: #00f;
-}
-
-.dropdown-menu {
- position: absolute;
- top: 100%;
- left: 0;
- z-index: 1000;
- display: none;
- float: left;
- min-width: 160px;
- padding: 5px 0;
- margin: 2px 0 0;
- font-size: 14px;
- text-align: left;
- list-style: none;
- background-color: #fff;
- -webkit-background-clip: padding-box;
- background-clip: padding-box;
- border: 1px solid #ccc;
- border: 1px solid rgba(0, 0, 0, .15);
- border-radius: 4px;
- -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
- box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
-}
-.dropdown-menu.pull-right {
- right: 0;
- left: auto;
-}
-.dropdown-menu .divider {
- height: 1px;
- margin: 9px 0;
- overflow: hidden;
- background-color: #e5e5e5;
-}
-.dropdown-menu > li > a, .dropdown-menu > li > span {
- display: block;
- padding: 3px 20px;
- clear: both;
- font-weight: normal;
- line-height: 1.42857143;
- color: #000;
- white-space: nowrap;
-}
-.dropdown-menu > li > a:hover,
-.dropdown-menu > li > a:focus {
- color: #000;
- text-decoration: none;
- background-color: #f5f5f5;
-}
-.dropdown-menu > .active > a,
-.dropdown-menu > .active > a:hover,
-.dropdown-menu > .active > a:focus {
- text-decoration: none;
- background-color: #ddddff;
-}
-.dropdown-menu > .disabled > a,
-.dropdown-menu > .disabled > a:hover,
-.dropdown-menu > .disabled > a:focus {
- color: #777;
-}
-.dropdown-menu > .disabled > a:hover,
-.dropdown-menu > .disabled > a:focus {
- text-decoration: none;
- cursor: not-allowed;
- background-color: transparent;
- background-image: none;
- filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
-}
-.open > .dropdown-menu {
- display: block;
-}
-.open > a {
- outline: 0;
-}
-.dropdown-menu-right {
- right: 0;
- left: auto;
-}
-.dropdown-menu-left {
- right: auto;
- left: 0;
-}
-.dropdown-header {
- display: block;
- padding: 3px 20px;
- font-size: 12px;
- line-height: 1.42857143;
- background-color: #036;
- color: #fff;
- white-space: nowrap;
-}
-.dropdown-backdrop {
- position: fixed;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- z-index: 990;
-}
-.pull-right > .dropdown-menu {
- right: 0;
- left: auto;
-}
-.dropup .caret,
-.navbar-fixed-bottom .dropdown .caret {
- content: "";
- border-top: 0;
- border-bottom: 4px dashed;
- border-bottom: 4px solid \9;
-}
-.dropup .dropdown-menu,
-.navbar-fixed-bottom .dropdown .dropdown-menu {
- top: auto;
- bottom: 100%;
- margin-bottom: 2px;
-}
-@media (min-width: 768px) {
- .navbar-right .dropdown-menu {
- right: 0;
- left: auto;
- }
- .navbar-right .dropdown-menu-left {
- right: auto;
- left: 0;
- }
-}
-
-.arrow-down::after {
- content: "\25bc";
- padding-left: 0.2em;
- font-size:70%;
- position:relative;
- top:-.2em;
- text-decoration: none;
-}
-
-.katex {
- font-size: 1.1em !important;
-}
-
-.fw1000 div#headercontent, .fw1000 div#navlistcont,.fw1000 .footerwrapper, .fw1000 .midwrapper {
- max-width: 1000px;
- margin: auto;
-}
-
-.fw1920 div#headercontent, .fw1920 div#navlistcont,.fw1920 .footerwrapper, .fw1920 .midwrapper {
- max-width: 1920px;
- margin: auto;
-}
+html {
+
+}
+body {
+
+ margin: 10px;
+ padding: 0px;
+}
+div {
+ margin: 0px;
+ padding: 0px;
+}
+p {
+ margin: 0;
+ padding: .5em 0;
+}
+br {
+ line-height: 1em;
+}
+h1,h2,h3,h4,h5,h6 {
+ padding: 0;
+ font-weight: bold;
+}
+h1 {
+ font-size: 1.5em;
+ margin: .7em 0;
+}
+h2,h3,h4,h5,h6 {
+ margin: 1em 0;
+}
+h2 {
+ font-size: 1.25em;
+}
+h3 {
+ font-size: 1.1em;
+}
+h4 {
+ font-size: 1.05em;
+}
+h5,h6 {
+ font-size: 1em;
+}
+
+div.pagetitle h2, div.pagetitle h1 {
+ margin: 10px 0px 20px 0px;
+}
+div.item {
+ margin-bottom: 10px;
+ padding: 5px;
+ border-radius: 5px;
+ border-bottom: 1px solid #ccc;
+}
+div.signup {
+ border: 1px solid #000;
+ margin-bottom: 10px;
+ margin-top: 10px;
+ padding: 5px;
+}
+div#headerhome, div#homelinkbox {
+ padding-top: 8px;
+}
+div.itemsum {
+ margin-left: 45px;
+ overflow: auto;
+ padding: 5px 0px;
+ /*margin-top: -.5em;
+ margin-bottom: -.5em;*/
+}
+span.iteminfo {
+ margin-left: 30px;
+}
+.info {
+ color: #4bb6e8;
+}
+.noticetext, a.noticetext, a.noticetext:link, a.noticetext:visited {
+ color: #db0000;
+}
+label.error {
+ color: #db0000;
+ font-style: italic;
+ display: block;
+}
+input.form + label.error {
+ float: left;
+ display: inline;
+ margin-left: 10px;
+}
+
+input[type=checkbox] + label.error {
+ float:none;
+ display: inline;
+ margin-left: 10px;
+}
+div.title {
+ /*display: inline;*/
+ margin-left: 30px;
+}
+div.itemhdr {
+ position: relative;
+ min-height: 26px;
+}
+.itemhdricon {
+ position: absolute;
+}
+.itemhdricon div {
+ padding-left: 5px;
+ padding-right: 5px;
+ margin-right: 5px;
+}
+div.itemhdr div.title {
+ margin-right: 30px;
+}
+div.itemhdrdd, div.itemhdrright {
+ position: absolute;
+ right: 0px;
+ top:0px;
+}
+
+@media only screen and (min-width: 1005px) {
+ /* put dropdown next to item when wide*/
+ .notfw .itemhdr .title {
+ display: inline-block;
+ }
+ .notfw div.itemhdrdd {
+ display: inline-block;
+ position: relative;
+ vertical-align: top;
+ }
+}
+
+div.block, div.blockitems div.blockitems div.block {
+ padding: 5px;
+ margin-bottom: 10px;
+ border-radius: 4px 4px 0 0;
+}
+div.blockitems, div.blockitems div.blockitems div.blockitems {
+ padding: 10px;
+ margin-top: -10px;
+ margin-bottom: 10px;
+}
+div.block.grouptoggle {
+ margin-bottom: 0px;
+ margin-top: 10px
+}
+div.block.grouptoggle + div.blockitems {
+ margin-top: 0px
+}
+div.hidden {
+ display:none;
+}
+.showinmobile {
+ display:none;
+}
+div.icon {
+ float: left;
+ padding-left: 5px;
+ padding-right: 5px;
+ margin-right: 5px;
+}
+span.icon {
+ padding-left: 5px;
+ padding-right: 5px;
+ margin-right: 5px;
+}
+div.breadcrumb {
+ border: 1px solid #000;
+ margin-bottom: 10px;
+ padding: 5px;
+ background-color: #ddddff;
+}
+div.cp {
+ min-height: 1%;
+ padding: 5px;
+ margin-top: 20px;
+ border-radius: 4px;
+}
+div.cpmid {
+ min-height: 1%;
+ padding: 5px;
+ margin-top: 10px;
+ margin-bottom: 10px;
+ border-radius: 4px;
+}
+.pointer {
+ cursor:pointer;
+}
+ul.nomark {
+ margin-top: 5px;
+ list-style-type: none;
+ margin-left: 15px;
+ padding-left: 0px;
+}
+ul.nomark li {
+ margin-left: 0px;
+ padding-left: 0px;
+}
+
+ul.qview {
+ list-style-type: none;
+ margin-left: 12px;
+ padding-left: 0px;
+ margin-bottom: 6px;
+}
+ul.qview ul {
+ padding-left: 10px;
+ border-left: 1px dashed #ccc;
+}
+ul.qview li {
+ margin-left: 0px;
+ padding-left: 0px;
+ margin-top: 2px;
+}
+div#tbl-container {
+ position: relative;
+ margin-top: 10px;
+ margin-bottom: 10px;
+ width:99.5%;
+ height:auto;
+
+}
+table.gb {
+ border-collapse: collapse;
+ margin: 0px;
+ position:relative;
+}
+
+table.gb thead th {
+ position: relative;
+ text-align: center;
+ z-index: 20;
+ background-color: #fff;
+}
+td, th {
+ margin: 0px;
+ padding: 2px 5px 2px 5px;
+}
+tr {
+ margin: 0px;
+ padding: 0px;
+}
+
+td.c, input.c {
+ text-align: center;
+}
+td.r {
+ text-align: right;
+}
+span.form {
+ display: block;
+ width: 200px;
+ float: left;
+ margin-bottom: 10px;
+ text-align: right;
+ padding-right: 20px;
+}
+span.formright {
+ display: block;
+ width: 500px;
+ float: left;
+ margin-bottom: 10px;
+ text-align: left;
+}
+
+span.wideformright {
+ display: block;
+ float: left;
+ margin-bottom: 10px;
+ text-align: left;
+}
+input.form {
+ display: block;
+ width: 200px;
+ float: left;
+ margin-bottom: 10px;
+}
+
+div.submit {
+ margin-top: 10px;
+ width: 400px;
+ text-align: right;
+}
+span#leftcontenttoggle {
+ display:none;
+ vertical-align:middle;
+ padding: 0px 5px;
+}
+span#leftcontenttoggle:hover {
+ background-color: #eee;
+}
+span#leftcontenttoggle.leftcontentactive {
+ background-color: #eee;
+}
+
+@media only screen and (max-width: 760px) {
+ span.form {
+ width: auto;
+ float: none;
+ text-align: left;
+ margin-bottom: 5px;
+ padding-right: 0px;
+ }
+ span.formright, span.wideformright {
+ width: auto;
+ float: none;
+ }
+ div.submit {
+ width: auto;
+ }
+ span.formright input[type="text"], span.formright input[type="password"] {
+ max-width: 100%;
+ }
+}
+
+div.editor {
+ margin-bottom: 10px;
+}
+.fbbox {
+ background-color: #fff;
+ border: 1px solid #ccc;
+ margin: 5px;
+ padding: 0px 5px;
+}
+
+span.column {
+ display: block;
+ width: 200px;
+ float: left;
+ padding-right: 20px;
+}
+
+span.left {
+ float: left;
+}
+
+
+
+br.form {
+ clear: left;
+}
+img {
+ border: 0;
+}
+img.mida {
+ vertical-align: middle;
+}
+p img {
+ max-width: 95%;
+ height: auto;
+}
+div.right {
+ text-align: right;
+}
+span.right {
+ float:right;
+}
+.floatright {
+ float:right;
+}
+.floatleft {
+ float:left;
+}
+span.padright {
+ float:right;
+ padding-right: 120px;
+}
+.clear {
+ clear: both;
+}
+br.clear {
+ line-height: 0px;
+ height: 0px;
+}
+span.hdr1 {
+ font-size: 120%;
+ font-weight: bold;
+}
+.small {
+ font-size: 70%;
+}
+#leftcontent {
+ position: absolute;
+ left: 0px;
+ width:170px;
+ padding:5px;
+ margin-top:10px;
+ border-radius: 5px;
+}
+.leftnavp a {
+ display: inline-block;
+ margin-left: 6px;
+ text-indent: -6px;
+ padding-top: 5px;
+}
+.leftnavp a:first-of-type {
+ padding-top: 2px;
+}
+#centercontent {
+ margin-left:180px;
+ padding-left:10px;
+ margin-top:10px;
+}
+
+.midwrapper {
+ position: relative;
+}
+
+.red {
+ color: red;
+}
+
+table.cal {
+ border-collapse: collapse;
+ width: 100%;
+}
+table.cal thead th {
+ text-align: center;
+ background-color: #ddf;
+ border: 1px solid #000;
+}
+table.cal td {
+ border: 1px solid #000;
+ width: 14%;
+ height: 2.5em;
+ vertical-align: top;
+}
+.day {
+ font-size: 80%;
+ background-color: #ddf;
+}
+.today {
+ background-color: #fdd;
+}
+.caldatebar {
+ background-color: #ddf;
+}
+div.center {
+ text-align: center;
+}
+span.calitem {
+ padding: 0 4px;
+ background-color: #0ff;
+ margin: 1px;
+}
+table.cal span.calitem {
+ display: inline-block;
+}
+/*
+div.td {
+ width: 100%;
+ height: 100%;
+ overflow: hidden;
+}
+*/
+img.faded {
+ filter: alpha(opacity: 30);
+ KHTMLOpacity: .3;
+ MozOpacity: .3;
+ opacity: .3;
+}
+.grey {
+ color: #999;
+}
+.itemgrey {
+ opacity: .5;
+}
+div.ddmenu {
+ position: absolute;
+ right: 10px;
+ visibility: hidden;
+ margin: 0px;
+ z-index: 100;
+ padding: 5px;
+ background: #eeffee;
+}
+
+.nowrap {
+ white-space: nowrap;
+}
+.dpTable {
+ font-size: 90%;
+ text-align: center;
+ color: #505050;
+ background-color: #ece9d8;
+ border: 1px solid #AAAAAA;
+ }
+.dpTD {
+ border: 1px solid #ece9d8;
+ }
+.dpDayHighlightTD {
+ background-color: #CCCCCC;
+ border: 1px solid #AAAAAA;
+ }
+.dpTDHover {
+ background-color: #aca998;
+ border: 1px solid #888888;
+ cursor: pointer;
+ color: red;
+ }
+.dpDayTD {
+ background-color: #CCCCCC;
+ border: 1px solid #AAAAAA;
+ color: white;
+ }
+.dpTitleText {
+ font-weight: bold;
+ }
+.dpDayHighlight {
+ color: #4060ff;
+ font-weight: bold;
+ }
+.dpButton, .dpTodayButton {
+ font-size: 90%;
+ color: gray;
+ background: #d8e8ff;
+ font-weight: bold;
+ padding: 0px;
+ }
+
+/*div.inactivewrapper, div.activewrapper {
+ margin: 0px;
+ padding: 0px;
+}*/
+div.blockwrapper {
+ margin: 0; padding:0;
+}
+
+div.tips {
+ border: 1px solid #91d5d5;
+ border-radius: 8px;
+ background-color: #cff;
+ position: absolute;
+ padding: 3px 6px;
+ z-index: 100;
+}
+/*
+ need to resolve tips below first
+div.tips:after, div.tips:before {
+ top: 100%;
+ left: 15px;
+ border: solid transparent;
+ content: " ";
+ height: 0;
+ width: 0;
+ position: absolute;
+ pointer-events: none;
+}
+div.tips.tipsright:after, div.tips.tipsright:before {
+ left: auto;
+ right: 15px;
+}
+
+div.tips:after {
+ border-color: rgba(204, 255, 255, 0);
+ border-top-color: #cff;
+ border-width: 6px;
+ margin-left: -6px;
+}
+div.tips:before {
+ border-color: rgba(145, 213, 213, 0);
+ border-top-color: #91d5d5;
+ border-width: 7px;
+ margin-left: -7px;
+}
+*/
+#headerlogo {
+ position: absolute;
+ right:0px;
+ top: 7px;
+ cursor: pointer;
+}
+a:hover:focus {
+ outline: none;
+}
+a:link:focus {
+ text-decoration: underline;
+}
+ul.tablist {
+ padding: 0;
+ margin: 0;
+ margin-bottom: -1px;
+}
+ul.tablist li {
+ display: inline-block;
+ border: 1px solid #ccc;
+ background-color: #eee;
+ margin-right: 2px;
+}
+ul.tablist li a {
+ display: inline-block;
+ padding: 0.2em 1em;
+ text-decoration: none;
+ color: #000;
+}
+
+ul.tablist li.active {
+ border-bottom: 1px solid #fff;
+ background-color: #fff;
+}
+div.tabpanel {
+ border: 1px solid #ccc;
+ background-color: #fff;
+ margin:0px;
+ padding:5px 10px;
+}
+
+ul#navlist
+{
+clear: both;
+padding: 0px;
+margin: 0px;
+list-style-type: none;
+float: left;
+width: 100%;
+color: #fff;
+background-color: #036;
+}
+
+ul#navlist li {
+display: inline;
+}
+
+ul#navlist li a
+{
+float: left;
+/*width: 5em;*/
+color: #fff;
+background-color: #036;
+padding: 0.2em 1em;
+text-decoration: none;
+border-right: 1px solid #fff;
+}
+
+ul#navlist li a:hover, ul#navlist li a:focus
+{
+background-color: #369;
+color: #fff;
+}
+
+div.additembox {
+ margin-bottom: 2px;
+}
+div.additembox span {
+ font-size: 85%;
+ background-color: #ccc;
+ padding: 0 10px;
+}
+
+.newnote {
+ color: #f00;
+}
+div#leftcolumn {float: left; width: 25%; min-width: 200px;}
+div#rightcolumn {float: right; width: 74%; min-width: 250px;}
+
+@media (max-width:805px) {
+ div#leftcolumn, div#rightcolumn {
+ float: none;
+ width: auto;
+ }
+}
+
+ul.courselist {
+ margin: 0px;
+ padding-left: 0px;
+}
+ul.courselist li {
+ list-style-type: none;
+}
+ul.courselist ul {
+ margin-left: 2px;
+ padding-left: 5px;
+}
+li.coursegroup ul {
+ border-left: 1px dashed #ccc;
+}
+ul.courselist > li {
+ border-bottom: 1px solid #999;
+ padding: 3px 0px 2px;
+}
+ul.courselist > li:last-child {
+ border: 0;
+}
+div > ul.courselist {
+ margin-bottom: 15px;
+}
+ul.courselist > li > a {
+ display:inline-block;
+ margin-right:20px;
+ padding-left: 5px;
+ text-indent: -5px;
+}
+ul.courselist li {
+ position: relative;
+}
+div.coursedd {
+ position: absolute;
+ right: 0px;
+ top: 2px;
+}
+
+div.block h3,div.block h2 {
+ margin: 2px;
+}
+div#viewbuttoncont {
+ float: right;
+ background: #fff;
+}
+div#viewbuttoncont a {
+ color: #fff;
+ display: inline-block;
+ padding: 3px 5px;
+ margin-left: 2px;
+}
+div#viewbuttoncont a:hover, div#viewbuttoncont a:focus {
+ text-decoration: none;
+}
+div#viewbuttoncont a.buttonactive {
+ background-color: #369;
+ cursor: default;
+ border-radius: 4px;
+}
+div#viewbuttoncont a.buttoninactive {
+ background-color: #297bbb;
+ border-radius: 4px;
+}
+div#viewbuttoncont a.buttoninactive:hover {
+ background-color: #036;
+}
+a.abutton {
+ padding: 3px 8px;
+ display: inline-block;
+}
+a.abutton, a.abutton:hover, a.abutton:focus {
+ text-decoration: none;
+}
+input[type=submit],input[type=button], button, a.abutton {
+ color: #000;
+ background-color: #eee;
+ border-radius: 4px;
+ border: 1px solid #ccc;
+ font: inherit;
+ height:1.5em;
+ line-height: 1.5em;
+ padding: 0 8px;
+ margin: 2px 3px;
+}
+input[type=submit].secondarybtn,input[type=button].secondarybtn, button.secondarybtn {
+ background-color: #f9f9f9;
+}
+input[type=submit]:hover, button:hover,input[type=button]:hover, a.abutton:hover {
+ background-color: #e3e3ff;
+}
+input[type=submit]:focus, button:focus,input[type=button]:focus, a.abutton:focus {
+ background-color: #e3e3ff;
+}
+input[type=submit]:disabled,input[type=button]:disabled {
+ color: #666;
+}
+input[type=submit]:disabled:hover,input[type=button]:disabled:hover {
+ background-color: #eee;
+}
+#GB_overlay {
+ position: fixed;
+ margin: auto;
+ top: 0;
+ left: 0;
+ z-index: 100;
+ width: 100%;
+ height: 100%;
+ opacity: 0.65;
+ -moz-opacity: 0.65; /* older Gecko-based browsers */
+ filter:alpha(opacity=65); /* For IE6&7 */
+ background-color: #000;
+}
+#GB_frameoverlay {
+ position: absolute;
+ left: 0;
+ top: 0;
+ width: 100%;
+ height: 100%;
+ z-index: 1000;
+ opacity: 0.01;
+ -moz-opacity: 0.01;
+ filter:alpha(opacity=1); /* For IE6&7 */
+ background-color: #fff;
+}
+#GB_resizehandle {
+ position: absolute;
+ right: 0;
+ bottom: 0;
+ width: 20px;
+ height: 20px;
+ overflow: hidden;
+ cursor: nwse-resize;
+ z-index: 1001;
+}
+
+#GB_resizehandle::after {
+ content: '';
+ position: absolute;
+ display: block;
+ width: 50px;
+ height: 0;
+ box-shadow: 0 10px 0 1px black, 0 17px 0 1px black, 0 24px 0 1px black;
+ transform: translate(-50%, -50%) rotate(-45deg) scale(0.5);
+ top: 50%;
+ left: 50%;
+}
+#GB_window {
+ top: 10px;
+ left: 0px;
+ right: 0px;
+ margin: 0 auto;
+ position: fixed;
+ background: #fff;
+ border: 3px solid #369;
+ overflow: hidden;/*auto;*/
+ width: 400px;
+ height: 400px;
+ z-index: 150;
+}
+
+#GB_frameholder {
+ position: relative;
+ overflow: auto;
+ width: 100%;
+ height: 500px;
+ -webkit-overflow-scrolling: touch;
+}
+#GB_frame {
+ border: 0;
+ width: 100%;
+ height: 100%;
+ position: absolute;
+}
+
+#GB_caption {
+ color: #fff;
+ background: #369;
+ padding: 2px 0 2px 5px;
+ margin: 0;
+ text-align: left;
+ cursor: pointer;
+}
+#GB_caption a, #GB_caption a:hover, #GB_caption a:focus {
+ color: #fff;
+ text-decoration: none;
+}
+
+ol li ol {
+ list-style-type: lower-alpha;
+}
+
+svg {
+ overflow: hidden;
+}
+
+table.gridded {
+ border-collapse: collapse;
+ margin: 0px;
+}
+table.gridded.centered {
+ margin: 0px auto;
+}
+
+table.gridded thead th, table.gridded thead td {
+ text-align: center;
+ z-index: 20;
+ background-color: #eef;
+ border: 1px solid #333;
+ font-weight: bold;
+ border-bottom: 2px solid #333;
+}
+table.gridded td {
+ border: 1px solid #333;
+}
+table.gridded tbody th {
+ z-index: 20;
+ background-color: #eef;
+ border: 1px solid #333;
+ font-weight: bold;
+ border-right: 2px solid #333;
+}
+span.boxed {
+ border: 1px solid #000;
+ padding: 2px 5px;
+}
+a.attach {
+ background: url(tinymce4/plugins/attach/ed_attach.gif) center left no-repeat;
+ padding-left: 20px;
+}
+a[target=_blank]::after {
+ content: "";
+ width:16px;
+ height:1em;
+ display: inline-block;
+ background: url(img/extlink.png) center right no-repeat;
+}
+.mce-content-body a[target=_blank]:after {
+ display: none;
+}
+.mce-content-body span.AMedit {border: 1px solid #ff0000;}
+div.forumgrp img {
+ max-width: 90%;
+ height: auto;
+}
+div.multisel {
+ display: inline-block;
+}
+div.multiselitem {
+ background-color: #eee;
+ margin-bottom: 2px;
+}
+.videoembedbtn {
+ color: #999;
+ cursor: pointer;
+}
+.ind1 {
+ margin-left: .75em;
+}
+.ind2 {
+ margin-left: 1.5em;
+}
+.ind3 {
+ margin-left: 2.25em;
+}
+.ind4 {
+ margin-left: 3em;
+}
+.delx {
+ position: absolute;
+ right: 0px;
+ width: 16px;
+ text-align: center;
+ top: 0px;
+ cursor: pointer;
+}
+.delx a:hover, .delx a, .delx a:focus {
+ font-family: sans-serif;
+ color: #6d6d6d;
+ text-decoration: none;
+}
+
+pre {
+ font-size: medium;
+}
+
+.noselect {
+ -webkit-touch-callout: none; /* iOS Safari */
+ -webkit-user-select: none; /* Chrome/Safari/Opera */
+ -khtml-user-select: none; /* Konqueror */
+ -moz-user-select: none; /* Firefox */
+ -ms-user-select: none; /* Internet Explorer/Edge */
+ user-select: none; /* Non-prefixed version, currently
+ not supported by any browser */
+}
+
+.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}
+.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}
+.video-wrapper-wrapper{width:100%;padding:0;}
+
+.vidmute { background: url(img/vidicons.png) no-repeat 0px 0px; width:24px; height:20px; display: inline-block;}
+.vidmute:hover { background: url(img/vidicons.png) no-repeat -24px 0px; width:24px; height:20px; display: inline-block;}
+.vidmuteI { background: url(img/vidicons.png) no-repeat -48px 0px; width:24px; height:20px; display: inline-block;}
+.vidvol { background: url(img/vidicons.png) no-repeat 0px -24px; width:24px; height:20px; display: inline-block;}
+.vidvol:hover { background: url(img/vidicons.png) no-repeat -24px -24px; width:24px; height:20px; display: inline-block;}
+.vidvolI { background: url(img/vidicons.png) no-repeat -48px -24px; width:24px; height:20px; display: inline-block;}
+.vidpause { background: url(img/vidicons.png) no-repeat 0px -48px; width:24px; height:20px; display: inline-block;}
+.vidpause:hover { background: url(img/vidicons.png) no-repeat -24px -48px; width:24px; height:20px; display: inline-block;}
+.vidpauseI { background: url(img/vidicons.png) no-repeat -48px -48px; width:24px; height:20px; display: inline-block;}
+.vidrew { background: url(img/vidicons.png) no-repeat 0px -72px; width:24px; height:20px; display: inline-block;}
+.vidrew:hover { background: url(img/vidicons.png) no-repeat -24px -72px; width:24px; height:20px; display: inline-block;}
+.vidrewI { background: url(img/vidicons.png) no-repeat -48px -72px; width:24px; height:20px; display: inline-block;}
+.vidff { background: url(img/vidicons.png) no-repeat 0px -96px; width:24px; height:20px; display: inline-block;}
+.vidff:hover { background: url(img/vidicons.png) no-repeat -24px -96px; width:24px; height:20px; display: inline-block;}
+.vidffI { background: url(img/vidicons.png) no-repeat -48px -96px; width:24px; height:20px; display: inline-block;}
+.vidplay { background: url(img/vidicons.png) no-repeat 0px -120px; width:24px; height:20px; display: inline-block;}
+.vidplay:hover { background: url(img/vidicons.png) no-repeat -24px -120px; width:24px; height:20px; display: inline-block;}
+.vidplayI { background: url(img/vidicons.png) no-repeat -48px -120px; width:24px; height:20px; display: inline-block;}
+.vidtracksA { background: url(img/vidicons.png) no-repeat 0px -144px; width:24px; height:20px; margin-right: 5px; display: inline-block;}
+.vidtracksA:hover { background: url(img/vidicons.png) no-repeat -24px -144px; width:24px; height:20px; margin-right: 5px; display: inline-block;}
+.vidtracks { background: url(img/vidicons.png) no-repeat 0px -168px; width:24px; height:20px; margin-right: 5px; display: inline-block;}
+.vidtracks:hover { background: url(img/vidicons.png) no-repeat -24px -168px; width:24px; height:20px; margin-right: 5px; display: inline-block;}
+.vidtracksI { background: url(img/vidicons.png) no-repeat -48px -144px; width:24px; height:20px; margin-right: 5px; display: inline-block;}
+
+.playlistbar { background-color: #ccc; padding: 3px;}
+.playlistbar > * {vertical-align: top;}
+.playlistwrap { border: 1px solid #ccc; padding: 10px; position:relative;}
+.playlistbar, .playlistwrap {margin-left: 0px;}
+
+.clearfix:before,
+.clearfix:after {
+ content: " ";
+ display: table;
+}
+.clearfix:after {
+ clear: both;
+}
+.clearfix {
+ *zoom: 1;
+}
+
+.greystrike {
+ text-decoration: line-through;
+ opacity: .6;
+}
+.greystrike.a {
+
+}
+.altContentOff {
+ display:none;
+}
+.ccvid {
+ position: relative;
+}
+.ccvid:after {
+ display: block;
+ content:"";
+ width: 20px;
+ height: 20px;
+ position: absolute;
+ top: 0;
+ left: 0;
+ background: transparent url("img/cc.png") no-repeat right bottom;
+}
+
+.circoverlay {
+ width: 9px;
+ position: absolute;
+ left: 0;
+ bottom: 0;
+}
+
+/*dropdown CSS from bootstrap */
+.dropup,
+.dropdown {
+ position: relative;
+}
+.dropdown.floatright {
+ padding-left: 15px;
+}
+.dropdown-toggle {
+ cursor: pointer;
+}
+.dropdown-toggle:focus {
+ /*outline: 0;*/
+}
+a.dropdown-toggle:hover {
+ text-decoration: none;
+}
+a.dropdown-toggle.arrow-down:hover {
+ color: #00f;
+}
+
+.dropdown-menu {
+ position: absolute;
+ top: 100%;
+ left: 0;
+ z-index: 1000;
+ display: none;
+ float: left;
+ min-width: 160px;
+ padding: 5px 0;
+ margin: 2px 0 0;
+ font-size: 14px;
+ text-align: left;
+ list-style: none;
+ background-color: #fff;
+ -webkit-background-clip: padding-box;
+ background-clip: padding-box;
+ border: 1px solid #ccc;
+ border: 1px solid rgba(0, 0, 0, .15);
+ border-radius: 4px;
+ -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
+ box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
+}
+.dropdown-menu.pull-right {
+ right: 0;
+ left: auto;
+}
+.dropdown-menu .divider {
+ height: 1px;
+ margin: 9px 0;
+ overflow: hidden;
+ background-color: #e5e5e5;
+}
+.dropdown-menu > li > a, .dropdown-menu > li > span {
+ display: block;
+ padding: 3px 20px;
+ clear: both;
+ font-weight: normal;
+ line-height: 1.42857143;
+ color: #000;
+ white-space: nowrap;
+}
+.dropdown-menu > li > a:hover,
+.dropdown-menu > li > a:focus {
+ color: #000;
+ text-decoration: none;
+ background-color: #f5f5f5;
+}
+.dropdown-menu > .active > a,
+.dropdown-menu > .active > a:hover,
+.dropdown-menu > .active > a:focus {
+ text-decoration: none;
+ background-color: #ddddff;
+}
+.dropdown-menu > .disabled > a,
+.dropdown-menu > .disabled > a:hover,
+.dropdown-menu > .disabled > a:focus {
+ color: #777;
+}
+.dropdown-menu > .disabled > a:hover,
+.dropdown-menu > .disabled > a:focus {
+ text-decoration: none;
+ cursor: not-allowed;
+ background-color: transparent;
+ background-image: none;
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+}
+.open > .dropdown-menu {
+ display: block;
+}
+.open > a {
+ outline: 0;
+}
+.dropdown-menu-right {
+ right: 0;
+ left: auto;
+}
+.dropdown-menu-left {
+ right: auto;
+ left: 0;
+}
+.dropdown-header {
+ display: block;
+ padding: 3px 20px;
+ font-size: 12px;
+ line-height: 1.42857143;
+ background-color: #036;
+ color: #fff;
+ white-space: nowrap;
+}
+.dropdown-backdrop {
+ position: fixed;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ z-index: 990;
+}
+.pull-right > .dropdown-menu {
+ right: 0;
+ left: auto;
+}
+.dropup .caret,
+.navbar-fixed-bottom .dropdown .caret {
+ content: "";
+ border-top: 0;
+ border-bottom: 4px dashed;
+ border-bottom: 4px solid \9;
+}
+.dropup .dropdown-menu,
+.navbar-fixed-bottom .dropdown .dropdown-menu {
+ top: auto;
+ bottom: 100%;
+ margin-bottom: 2px;
+}
+@media (min-width: 768px) {
+ .navbar-right .dropdown-menu {
+ right: 0;
+ left: auto;
+ }
+ .navbar-right .dropdown-menu-left {
+ right: auto;
+ left: 0;
+ }
+}
+
+.arrow-down::after {
+ content: "\25bc";
+ padding-left: 0.2em;
+ font-size:70%;
+ position:relative;
+ top:-.2em;
+ text-decoration: none;
+}
+
+.katex {
+ font-size: 1.1em !important;
+}
+
+.fw1000 div#headercontent, .fw1000 div#navlistcont,.fw1000 .footerwrapper, .fw1000 .midwrapper {
+ max-width: 1000px;
+ margin: auto;
+}
+
+.fw1920 div#headercontent, .fw1920 div#navlistcont,.fw1920 .footerwrapper, .fw1920 .midwrapper {
+ max-width: 1920px;
+ margin: auto;
+}
+
+#nestable {
+ display: block;
+ width: 100%;
+ max-width: 3000px;
+}
+
+#nestable .topRow {
+ height: 45px;
+}
+
+#nestable .topRow>div.td:nth-child(1) {
+ width: 10px;
+ height: 1px;
+}
+
+#nestable .topRow>div.td:nth-child(2) {
+ width: 65px;
+}
+
+#nestable .topRow>div.td:nth-child(3) {
+ min-width: 30%;
+}
+
+#nestable .topRow>div.td:nth-child(5) {
+ min-width: 15px;
+}
+
+#nestable .topRow>div.td:nth-child(6) {
+ min-width: 75px;
+}
+
+#nestable .topRow>div.td:nth-child(7) {
+ min-width: 80px;
+}
+
+#nestable .topRow>div.td:nth-child(8) {
+ min-width: 30%;
+}
+
+.dd-list .tr {
+ display: block;
+}
+
+.floatRight {
+ float: right;
+}
+
+.dd-list .qID {
+ min-width: 30px;
+}
+
+.dd-list .qInnerText {
+ margin-top: -5px;
+ z-index: 1;
+ min-width: 100px;
+
+}
+.dd-list .collapsed{
+ max-width: 400px;
+}
+
+.dd-list .qType {
+ min-width: 65px;
+}
+
+.dd-list .floatRight>div {
+ margin-left: 2px;
+ margin-right: 2px;
+}
+
+.dd-list .td {
+ display: block;
+ float: left;
+}
+
+#curqtbl {
+ display: block;
+}
+
+.dd3{position:relative;display:block;margin:0;padding:0;max-width:600px;list-style:none;font-size:13px;line-height:20px}.dd-list{display:block;position:relative;margin:0;padding:0;list-style:none}.dd-list .dd-list{padding-left:30px}.dd-empty,.dd-item,.dd-placeholder{display:block;position:relative;margin:0;padding:0;min-height:20px;font-size:13px;line-height:20px}.dd-handle{display:block;height:30px;margin:5px 0;padding:5px 10px;color:#333;text-decoration:none;font-weight:700;border:1px solid #ccc;background:#fafafa;border-radius:3px;box-sizing:border-box}.dd-handle:hover{color:#2ea8e5;background:#fff}.dd-item>button{position:relative;cursor:pointer;float:left;width:25px;height:20px;margin:5px 0;padding:0;text-indent:100%;white-space:nowrap;overflow:hidden;border:0;background:0 0;font-size:12px;line-height:1;text-align:center;font-weight:700}.dd-item>button:before{display:block;position:absolute;width:100%;text-align:center;text-indent:0}.dd-item>button.dd-expand:before{content:'+'}.dd-item>button.dd-collapse:before{content:'-'}.dd-expand{display:none}.dd-collapsed .dd-collapse,.dd-collapsed .dd-list{display:none}.dd-collapsed .dd-expand{display:block}.dd-empty,.dd-placeholder{margin:5px 0;padding:0;min-height:30px;background:#f2fbff;border:1px dashed #b6bcbf;box-sizing:border-box;-moz-box-sizing:border-box}.dd-empty{border:1px dashed #bbb;min-height:100px;background-color:#e5e5e5;background-size:60px 60px;background-position:0 0,30px 30px}.dd-dragel{position:absolute;pointer-events:none;z-index:9999}.dd-dragel>.dd-item .dd-handle{margin-top:0}.dd-dragel .dd-handle{box-shadow:2px 4px 6px 0 rgba(0,0,0,.1)}.dd-nochildren .dd-placeholder{display:none}
+
+/**
+* Nestable Extras
+*/
+.nestable-lists {
+ display: block;
+ clear: both;
+ padding: 30px 0;
+ width: 100%;
+ border: 0;
+ border-top: 2px solid #ddd;
+ border-bottom: 2px solid #ddd;
+}
+
+#nestable-menu {
+ padding: 0;
+ margin: 20px 0;
+}
+
+#nestable-output,
+#nestable2-output {
+ width: 100%;
+ height: 7em;
+ font-size: 0.75em;
+ line-height: 1.333333em;
+ font-family: Consolas, monospace;
+ padding: 5px;
+ box-sizing: border-box;
+ -moz-box-sizing: border-box;
+}
+
+#nestable2 .dd-handle {
+ color: #fff;
+ border: 1px solid #999;
+ background: #bbb;
+ background: -webkit-linear-gradient(top, #bbb 0%, #999 100%);
+ background: -moz-linear-gradient(top, #bbb 0%, #999 100%);
+ background: linear-gradient(top, #bbb 0%, #999 100%);
+}
+
+#nestable2 .dd-handle:hover {
+ background: #bbb;
+}
+
+#nestable2 .dd-item>button:before {
+ color: #fff;
+}
+
+@media only screen and (min-width: 700px) {
+ .dd3 {
+ float: left;
+ width: 48%;
+ }
+
+ .dd3+.dd3 {
+ margin-left: 2%;
+ }
+}
+
+
+.dd-hover>.dd-handle {
+ background: #2ea8e5 !important;
+}
+
+/**
+* Nestable Draggable Handles
+*/
+
+.dd3-content {
+ display: block;
+ min-height: 30px;
+ height: fit-content;
+ margin: 5px 0;
+ padding: 5px 10px 5px 40px;
+ color: #333;
+ text-decoration: none;
+ font-weight: bold;
+ border: 1px solid #ccc;
+ background: #fafafa;
+ background: -webkit-linear-gradient(top, #fafafa 0%, #eee 100%);
+ background: -moz-linear-gradient(top, #fafafa 0%, #eee 100%);
+ background: linear-gradient(top, #fafafa 0%, #eee 100%);
+ -webkit-border-radius: 3px;
+ border-radius: 3px;
+ box-sizing: border-box;
+ -moz-box-sizing: border-box;
+}
+
+.dd3-content:hover {
+ color: #2ea8e5;
+ background: #fff;
+}
+
+.dd-dragel>.dd3-item>.dd3-content {
+ margin: 0;
+}
+
+.dd3-item>button {
+ margin-left: 30px;
+}
+
+.dd3-handle {
+ position: absolute;
+ margin: 0;
+ left: 0;
+ top: 0;
+ cursor: pointer;
+ width: 30px;
+ text-indent: 30px;
+ white-space: nowrap;
+ overflow: hidden;
+ border: 1px solid #aaa;
+ background: #ddd;
+ background: -webkit-linear-gradient(top, #ddd 0%, #bbb 100%);
+ background: -moz-linear-gradient(top, #ddd 0%, #bbb 100%);
+ background: linear-gradient(top, #ddd 0%, #bbb 100%);
+ border-top-right-radius: 0;
+ border-bottom-right-radius: 0;
+}
+
+.dd3-handle:before {
+ content: '≡';
+ display: block;
+ position: absolute;
+ left: 0;
+ top: 3px;
+ width: 100%;
+ text-align: center;
+ text-indent: 0;
+ color: #fff;
+ font-size: 20px;
+ font-weight: normal;
+}
+
+.dd3-handle:hover {
+ background: #ddd;
+}
diff --git a/imathasltiplan.txt b/imathasltiplan.txt
old mode 100644
new mode 100755
diff --git a/img/1day.png b/img/1day.png
old mode 100644
new mode 100755
diff --git a/img/assess.png b/img/assess.png
old mode 100644
new mode 100755
diff --git a/img/assess_tiny.png b/img/assess_tiny.png
old mode 100644
new mode 100755
diff --git a/img/assess_tiny_no.png b/img/assess_tiny_no.png
old mode 100644
new mode 100755
diff --git a/img/blank.gif b/img/blank.gif
old mode 100644
new mode 100755
diff --git a/img/cal.gif b/img/cal.gif
old mode 100644
new mode 100755
diff --git a/img/cc.png b/img/cc.png
old mode 100644
new mode 100755
diff --git a/img/collapse.gif b/img/collapse.gif
old mode 100644
new mode 100755
diff --git a/img/doc.png b/img/doc.png
old mode 100644
new mode 100755
diff --git a/img/doc_tiny.png b/img/doc_tiny.png
old mode 100644
new mode 100755
diff --git a/img/drill.png b/img/drill.png
old mode 100644
new mode 100755
diff --git a/img/drill_tiny.png b/img/drill_tiny.png
old mode 100644
new mode 100755
diff --git a/img/emptycircle.png b/img/emptycircle.png
old mode 100644
new mode 100755
diff --git a/img/expand.gif b/img/expand.gif
old mode 100644
new mode 100755
diff --git a/img/extlink.png b/img/extlink.png
old mode 100644
new mode 100755
diff --git a/img/flagempty.gif b/img/flagempty.gif
old mode 100644
new mode 100755
diff --git a/img/flagfilled.gif b/img/flagfilled.gif
old mode 100644
new mode 100755
diff --git a/img/folder.gif b/img/folder.gif
old mode 100644
new mode 100755
diff --git a/img/folder.png b/img/folder.png
old mode 100644
new mode 100755
diff --git a/img/folder2.gif b/img/folder2.gif
old mode 100644
new mode 100755
diff --git a/img/folder_tiny.png b/img/folder_tiny.png
old mode 100644
new mode 100755
diff --git a/img/folder_tree.png b/img/folder_tree.png
old mode 100644
new mode 100755
diff --git a/img/folder_tree_tiny.png b/img/folder_tree_tiny.png
old mode 100644
new mode 100755
diff --git a/img/forum.png b/img/forum.png
old mode 100644
new mode 100755
diff --git a/img/forum_tiny.png b/img/forum_tiny.png
old mode 100644
new mode 100755
diff --git a/img/fullcircle.png b/img/fullcircle.png
old mode 100644
new mode 100755
diff --git a/img/gchk.gif b/img/gchk.gif
old mode 100644
new mode 100755
diff --git a/img/gears.png b/img/gears.png
old mode 100644
new mode 100755
diff --git a/img/gearsdd.png b/img/gearsdd.png
old mode 100644
new mode 100755
diff --git a/img/graph.gif b/img/graph.gif
old mode 100644
new mode 100755
diff --git a/img/halfcircle.png b/img/halfcircle.png
old mode 100644
new mode 100755
diff --git a/img/help.gif b/img/help.gif
old mode 100644
new mode 100755
diff --git a/img/html.png b/img/html.png
old mode 100644
new mode 100755
diff --git a/img/html_tiny.png b/img/html_tiny.png
old mode 100644
new mode 100755
diff --git a/img/html_tiny_no.png b/img/html_tiny_no.png
old mode 100644
new mode 100755
diff --git a/img/image.png b/img/image.png
old mode 100644
new mode 100755
diff --git a/img/inline.png b/img/inline.png
old mode 100644
new mode 100755
diff --git a/img/inline_tiny.png b/img/inline_tiny.png
old mode 100644
new mode 100755
diff --git a/img/liked.png b/img/liked.png
old mode 100644
new mode 100755
diff --git a/img/likedgray.png b/img/likedgray.png
old mode 100644
new mode 100755
diff --git a/img/lock.png b/img/lock.png
old mode 100644
new mode 100755
diff --git a/img/maple.png b/img/maple.png
old mode 100644
new mode 100755
diff --git a/img/mathml.gif b/img/mathml.gif
old mode 100644
new mode 100755
diff --git a/img/mathnb.png b/img/mathnb.png
old mode 100644
new mode 100755
diff --git a/img/menu.png b/img/menu.png
old mode 100644
new mode 100755
diff --git a/img/mq_cursor_sprites.png b/img/mq_cursor_sprites.png
old mode 100644
new mode 100755
diff --git a/img/mq_cursor_sprites2.png b/img/mq_cursor_sprites2.png
old mode 100644
new mode 100755
diff --git a/img/normalcurve.gif b/img/normalcurve.gif
old mode 100644
new mode 100755
diff --git a/img/noview.png b/img/noview.png
old mode 100644
new mode 100755
diff --git a/img/orgx.gif b/img/orgx.gif
old mode 100644
new mode 100755
diff --git a/img/pdf.png b/img/pdf.png
old mode 100644
new mode 100755
diff --git a/img/pen.cur b/img/pen.cur
old mode 100644
new mode 100755
diff --git a/img/pendown.cur b/img/pendown.cur
old mode 100644
new mode 100755
diff --git a/img/ppt.png b/img/ppt.png
old mode 100644
new mode 100755
diff --git a/img/q_emptybox.gif b/img/q_emptybox.gif
old mode 100644
new mode 100755
diff --git a/img/q_fullbox.gif b/img/q_fullbox.gif
old mode 100644
new mode 100755
diff --git a/img/q_halfbox.gif b/img/q_halfbox.gif
old mode 100644
new mode 100755
diff --git a/img/redx.gif b/img/redx.gif
old mode 100644
new mode 100755
diff --git a/img/ruler.jpg b/img/ruler.jpg
old mode 100644
new mode 100755
diff --git a/img/screens.jpg b/img/screens.jpg
old mode 100644
new mode 100755
diff --git a/img/simplebg.png b/img/simplebg.png
old mode 100644
new mode 100755
diff --git a/img/sound.png b/img/sound.png
old mode 100644
new mode 100755
diff --git a/img/swap.gif b/img/swap.gif
old mode 100644
new mode 100755
diff --git a/img/te_blank.gif b/img/te_blank.gif
old mode 100644
new mode 100755
diff --git a/img/te_blue_arrow.png b/img/te_blue_arrow.png
old mode 100644
new mode 100755
diff --git a/img/te_blue_empty_arrow.png b/img/te_blue_empty_arrow.png
old mode 100644
new mode 100755
diff --git a/img/te_green_check.png b/img/te_green_check.png
old mode 100644
new mode 100755
diff --git a/img/te_red_ex.png b/img/te_red_ex.png
old mode 100644
new mode 100755
diff --git a/img/te_red_redo.png b/img/te_red_redo.png
old mode 100644
new mode 100755
diff --git a/img/te_yellow_check.png b/img/te_yellow_check.png
old mode 100644
new mode 100755
diff --git a/img/te_yellow_redo.png b/img/te_yellow_redo.png
old mode 100644
new mode 100755
diff --git a/img/time.png b/img/time.png
old mode 100644
new mode 100755
diff --git a/img/tinyarrow.gif b/img/tinyarrow.gif
old mode 100644
new mode 100755
diff --git a/img/tpabs.gif b/img/tpabs.gif
old mode 100644
new mode 100755
diff --git a/img/tpcirc.gif b/img/tpcirc.gif
old mode 100644
new mode 100755
diff --git a/img/tpcirc.png b/img/tpcirc.png
old mode 100644
new mode 100755
diff --git a/img/tpcos.png b/img/tpcos.png
old mode 100644
new mode 100755
diff --git a/img/tpdot.gif b/img/tpdot.gif
old mode 100644
new mode 100755
diff --git a/img/tpellipse.png b/img/tpellipse.png
old mode 100644
new mode 100755
diff --git a/img/tpexp.png b/img/tpexp.png
old mode 100644
new mode 100755
diff --git a/img/tphorizhyper.png b/img/tphorizhyper.png
old mode 100644
new mode 100755
diff --git a/img/tphorizparab.png b/img/tphorizparab.png
old mode 100644
new mode 100755
diff --git a/img/tpineq.gif b/img/tpineq.gif
old mode 100644
new mode 100755
diff --git a/img/tpineqdash.gif b/img/tpineqdash.gif
old mode 100644
new mode 100755
diff --git a/img/tpineqparab.gif b/img/tpineqparab.gif
old mode 100644
new mode 100755
diff --git a/img/tpineqparabdash.gif b/img/tpineqparabdash.gif
old mode 100644
new mode 100755
diff --git a/img/tpline.gif b/img/tpline.gif
old mode 100644
new mode 100755
diff --git a/img/tpline2.gif b/img/tpline2.gif
old mode 100644
new mode 100755
diff --git a/img/tpline3.gif b/img/tpline3.gif
old mode 100644
new mode 100755
diff --git a/img/tplog.png b/img/tplog.png
old mode 100644
new mode 100755
diff --git a/img/tpodot.gif b/img/tpodot.gif
old mode 100644
new mode 100755
diff --git a/img/tpparab.gif b/img/tpparab.gif
old mode 100644
new mode 100755
diff --git a/img/tpparab.png b/img/tpparab.png
old mode 100644
new mode 100755
diff --git a/img/tprat.png b/img/tprat.png
old mode 100644
new mode 100755
diff --git a/img/tpsin.png b/img/tpsin.png
old mode 100644
new mode 100755
diff --git a/img/tpsqrt.png b/img/tpsqrt.png
old mode 100644
new mode 100755
diff --git a/img/tpvec.gif b/img/tpvec.gif
old mode 100644
new mode 100755
diff --git a/img/tpverthyper.png b/img/tpverthyper.png
old mode 100644
new mode 100755
diff --git a/img/typing.jpg b/img/typing.jpg
old mode 100644
new mode 100755
diff --git a/img/updating.gif b/img/updating.gif
old mode 100644
new mode 100755
diff --git a/img/uppointer.gif b/img/uppointer.gif
old mode 100644
new mode 100755
diff --git a/img/video.png b/img/video.png
old mode 100644
new mode 100755
diff --git a/img/video_tiny.png b/img/video_tiny.png
old mode 100644
new mode 100755
diff --git a/img/video_tiny_no.png b/img/video_tiny_no.png
old mode 100644
new mode 100755
diff --git a/img/vidicons.png b/img/vidicons.png
old mode 100644
new mode 100755
diff --git a/img/web.png b/img/web.png
old mode 100644
new mode 100755
diff --git a/img/wiki.png b/img/wiki.png
old mode 100644
new mode 100755
diff --git a/img/wiki_tiny.png b/img/wiki_tiny.png
old mode 100644
new mode 100755
diff --git a/img/xls.png b/img/xls.png
old mode 100644
new mode 100755
diff --git a/img/ychk.gif b/img/ychk.gif
old mode 100644
new mode 100755
diff --git a/img/zip.png b/img/zip.png
old mode 100644
new mode 100755
diff --git a/includes/AWSSNSutil.php b/includes/AWSSNSutil.php
old mode 100644
new mode 100755
diff --git a/includes/DEutil.php b/includes/DEutil.php
old mode 100644
new mode 100755
diff --git a/includes/FCM.php b/includes/FCM.php
old mode 100644
new mode 100755
diff --git a/includes/JSON.php b/includes/JSON.php
old mode 100644
new mode 100755
diff --git a/includes/JWT.php b/includes/JWT.php
old mode 100644
new mode 100755
diff --git a/includes/OAuth.php b/includes/OAuth.php
old mode 100644
new mode 100755
diff --git a/includes/S3.php b/includes/S3.php
old mode 100644
new mode 100755
diff --git a/includes/calendardata.php b/includes/calendardata.php
old mode 100644
new mode 100755
diff --git a/includes/calendardisp.php b/includes/calendardisp.php
old mode 100644
new mode 100755
diff --git a/includes/copyiteminc.php b/includes/copyiteminc.php
old mode 100644
new mode 100755
index 014524a8f0..581c5558ba
--- a/includes/copyiteminc.php
+++ b/includes/copyiteminc.php
@@ -225,7 +225,7 @@ function copyitem($itemid,$gbcats=false,$sethidden=false) {
//$query = "INSERT INTO imas_assessments (courseid,name,summary,intro,startdate,enddate,timelimit,displaymethod,defpoints,defattempts,deffeedback,defpenalty,shuffle) ";
//$query .= "SELECT '$cid',name,summary,intro,startdate,enddate,timelimit,displaymethod,defpoints,defattempts,deffeedback,defpenalty,shuffle FROM imas_assessments WHERE id='$typeid'";
//mysql_query($query) or die("Query failed : $query" . mysql_error());
- $stm = $DBH->prepare("SELECT name,summary,intro,startdate,enddate,reviewdate,LPcutoff,timelimit,minscore,displaymethod,defpoints,defattempts,deffeedback,defpenalty,shuffle,gbcategory,password,cntingb,showcat,showhints,showtips,allowlate,exceptionpenalty,noprint,avail,groupmax,isgroup,groupsetid,endmsg,deffeedbacktext,eqnhelper,caltag,calrtag,tutoredit,posttoforum,msgtoinstr,istutorial,viddata,reqscore,reqscoreaid,reqscoretype,ancestors,defoutcome,posttoforum,ptsposs,extrefs FROM imas_assessments WHERE id=:id");
+ $stm = $DBH->prepare("SELECT name,summary,intro,startdate,enddate,reviewdate,LPcutoff,timelimit,minscore,displaymethod,defpoints,defattempts,deffeedback,defpenalty,shuffle,gbcategory,password,cntingb,showcat,showhints,showtips,allowlate,exceptionpenalty,noprint,avail,groupmax,isgroup,groupsetid,endmsg,deffeedbacktext,eqnhelper,caltag,calrtag,tutoredit,posttoforum,msgtoinstr,istutorial,viddata,reqscore,reqscoreaid,reqscoretype,ancestors,defoutcome,posttoforum,ptsposs,extrefs,justintimeorder FROM imas_assessments WHERE id=:id");
$stm->execute(array(':id'=>$typeid));
$row = $stm->fetch(PDO::FETCH_ASSOC);
if ($row['ptsposs']==-1) {
@@ -311,6 +311,7 @@ function copyitem($itemid,$gbcats=false,$sethidden=false) {
$stm = $DBH->prepare("SELECT itemorder FROM imas_assessments WHERE id=:id");
$stm->execute(array(':id'=>$typeid));
$itemorder = $stm->fetchColumn(0);
+ $justintimeorder = $row['justintimeorder'];
if (trim($itemorder)!='') {
$flat = preg_replace('/\d+\|\d+~/','',$itemorder);
$flat = str_replace('~',',',$itemorder);
@@ -407,9 +408,25 @@ function copyitem($itemid,$gbcats=false,$sethidden=false) {
}
}
}
+ //print_r($aitems);
+ //print_r($newaitems);
+ //JIT addition for assignment copying (c) Ondrej Zjevik
+ // Update items ID for JIT display
+ //$justintimeorder = $row['justintimeorder'];
+ if($justintimeorder != ""){
+ for($i = 0; $i < count($aitems); $i++){
+ $id_old = $aitems[$i];
+ $id_new = $newaitems[$i];
+ $justintimeorder = str_replace('"id":'.$id_old.',"','"id":'.$id_new.',"',$justintimeorder);
+ $justintimeorder = str_replace(':'.$id_old.':',':'.$id_new.':',$justintimeorder);
+ $justintimeorder = str_replace('?id='.$id_old.'&','?id='.$id_new.'&',$justintimeorder);
+ $justintimeorder = str_replace(';qid='.$id_old.'&',';qid='.$id_new.'&',$justintimeorder);
+ }
+ }
+
$newitemorder = implode(',',$newaitems);
- $stm = $DBH->prepare("UPDATE imas_assessments SET itemorder=:itemorder WHERE id=:id");
- $stm->execute(array(':itemorder'=>$newitemorder, ':id'=>$newtypeid));
+ $stm = $DBH->prepare("UPDATE imas_assessments SET itemorder=:itemorder,justintimeorder=:justintimeorder WHERE id=:id");
+ $stm->execute(array(':itemorder'=>$newitemorder,':justintimeorder'=>$justintimeorder, ':id'=>$newtypeid));
//Temporary: force recalculation of points possible on copying,
// to fix any lingering buggy ptsposs values
//if ($needToUpdatePtsPoss) {
diff --git a/includes/coursecopylist.php b/includes/coursecopylist.php
old mode 100644
new mode 100755
diff --git a/includes/diff.php b/includes/diff.php
old mode 100644
new mode 100755
diff --git a/includes/email.php b/includes/email.php
old mode 100644
new mode 100755
diff --git a/includes/exceptionfuncs.php b/includes/exceptionfuncs.php
old mode 100644
new mode 100755
diff --git a/includes/filehandler.php b/includes/filehandler.php
old mode 100644
new mode 100755
diff --git a/includes/htmLawed.php b/includes/htmLawed.php
old mode 100644
new mode 100755
diff --git a/includes/htmlutil.php b/includes/htmlutil.php
old mode 100644
new mode 100755
diff --git a/includes/loaditemshowdata.php b/includes/loaditemshowdata.php
old mode 100644
new mode 100755
diff --git a/includes/ltioauthstore.php b/includes/ltioauthstore.php
old mode 100644
new mode 100755
diff --git a/includes/ltioutcomes.php b/includes/ltioutcomes.php
old mode 100644
new mode 100755
diff --git a/includes/mailses.php b/includes/mailses.php
old mode 100644
new mode 100755
diff --git a/includes/newusercommon.php b/includes/newusercommon.php
old mode 100644
new mode 100755
diff --git a/includes/parsedatetime.php b/includes/parsedatetime.php
old mode 100644
new mode 100755
diff --git a/includes/password.php b/includes/password.php
old mode 100644
new mode 100755
diff --git a/includes/report-commonstu-funcs.php b/includes/report-commonstu-funcs.php
old mode 100644
new mode 100755
diff --git a/includes/rubric.php b/includes/rubric.php
old mode 100644
new mode 100755
diff --git a/includes/safeunserialize.php b/includes/safeunserialize.php
old mode 100644
new mode 100755
diff --git a/includes/sanitize.php b/includes/sanitize.php
old mode 100644
new mode 100755
diff --git a/includes/session.php b/includes/session.php
old mode 100644
new mode 100755
diff --git a/includes/stugroups.php b/includes/stugroups.php
old mode 100644
new mode 100755
diff --git a/includes/tar.class.php b/includes/tar.class.php
old mode 100644
new mode 100755
diff --git a/includes/unenroll.php b/includes/unenroll.php
old mode 100644
new mode 100755
diff --git a/includes/updateassess.php b/includes/updateassess.php
old mode 100644
new mode 100755
diff --git a/includes/updateptsposs.php b/includes/updateptsposs.php
old mode 100644
new mode 100755
diff --git a/includes/userpics.php b/includes/userpics.php
old mode 100644
new mode 100755
diff --git a/includes/userprefs.php b/includes/userprefs.php
old mode 100644
new mode 100755
diff --git a/includes/userutils.php b/includes/userutils.php
old mode 100644
new mode 100755
diff --git a/index.php b/index.php
old mode 100644
new mode 100755
diff --git a/info/answerimgs/103.gif b/info/answerimgs/103.gif
old mode 100644
new mode 100755
diff --git a/info/answerimgs/12.gif b/info/answerimgs/12.gif
old mode 100644
new mode 100755
diff --git a/info/answerimgs/1oxtxp1.gif b/info/answerimgs/1oxtxp1.gif
old mode 100644
new mode 100755
diff --git a/info/answerimgs/23.gif b/info/answerimgs/23.gif
old mode 100644
new mode 100755
diff --git a/info/answerimgs/24.gif b/info/answerimgs/24.gif
old mode 100644
new mode 100755
diff --git a/info/answerimgs/2o5m3.gif b/info/answerimgs/2o5m3.gif
old mode 100644
new mode 100755
diff --git a/info/answerimgs/2pxo3mx.gif b/info/answerimgs/2pxo3mx.gif
old mode 100644
new mode 100755
diff --git a/info/answerimgs/3s.gif b/info/answerimgs/3s.gif
old mode 100644
new mode 100755
diff --git a/info/answerimgs/3txp7.gif b/info/answerimgs/3txp7.gif
old mode 100644
new mode 100755
diff --git a/info/answerimgs/513.gif b/info/answerimgs/513.gif
old mode 100644
new mode 100755
diff --git a/info/answerimgs/53x.gif b/info/answerimgs/53x.gif
old mode 100644
new mode 100755
diff --git a/info/answerimgs/arcsinx.gif b/info/answerimgs/arcsinx.gif
old mode 100644
new mode 100755
diff --git a/info/answerimgs/arctan1.gif b/info/answerimgs/arctan1.gif
old mode 100644
new mode 100755
diff --git a/info/answerimgs/f1.gif b/info/answerimgs/f1.gif
old mode 100644
new mode 100755
diff --git a/info/answerimgs/f2.gif b/info/answerimgs/f2.gif
old mode 100644
new mode 100755
diff --git a/info/answerimgs/f3.gif b/info/answerimgs/f3.gif
old mode 100644
new mode 100755
diff --git a/info/answerimgs/lnoln.gif b/info/answerimgs/lnoln.gif
old mode 100644
new mode 100755
diff --git a/info/answerimgs/log100.gif b/info/answerimgs/log100.gif
old mode 100644
new mode 100755
diff --git a/info/answerimgs/m3xs.gif b/info/answerimgs/m3xs.gif
old mode 100644
new mode 100755
diff --git a/info/answerimgs/s4.gif b/info/answerimgs/s4.gif
old mode 100644
new mode 100755
diff --git a/info/answerimgs/sinpi.gif b/info/answerimgs/sinpi.gif
old mode 100644
new mode 100755
diff --git a/info/answerimgs/sinpio3x.gif b/info/answerimgs/sinpio3x.gif
old mode 100644
new mode 100755
diff --git a/info/answerimgs/sxm5.gif b/info/answerimgs/sxm5.gif
old mode 100644
new mode 100755
diff --git a/info/enteringanswers.php b/info/enteringanswers.php
old mode 100644
new mode 100755
diff --git a/infoheader.php.dist b/infoheader.php.dist
old mode 100644
new mode 100755
diff --git a/infopages.css b/infopages.css
old mode 100644
new mode 100755
diff --git a/init.php b/init.php
old mode 100644
new mode 100755
diff --git a/init_without_validate.php b/init_without_validate.php
old mode 100644
new mode 100755
diff --git a/install.php b/install.php
old mode 100644
new mode 100755
diff --git a/installexamples.php b/installexamples.php
old mode 100644
new mode 100755
diff --git a/javascript/._jquery.nestable.js b/javascript/._jquery.nestable.js
new file mode 100755
index 0000000000..66d5b91bc1
Binary files /dev/null and b/javascript/._jquery.nestable.js differ
diff --git a/javascript/3dviewer.js b/javascript/3dviewer.js
old mode 100644
new mode 100755
diff --git a/javascript/AMhelpers.js b/javascript/AMhelpers.js
old mode 100644
new mode 100755
diff --git a/javascript/AMtoMQ.js b/javascript/AMtoMQ.js
old mode 100644
new mode 100755
diff --git a/javascript/ASCIIMathML.js b/javascript/ASCIIMathML.js
old mode 100644
new mode 100755
diff --git a/javascript/ASCIIMathML_min.js b/javascript/ASCIIMathML_min.js
old mode 100644
new mode 100755
diff --git a/javascript/ASCIIMathMLwFallback.js b/javascript/ASCIIMathMLwFallback.js
old mode 100644
new mode 100755
diff --git a/javascript/ASCIIMathTeXImg.js b/javascript/ASCIIMathTeXImg.js
old mode 100644
new mode 100755
diff --git a/javascript/ASCIIMathTeXImg_min.js b/javascript/ASCIIMathTeXImg_min.js
old mode 100644
new mode 100755
diff --git a/javascript/ASCIIsvg.js b/javascript/ASCIIsvg.js
old mode 100644
new mode 100755
diff --git a/javascript/ASCIIsvg_min.js b/javascript/ASCIIsvg_min.js
old mode 100644
new mode 100755
diff --git a/javascript/CalendarPopup.js b/javascript/CalendarPopup.js
old mode 100644
new mode 100755
diff --git a/javascript/ColorPicker2.js b/javascript/ColorPicker2.js
old mode 100644
new mode 100755
diff --git a/javascript/DatePicker.js b/javascript/DatePicker.js
old mode 100644
new mode 100755
diff --git a/javascript/MQbundle_min.js b/javascript/MQbundle_min.js
old mode 100644
new mode 100755
diff --git a/javascript/a11ytree.js b/javascript/a11ytree.js
old mode 100644
new mode 100755
diff --git a/javascript/addgrades.js b/javascript/addgrades.js
old mode 100644
new mode 100755
diff --git a/javascript/addqsort.js b/javascript/addqsort.js
old mode 100644
new mode 100755
diff --git a/javascript/addqsortJIT.js b/javascript/addqsortJIT.js
new file mode 100755
index 0000000000..7bda350256
--- /dev/null
+++ b/javascript/addqsortJIT.js
@@ -0,0 +1,1538 @@
+//IMathAS: Utility JS for reordering addquestions existing questions
+//(c) 2007 IMathAS/WAMAP Project
+//Must be predefined:
+//beentaken, defpoints
+//itemarray: array
+// item: array ( questionid, questionsetid, description, type, points, canedit ,withdrawn )
+// group: array (pick n, without (0) or with (1) replacement, array of items)
+
+//output submitted via AHAH is new assessment itemorder in form:
+// item,item,n|w/wo~item~item,item
+
+//Modified by Ondrej Zjevik 2018
+
+$(document).ready(function() {
+ $(window).on("beforeunload", function() {
+ if (anyEditorIsDirty()) {
+ //This message might not ever be displayed
+ return "There are unsaved changes in a question intro text box. Press Leave Page to discard those changes and continue with the most recent action. Press Stay on Page to return to the page without taking any action.";
+ }
+ });
+
+ //attach handler to Edit/Collapse buttons and all that are created in
+ // future calls to generateTable()
+ $(document).on("click", ".text-segment-button", function(e) {
+ handleClickTextSegmentButton(e);
+ });
+ $(window).on("scroll", function() {
+ $(".text-segment-button").each(function(index, element) {
+ followButtonLocation("#" + element.id);
+ });
+ });
+});
+
+//find position for collapse button in the middle of the visible editor
+// selector is the selector for the button
+function followButtonLocation(selector) {
+ var i = getIndexForSelector(selector);
+ var type = getTypeForSelector(selector);
+ //text segment which corresponds to this button
+ var text_segment_id = "#textseg" + type + i;
+
+ if ($(text_segment_id).hasClass("collapsingsemaphore")) {
+ //don't start any animations that could complete after the
+ // current collapsing animation completes (race condition)
+ return;
+ }
+
+ //if the editor is collapsed or is a global button, don't do anything
+ if (i === undefined || type === "global" ||
+ $(text_segment_id).hasClass("collapsed") ||
+ $(text_segment_id).hasClass("collapsedheader")) {
+ return;
+ }
+ var button_div = $(selector).parent();
+ var $window = $(window);
+ var container = button_div.parent();
+ var hasfocus = (container.children(".mce-edit-focus").length > 0);
+ var container_height = container.height();
+ //If the editor uses a significant portion of the page, have
+ // the collapse button stay in view
+ //if (container_height >= 0.3 * $window.height() ) {
+ var offset = button_div.position();
+ var sidebar_height = button_div.height();
+ var foffset = container.offset();
+ var padding = 5;
+ // find the middle of the visible portion of the editor
+ //var top_limit = Math.max($window.scrollTop(),foffset.top);
+ //var bottom_limit = Math.min($window.scrollTop() + $window.height(),
+ // foffset.top + container_height) - sidebar_height;
+ //position the button_div by its top rather than bottom
+ var initial_top = button_div.css("top");
+ button_div.css("top", initial_top);
+ button_div.css("bottom", "auto");
+ button_div.stop().animate({
+ top: Math.max(padding,
+ //Math.min((bottom_limit + top_limit)/2 - foffset.top,
+ // container_height-sidebar_height - padding) )
+ Math.min($window.scrollTop() + (hasfocus ? 60 : 0) + padding - foffset.top, container_height - sidebar_height - padding))
+ });
+ //}
+}
+
+//When the Edit/collapse button is clicked, call the appropriate function
+// with the appropriate selector.
+function handleClickTextSegmentButton(e) {
+ var i = getIndexForSelector("#" + e.currentTarget.id);
+ var type = getTypeForSelector("#" + e.currentTarget.id);
+
+ if (type === "global") {
+ var selector = ".textsegment";
+ } else {
+ var selector = "#textseg" + type + i;
+ }
+
+ //toggle expand/collapse based on title of button
+ if ($("#" + e.currentTarget.id).attr("title").match("Collapse")) {
+ collapseAndStyleTextSegment(selector);
+ } else {
+ expandAndStyleTextSegment(selector);
+ }
+}
+
+function refreshTable() {
+ tinymce.remove();
+ document.getElementById("curqtbl").innerHTML = generateTable();
+
+ updateqgrpcookie();
+ initeditor("selector", "div.textsegment", null, true /*inline*/ , editorSetup);
+ tinymce.init({
+ selector: "h4.textsegment",
+ inline: true,
+ menubar: false,
+ statusbar: false,
+ branding: false,
+ plugins: ["charmap"],
+ toolbar: "charmap saveclose",
+ setup: editorSetup
+ });
+ activateLastEditorIfBlank();
+ $(".dropdown-toggle").dropdown();
+ $("#curqtbl input").off('keydown.doblur').on('keydown.doblur', function(e) {
+ if (e.which == 13) {
+ e.preventDefault();
+ $(this).blur();
+ }
+ });
+ $("[id^=pts],[id^=grppts],#defpts").off('blur.pts').on('blur.pts', updatePts);
+ if (usingASCIIMath) {
+ rendermathnode(document.getElementById("curqtbl"));
+ }
+
+ //Set nestable
+ $('.dd3').nestable({
+ includeContent: true,
+ contentNodeName: 'div',
+ listClass: 'dd-list',
+ itemClass: 'dd-item dd3-item',
+ handleClass: 'dd-handle dd3-handle',
+ contentClass: 'dd3-content',
+ maxDepth: 10
+ });
+ $('.dd3').on('change', function() {
+ //console.log($('.dd').nestable('serialize'));
+ if (confirm_textseg_dirty()) {
+ //Change order of elements in itemarray
+ itemarray_old = itemarray;
+ itemarray_old_dic = {};
+ itemarray = [];
+ itemarray_old.forEach(function(element) {
+ if (Number.isInteger(element[0])) {
+ itemarray_old_dic[element[0]] = element;
+ } else {
+ itemarray_old_dic[htmlEntities(element[1])] = element;
+ }
+ })
+ nestableArrayOrder = $('.dd3').nestable('toArray');
+ for (i = 0; i < nestableArrayOrder.length; i++) {
+ item = nestableArrayOrder[i];
+ key = Number.isInteger(item.id) ? item.id : htmlEntities(item.id);
+ itemarray.push(itemarray_old_dic[key]);
+ }
+
+ submitChanges();
+ }
+ });
+
+ //Correct parent <-> child relations from justintimeorder
+ var childID = [];
+ var originalIDs = [];
+ var textIDs = {};
+ var parentList = [];
+ //remove child elements from displayed list
+ function getChildID(element) {
+ if (!Number.isInteger(element.id)) {
+ textIDs[element.id] = $("li[data-id='" + element.id + "']")[0];
+ }
+ if (element.children) {
+ element.children.forEach(function(child) {
+ childID.push(child.id);
+ if (!parentList.includes(this.id))
+ parentList.push(this.id);
+ getChildID(child);
+ }, element)
+ }
+ }
+ justintimeorder.forEach(function(el) {
+ getChildID(el);
+ })
+ $('.dd3').nestable('serialize').forEach(function(el) {
+ originalIDs.push(el.id)
+ })
+ childID.forEach(function(id) {
+ $('.dd3').nestable('remove', id);
+ })
+
+ //replace displayed list's elements from justintimeorder
+ justintimeorder.forEach(function(el) {
+ if (originalIDs.includes(el.id) && Number.isInteger(el.id) && parentList.includes(el.id)) {
+ $('.dd3').nestable('replace', el);
+ }
+ })
+ //replace text items with original item
+ Object.keys(textIDs).forEach(function(key) {
+ $("li[data-id='" + key + "']").replaceWith(textIDs[key]);
+ })
+
+ //Nestable checkbox correction hack
+ $(".dd3-content input[type='checkbox']").each(function(i, el) {
+ //console.log(el);
+ el.id = "qc" + i;
+ el.value = i + el.value.substr(el.value.indexOf(":"));
+ })
+ $(".dd3-content input[type='checkbox']").on('change', function() {
+ event.stopPropagation();
+ })
+}
+
+//Show the editor toolbar on a newly created text segment
+function activateLastEditorIfBlank() {
+ last_editor = tinymce.editors[tinymce.editors.length - 1];
+ if (last_editor !== undefined && last_editor.getContent() == "") {
+ tinyMCE.setActive(last_editor);
+ last_editor.fire("focus");
+ last_editor.selection.setCursorLocation();
+ }
+}
+
+//this is called by tinycme during initialization
+function editorSetup(editor) {
+ var i = this.id.match(/[0-9]+$/)[0];
+ editor.addButton('saveclose', {
+ text: "Save All",
+ title: "Save All",
+ icon: 'save',
+ //icon: "shrink2 mce-i-addquestions-ico",
+ classes: "dim saveclose saveclose" + i, // "mce-dim" and "mce-saveclose0"
+ //disabled: true,
+ onclick: function() {
+ highlightSaveButton(false);
+ savetextseg(); //Save all text segments
+ },
+ onPostRender: function() {
+ updateSaveButtonDimming();
+ }
+ });
+ editor.on("dirty", function() {
+ updateSaveButtonDimming();
+ });
+ editor.on("focus", function() {
+ var i = this.id.match(/[0-9]+$/)[0];
+ var type = getTypeForSelector("#" + this.id);
+ var max_height = $("#" + this.id).css("max-height");
+ //if the editor is collapsed, expand it
+ if (max_height !== undefined && max_height !== "none") {
+ expandAndStyleTextSegment("#textseg" + type + i);
+ }
+ });
+ $(".textsegment").on("mouseleave focusout", function(e) {
+ highlightSaveButton(true);
+ });
+ $(".textsegment").on("mouseenter click", function(e) {
+ //if rentering the active editor, un-highlight
+ if (tinymce.activeEditor &&
+ tinymce.activeEditor.id === e.currentTarget.id) {
+ highlightSaveButton(false);
+ }
+ });
+}
+
+//Highlight all Save All buttons when the mouse leaves an editor
+function highlightSaveButton(leaving) {
+ if (anyEditorIsDirty()) {
+ var i = tinymce.activeEditor.id.match(/[0-9]+$/)[0];
+ if (leaving) {
+ $("div.mce-saveclose" + i).css("transition", "background-color 0s")
+ .addClass("highlightbackground");
+ } else {
+ $("div.mce-saveclose" + i).css("transition", "background-color 1s ease-out")
+ .removeClass("highlightbackground");
+ }
+ }
+}
+
+//If any editor is dirty, undim the Save All button and
+// highlight that editor
+function updateSaveButtonDimming(dim) {
+ var save_buttons = $("div.mce-saveclose");
+ if (tinyMCE.activeEditor && tinyMCE.activeEditor.isDirty()) {
+ $("div.mce-saveclose").removeClass("mce-dim");
+ //update tinymce data structure in case other editors haven't
+ // been activated
+ for (index in tinymce.editors) {
+ var editor = tinymce.editors[index];
+ editor.buttons['saveclose'].classes =
+ editor.buttons['saveclose'].classes.replace(/dim ?/g, "");
+ //could switch save to collapse icon
+ var editor_id = tinymce.activeEditor.id;
+ $("#" + editor_id).css("transition", "border 0s")
+ .removeClass("intro")
+ .parent().addClass("highlightborder");
+ }
+ var i = getIndexForSelector("#" + tinymce.activeEditor.id);
+ var type = getTypeForSelector("#" + tinymce.activeEditor.id);
+ $("#edit-button" + type + i).fadeOut();
+ //$("#edit-buttonglobal").fadeOut();
+ $("#collapse-buttonglobal").fadeOut();
+ }
+ //TODO if tinyMCE's undo is correctly reflected in isDirty(), we could
+ // re-dim the Save All button after checking all editors
+}
+
+function expandAndStyleTextSegment(selector) {
+ var i = getIndexForSelector(selector);
+ var type = getTypeForSelector(selector);
+
+ $(selector).each(function(index, element) {
+ expandTextSegment("#" + element.id);
+ });
+ //$("#collapsedtextfade"+i).removeClass("collapsedtextfade");
+
+ //change the exit/collapse button for the corresponding editor
+ if (i === undefined || type === "global") {
+ //expand all
+ //$("#edit-buttonglobal").attr("title","Collapse All");
+ //$("#edit-button-spanglobal").removeClass("icon-pencil")
+ // .addClass("icon-shrink2");
+ $("span.text-segment-icon").removeClass("icon-pencil")
+ .addClass("icon-shrink2");
+ $(".text-segment-button:not(.text-segment-button-global)").attr("title", "Collapse");
+ } else {
+ var editor = getEditorForSelector(selector);
+ if (editor !== undefined && editor.isDirty()) {
+ $("#edit-button" + type + i).fadeOut();
+ }
+ $("#edit-button" + type + i).attr("title", "Collapse");
+ $("#edit-button-span" + type + i).removeClass("icon-pencil")
+ .addClass("icon-shrink2");
+ }
+}
+
+function collapseAndStyleTextSegment(selector) {
+ var i = getIndexForSelector(selector);
+ var type = getTypeForSelector(selector);
+
+ if (i !== undefined) {
+ //Deactivate the editor
+ tinymce.editors["textseg" + type + i].fire("focusout");
+ }
+
+ collapseTextSegment(selector);
+ //$("#collapsedtextfade"+i).removeClass("collapsedtextfade");
+
+ //toggle the button
+ if (i === undefined || type === "global") {
+ //collapse all
+ //$(".text-segment-button").attr("title","Expand and Edit");
+ //$("#edit-buttonglobal").attr("title","Expand All");
+ //this is sudden but better than letting the button
+ // float out of the editor (poss: use jQueryUI .removeClass(...,200) )
+ $(".text-segment-button:not(.text-segment-button-global)").parent().css({
+ top: "",
+ bottom: ""
+ })
+ $(".text-segment-button:not(.text-segment-button-global)").attr("title", "Expand and Edit");
+
+ $("span.text-segment-icon").removeClass("icon-shrink2")
+ .removeClass("icon-enlarge2")
+ .addClass("icon-pencil");
+ //$("#edit-button-spanglobal").removeClass("icon-shrink2")
+ // .removeClass("icon-pencil")
+ // .addClass("icon-enlarge2");
+ } else {
+ $("#edit-button" + type + i).attr("title", "Expand and Edit");
+ $("#edit-button" + type + i).parent().css({
+ top: "",
+ bottom: ""
+ });
+ $("#edit-button-span" + type + i).removeClass("icon-shrink2")
+ .addClass("icon-pencil");
+ }
+}
+
+//adjust the height/width smoothly (could replace with jquery-ui)
+function expandTextSegment(selector) {
+ var type = getTypeForSelector(selector);
+ //copy max-height/max-width to height/width temporarily
+ var max_height = $(selector).css("max-height");
+ var max_width = parseInt($(selector).css("max-width"));
+
+ //temporarily override the max-height/max-width from class style
+ //Note: broswer doesn't reflow yet-- happens during .animate()
+ $(selector).css("max-height", "none");
+ $(selector).css("max-width", "none");
+
+ //remove wrapping for correct height measurement
+ $(selector).css("white-space", "normal");
+
+ //Get the unconstrained height/width of the div
+ var natural_height = parseInt($(selector).css("height"));
+ var natural_width = parseInt($(selector).css("width"));
+ $(selector).css("height", max_height);
+ $(selector).css("width", max_width);
+
+ //TODO while expanding, also gradually move collapse button to
+ // middle height and avoid race condition
+
+ //smoothly set the height to the natural height
+ $(selector).closest(".dd3-content").animate({
+ height: natural_height + 60
+ }, 200);
+ $(selector).animate({
+ height: natural_height,
+ width: natural_width
+ }, 200, function() {
+
+ // when complete...
+ var i = getIndexForSelector(selector);
+ var type = getTypeForSelector(selector);
+
+ //when animation completes...
+ // remove temporary width/max-width and other styles
+ $(selector).css("height", "");
+ $(selector).css("width", "");
+ $(selector).css("max-width", "");
+ $(selector).css("max-height", "");
+
+ $(selector).removeClass("collapsed" + type);
+ $(selector).css("white-space", "");
+
+ //ensure the collapse button is visible
+ followButtonLocation("#edit-button" + type + i);
+
+ //If a single editor was expanded, activate the editor
+ //TODO remember whether this was a global expand
+ // if available, also scroll to keep global button fixed
+ var i = getIndexForSelector(selector);
+ var type = getTypeForSelector(selector);
+ if (i !== undefined && type !== "global") {
+ $("#textseg" + type + i).focus();
+ }
+ });
+}
+
+function collapseTextSegment(selector) {
+ var i = getIndexForSelector(selector);
+ var type = getTypeForSelector(selector);
+ var collapsed_height = "1.7em"; //must match .collapsed style
+ if (i === undefined || type === "global") {
+ var button = $("#edit-buttonglobal");
+ } else {
+ var button = $("#edit-button" + type + i);
+ }
+ var initialdistfromtop = button.offset().top - $(window).scrollTop();
+ $(selector).addClass("collapsingsemaphore");
+
+ //smoothly set the height to the collapsed height
+ $(selector).closest(".dd3-content").animate({
+ height: 30
+ }, 200);
+ $(selector).animate({
+ height: collapsed_height
+ }, 200, function() {
+
+ //when animation completes, set max-height
+ $(selector).css("max-height", collapsed_height);
+ $(selector).css("height", "");
+ $(selector).removeClass("collapsingsemaphore")
+ .addClass("collapsed" + type);
+ //could this be gradual?
+ $(window).scrollTop(button.offset().top - initialdistfromtop);
+
+ if (i === undefined || type === "global") {
+ $(".text-segment-button").parent().css({
+ "top": "",
+ "bottom": ""
+ });
+ $(".text-segment-button").each(function(index, element) {
+ followButtonLocation("#" + element.id);
+ });
+ }
+ });
+}
+
+function getIndexForSelector(selector) {
+ var match = selector.match(/[0-9]+$/);
+ if (match) {
+ var i = match[0];
+ }
+ //return undefined if the selector doesn't end with a digit
+ return i;
+}
+
+//returns "header" if the selector contains "header"
+// can be used to find a corresponding class name
+// e.g. textsegesheader3 -> edit-buttonheader3
+function getTypeForSelector(selector) {
+ if (selector.match("global")) {
+ var type = "global";
+ } else if (selector.match("header")) {
+ var type = "header";
+ } else {
+ var type = "";
+ }
+ return type;
+}
+
+//translates a selector to the corresponding editor if possible
+function getEditorForSelector(selector) {
+ var i = getIndexForSelector(selector);
+ var type = getTypeForSelector(selector);
+
+ if (i !== undefined && i.length > 0) {
+ var editor = tinymce.editors["textseg" + type + i];
+ }
+ //return undefined if the selector didn't end in a digit
+ return editor;
+}
+
+function anyEditorIsDirty() {
+ var any_dirty = false;
+ for (index in tinymce.editors) {
+ if (tinymce.editors[index].isDirty()) {
+ any_dirty = true;
+ break;
+ }
+ }
+ return any_dirty;
+}
+
+function generateMoveSelect2(num) {
+ var thisistxt = (itemarray[num][0] == "text");
+ num++; //adjust indexing
+ var sel = "
";
+ var qcnt = 1;
+ var tcnt = 1;
+ var curistxt = false;
+ for (var i = 1; i <= itemarray.length; i++) {
+ curistxt = (itemarray[i - 1][0] == "text");
+ sel += "Text" + tcnt + " ";
+ } else if (itemarray[i - 1].length < 5 && itemarray[i - 1][0] > 1) {
+ sel += ">Q" + qcnt + "-" + (qcnt + itemarray[i - 1][0] - 1) + "";
+ } else {
+ sel += ">Q" + qcnt + "";
+ }
+
+ if (!curistxt) {
+ if (itemarray[i - 1].length < 5) { //is group
+ qcnt += parseInt(itemarray[i - 1][0]); //itemarray[i-1][2].length;
+ } else {
+ qcnt++;
+ }
+ } else {
+ tcnt++;
+ }
+ /*
+ curistxt = (itemarray[i-1][0]=="text");
+ if (thisistxt) { //moveselect for text item
+ sel += "Text"+tcnt+" ";
+ } else {
+ if (i==itemarray.length) {
+ sel += ">End";
+ } else {
+ sel += ">Q"+qcnt+"";
+ }
+ }
+ } else if (!curistxt) { //if moveselect for question, skip text items
+ sel += "Q"+qcnt+"-"+(qcnt+itemarray[i-1][2].length-1)+" ";
+ } else {
+ sel += ">Q"+qcnt+"";
+ }
+ }
+ if (!curistxt) {
+ if (itemarray[i-1].length<5) { //is group
+ qcnt += itemarray[i-1][2].length;
+ } else {
+ qcnt++;
+ }
+ } else {
+ tcnt++;
+ }
+ */
+ }
+ sel += " ";
+ return sel;
+}
+
+function generateMoveSelect(num, itemarray) {
+ num++; //adjust indexing
+ var sel = "
";
+ for (var i = 1; i <= cnt; i++) {
+ sel += "" + i + " ";
+ }
+ sel += " ";
+ return sel;
+}
+
+function generateShowforSelect(num) {
+ var n = 0,
+ i = num;
+ if (i > 0 && itemarray[i - 1][0] == "text") { //no select unless first in list
+ return '';
+ }
+ while (i < itemarray.length && itemarray[i][0] == "text") {
+ i++;
+ }
+ while (i < itemarray.length && itemarray[i][0] != "text") {
+ if (itemarray[i].length < 5) { //is group
+ n += itemarray[i][0]; //pick n from group
+ } else {
+ n++;
+ }
+ i++;
+ }
+ if (!(5 in itemarray[num])) {
+ itemarray[num][5] = 0;
+ }
+ if (n == 0) {
+ return '';
+ } else {
+ out = 'Show for
';
+ for (j = 1; j <= n; j++) {
+ out += '' + j + " ";
+ }
+ out += ' ';
+ if (itemarray[num][2] > 1) {
+ out += '
';
+ out += 'Closed after 1st ';
+ out += 'Expanded for all ';
+ }
+ return out;
+ }
+}
+
+function moveitem2(from) {
+ if (!confirm_textseg_dirty()) {
+ //if aborted restore the original value and don't save
+ document.getElementById(from).value = from;
+ } else {
+ var todo = 0; //document.getElementById("group").value;
+ var to = document.getElementById(from).value;
+ var tomove = itemarray.splice(from - 1, 1);
+ if (todo == 0) { //rearrange
+ itemarray.splice(to - 1, 0, tomove[0]);
+ } else if (todo == 1) { //group
+ if (from < to) {
+ to--;
+ }
+ if (itemarray[to - 1].length < 5) { //to is already group
+ if (tomove[0].length < 5) { //if grouping a group
+ for (var j = 0; j < tomove[0][2].length; j++) {
+ itemarray[to - 1][2].push(tomove[0][2][j]);
+ }
+ } else {
+ itemarray[to - 1][2].push(tomove[0]);
+ }
+ } else { //to is not group
+ var existing = itemarray[to - 1];
+ if (tomove[0].length < 5) { //if grouping a group
+ tomove[0][2].push(existing);
+ itemarray[to - 1] = tomove[0];
+ } else {
+ itemarray[to - 1] = [1, 0, [existing, tomove[0]], 1];
+ }
+ }
+ }
+ submitChanges();
+ }
+ return false;
+}
+
+function ungroupitem(from) {
+ if (confirm_textseg_dirty()) {
+ locparts = from.split("-");
+ var tomove = itemarray[locparts[0]][2].splice(locparts[1], 1);
+ if (itemarray[locparts[0]][2].length == 1) {
+ itemarray[locparts[0]] = itemarray[locparts[0]][2][0];
+ }
+ itemarray.splice(++locparts[0], 0, tomove[0]);
+ submitChanges();
+ }
+ return false;
+}
+
+function removeitem(loc) {
+ if (loc.indexOf("-") > -1 || itemarray[loc][0] != 'text') {
+ var msg = _("Are you sure you want to remove this question?");
+ } else {
+ var msg = _("Are you sure you want to remove this text segment?");
+ }
+ if (confirm(msg)) {
+ if (confirm_textseg_dirty()) {
+ doremoveitem(loc);
+ submitChanges();
+ }
+ }
+ return false;
+}
+
+function removegrp(loc) {
+ if (confirm(_("Are you sure you want to remove ALL questions in this group?"))) {
+ if (confirm_textseg_dirty()) {
+ doremoveitem(loc);
+ submitChanges();
+ }
+ }
+ return false;
+}
+
+function doremoveitem(loc) {
+ if (loc.indexOf("-") > -1) {
+ locparts = loc.split("-");
+ if (itemarray[locparts[0]].length < 5) { //usual
+ itemarray[locparts[0]][2].splice(locparts[1], 1);
+ if (itemarray[locparts[0]][2].length == 1) {
+ itemarray[locparts[0]] = itemarray[locparts[0]][2][0];
+ }
+ } else { //group already removed
+ itemarray.splice(locparts[0], 1);
+ }
+ } else {
+ itemarray.splice(loc, 1);
+ }
+}
+
+function removeSelected() {
+ if (confirm(_("Are you sure you want to remove these questions?"))) {
+ if (confirm_textseg_dirty()) {
+ var form = document.getElementById("curqform");
+ var chgcnt = 0;
+ var removeIDs = [];
+ for (var e = form.elements.length - 1; e > -1; e--) {
+ var el = form.elements[e];
+ if (el.type == 'checkbox' && el.checked && el.value != 'ignore' && el.id.match("qc")) {
+ removeIDs.push($(el).closest("li").attr("data-id"));
+ val = el.value.split(":");
+ doremoveitem(val[0]);
+ chgcnt++;
+ }
+ }
+ removeIDs.forEach(function(el) {
+ $('.dd3').nestable('remove', el)
+ })
+ if (chgcnt > 0) {
+ submitChanges();
+ }
+ }
+ }
+}
+
+function groupSelected() {
+ if (!confirm_textseg_dirty()) {
+ return; //user wants to abort this call
+ }
+ var grplist = new Array;
+ var form = document.getElementById("curqform");
+ var grppoints = 0;
+ for (var e = form.elements.length - 1; e > -1; e--) {
+ var el = form.elements[e];
+ if (el.type == 'checkbox' && el.checked && el.value != 'ignore' && !el.value.match(":text") && el.id.match("qc")) {
+ val = el.value.split(":")[0];
+ if (val.indexOf("-") > -1) { //is group
+ val = val.split("-")[0];
+ grppoints = itemarray[val][2][0][4]; //point values from first in group
+ } else {
+
+ }
+ isnew = true;
+ for (i = 0; i < grplist.length; i++) {
+ if (grplist[i] == val) {
+ isnew = false;
+ }
+ }
+ if (isnew) {
+ grplist.push(val);
+ }
+ }
+ }
+ if (grplist.length < 2) {
+ $("#curqtbl input[type=checkbox]").prop("checked", false);
+ return;
+ }
+ var to = grplist[grplist.length - 1];
+ var existingcnt = 0;
+ if (itemarray[to].length < 5) { //moving to existing group
+ existingcnt = itemarray[to][2].length;
+ if (grppoints == 0) {
+ grppoints = itemarray[to][2][0][4]; //point values from first in group
+ }
+ } else {
+ var existing = itemarray[to];
+ if (grppoints == 0) {
+ grppoints = existing[4]; //point values from this question
+ }
+ itemarray[to] = [1, 0, [existing], 1];
+ existingcnt = 1;
+ }
+ for (i = 0; i < grplist.length - 1; i++) { //going from last in current to first in current
+ tomove = itemarray.splice(grplist[i], 1);
+ if (tomove[0].length < 5) { //if grouping a group
+ for (var j = 0; j < tomove[0][2].length; j++) {
+ //itemarray[to][2].push(tomove[0][2][j]);
+ itemarray[to][2].splice(existingcnt + j, 0, tomove[0][2][j]);
+ }
+ } else {
+ //itemarray[to][2].push(tomove[0]);
+ itemarray[to][2].splice(existingcnt, 0, tomove[0]);
+ }
+ }
+ for (i = 0; i < itemarray[to][2].length; i++) {
+ itemarray[to][2][i][4] = grppoints;
+ }
+ submitChanges();
+}
+
+function updatePts() {
+ if (!confirm_textseg_dirty()) {
+ $("[id^=pts-],[id^=grppts],#defpts").each(function() {
+ $(this).val($(this).attr("data-lastval"));
+ });
+ } else {
+ var newdefpts = Math.round($("#defpts").val());
+ var olddefpts = $("#defpts").attr("data-lastval");
+ if (newdefpts == "" || newdefpts <= 0) {
+ newdefpts = olddefpts;
+ $("#defpts").val(olddefpts);
+ }
+ var qparts, curval;
+ $("[id^=pts-]").each(function() {
+ qparts = $(this).attr("id").split('-');
+ curval = $(this).val().replace(/\s/g, '');
+ if (curval == "" || !curval.match(/^\d+$/) || 1.0 * curval < 0) {
+ curval = $(this).attr("data-lastval");
+ }
+ if (newdefpts != olddefpts && curval == olddefpts) {
+ //update pts to match new default
+ curval = newdefpts;
+ }
+ itemarray[qparts[1]][4] = (curval == newdefpts) ? 9999 : curval;
+ });
+ $("[id^=grppts-]").each(function() {
+ qparts = $(this).attr("id").split('-');
+ curval = $(this).val().replace(/\s/g, '');
+ if (curval == "" || !curval.match(/^\d+$/) || 1.0 * curval < 0) {
+ curval = $(this).attr("data-lastval");
+ }
+ if (newdefpts != olddefpts && curval == olddefpts) {
+ //update pts to match new default
+ curval = newdefpts;
+ }
+ for (var i = 0; i < itemarray[qparts[1]][2].length; i++) {
+ itemarray[qparts[1]][2][i][4] = (curval == newdefpts) ? 9999 : curval;
+ }
+ });
+ submitChanges();
+ }
+}
+
+function updateGrpN(num, old_num) {
+ if (!confirm_textseg_dirty()) {
+ //if aborted, restore old value
+ $("#grpn" + num).val(old_num);
+ } else {
+ var nval = Math.floor(document.getElementById("grpn" + num).value * 1);
+ if (nval < 1 || isNaN(nval)) {
+ nval = 1;
+ }
+ document.getElementById("grpn" + num).value = nval;
+ if (nval != itemarray[num][0]) {
+ itemarray[num][0] = nval;
+ submitChanges();
+ }
+ }
+}
+
+function updateGrpT(num, old_type) {
+
+ if (!confirm_textseg_dirty()) {
+ //if aborted, restore old value
+ $("#grptype" + num).val(old_type);
+ } else if (document.getElementById("grptype" + num).value != itemarray[num][1]) {
+ itemarray[num][1] = document.getElementById("grptype" + num).value;
+ submitChanges();
+ }
+
+}
+
+function confirmclearattempts() {
+ return confirm(_("Are you sure you want to clear all attempts on this question?"));
+}
+
+
+function edittextseg(i) {
+ tinyMCE.get("textseg" + i).setContent(itemarray[i][1]);
+
+ if (itemarray[i][3] == 1) {
+ tinyMCE.get("textsegheader" + i).setContent(itemarray[i][4]);
+ }
+}
+
+function savetextseg(i) {
+ var any_dirty = false;
+ for (index in tinymce.editors) {
+ var editor = tinymce.editors[index];
+ if (editor.isDirty()) {
+ var i = editor.id.match(/[0-9]+$/)[0];
+ var i = getIndexForSelector("#" + editor.id);
+ var type = getTypeForSelector("#" + editor.id);
+ if (type === "") {
+ itemarray[i][1] = editor.getContent();
+ any_dirty = true;
+ } else if (editor.id.match("textsegheader")) {
+ itemarray[i][4] = strip_tags(editor.getContent());
+ any_dirty = true;
+ }
+ }
+ }
+ if (any_dirty) {
+ tinymce.activeEditor.hide();
+ submitChanges();
+ }
+}
+
+function updateTextShowN(i, old_i) {
+ if (!confirm_textseg_dirty()) {
+ //if aborted, restore old value
+ $("#showforn" + i).val(old_i);
+ } else {
+ itemarray[i][2] = $("#showforn" + i).val();
+ submitChanges();
+ }
+}
+
+function updateTextShowNType(i, old_i) {
+ if (!confirm_textseg_dirty()) {
+ //if aborted, restore old value
+ $("#showforntype" + i).val(old_i);
+ } else {
+ itemarray[i][5] = $("#showforntype" + i).val() * 1;
+ submitChanges();
+ }
+}
+
+function chgpagetitle(i) {
+ if (!confirm_textseg_dirty()) {
+ //if aborted, toggle back to previous state
+ $("#ispagetitle" + i).prop("checked", !$("#ispagetitle" + i).prop("checked"));
+ } else {
+ if ($("#ispagetitle" + i).is(":checked")) {
+ itemarray[i][3] = 1;
+ if (itemarray[i][4] == "") {
+ var words = strip_tags(itemarray[i][1]).split(/\s+/);
+ if (words.length > 2) {
+ itemarray[i][4] = words.slice(0, 3).join(" ");
+ } else {
+ itemarray[i][4] = "Page title (click to edit)";
+ }
+ }
+ } else {
+ itemarray[i][3] = 0;
+ }
+ submitChanges();
+ }
+}
+
+function strip_tags(txt) {
+ //return $("
").html(txt).text();
+ return txt.replace(/<[^>]+>/gi, ' ').replace(/^\s+/, '').replace(/\s+$/, '');
+}
+/*
+function updateTextseg(i) {
+ itemarray[i][1] = $("#textseg"+i).val();
+}
+*/
+
+function generateOutput() {
+ var out = '';
+ var text_segments = [];
+ var pts = {};
+ var qcnt = 0;
+ for (var i = 0; i < itemarray.length; i++) {
+ if (itemarray[i][0] == 'text') { //is text item
+ //itemarray[i] is ['text',text,displayforN]
+ text_segments.push({
+ "displayBefore": qcnt,
+ "displayUntil": qcnt + itemarray[i][2] - 1,
+ "text": itemarray[i][1],
+ "ispage": itemarray[i][3],
+ "pagetitle": itemarray[i][4],
+ "forntype": itemarray[i][5]
+ });
+ } else if (itemarray[i].length < 5) { //is group
+ if (out.length > 0) {
+ out += ',';
+ }
+ out += itemarray[i][0] + '|' + itemarray[i][1];
+ for (var j = 0; j < itemarray[i][2].length; j++) {
+ out += '~' + itemarray[i][2][j][0];
+ pts["qn" + itemarray[i][2][j][0]] = itemarray[i][2][j][4];
+ }
+ qcnt += itemarray[i][0];
+ } else {
+ if (out.length > 0) {
+ out += ',';
+ }
+ out += itemarray[i][0];
+ pts["qn" + itemarray[i][0]] = itemarray[i][4];
+ qcnt++;
+ }
+ }
+ return [out, text_segments, pts];
+}
+
+function collapseqgrp(i) {
+ itemarray[i][3] = 0;
+ updateqgrpcookie();
+ refreshTable();
+}
+
+function expandqgrp(i) {
+ itemarray[i][3] = 1;
+ updateqgrpcookie();
+ refreshTable();
+}
+
+function updateqgrpcookie() {
+ var closegrp = [];
+ for (var i = 0; i < itemarray.length; i++) {
+ if (itemarray[i].length < 5) { //is group
+ if (itemarray[i][3] == 0) {
+ closegrp.push(i);
+ }
+ }
+ }
+ document.cookie = 'closeqgrp-' + curaid + '=' + closegrp.join(',');
+}
+
+
+function generateTable() {
+ olditemarray = itemarray;
+ itemcount = itemarray.length;
+ var alt = 0;
+ var ln = 0;
+ var pttotal = 0;
+ var html = '';
+ var totalcols = 10;
+
+ html += "
";
+ if (!beentaken) {
+ html += "
";
+ }
+ html += "
Order
";
+ //return "
["+this.getCollapseExpandSymbol()+" ] ";
+ html += "
Description";
+ html += "
ID
Preview
Type
Avg Time
";
+ html += "
Points";
+ if (!beentaken) {
+ html += "Default: ";
+ }
+ html += "
";
+ 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 += "
";
+ } else {
+ html += "
";
+ }
+ html += '
';
+ }
+ //html += ms;
+ if (curisgroup) {
+ html += "
Group ";
+ html += "Select from group of " + curitems.length;
+ html += " Without With replacement";
+ html += "
";
+ 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 += " ";
+ 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 += "
";
+ }
+ var contents = curitems[j][1];
+ html += "
" + contents + "
"; //description
+ html += "
";
+ html += '
';
+ html += ' New page
';
+ } else {
+ var contents = curitems[j][1];
+ html += "
"; //description
+ html += "
" + contents + "
";
+ 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] & 1) == 1) {
+ var showicons = "";
+ var altadd = "";
+ } else {
+ var showicons = "_no";
+ var altadd = " disabled";
+ }
+ if ((curitems[j][7] & 4) == 4) {
+ html += '
';
+ }
+ if ((curitems[j][7] & 2) == 2) {
+ html += '
';
+ }
+ if ((curitems[j][7] & 8) == 8) {
+ html += '
';
+ }
+ 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 += '
Text';
+ if (text_segment_count > 1) {
+ html += "
";
+ html += "
";
+ }
+ html += '
';
+ 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: '
Expand ',
+ collapseBtnHTML: '
Collapse ',
+ 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 += '' + options.listNodeName + '>';
+
+ 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 += '' + options.handleNodeName + '>';
+ html += '<' + options.contentNodeName + ' class="' + options.contentClass + '">';
+ html += content;
+ html += '' + options.contentNodeName + '>';
+ html += children;
+ html += '' + options.itemNodeName + '>';
+
+ 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