Skip to content

Commit

Permalink
dark out
Browse files Browse the repository at this point in the history
  • Loading branch information
kevincharles committed Mar 31, 2023
1 parent 1d81fc9 commit 041c902
Show file tree
Hide file tree
Showing 220 changed files with 251 additions and 227 deletions.
14 changes: 11 additions & 3 deletions dist/api/createPortfolioActivity.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
$pageDoenetId .
'"],"assignedCid":null,"draftCid":null,"itemWeights": [1],"files":[]}';
$imagePath = '/activity_default.jpg';
$learningOutcomes = '';
// $learningOutcomes = '';
$isPublic = '0';

$sql = "SELECT sortOrder
Expand All @@ -98,11 +98,19 @@
$sql = "
INSERT INTO course_content
(type,courseId,doenetId,parentDoenetId,label,creationDate,isPublic,
sortOrder,jsonDefinition,imagePath,learningOutcomes)
sortOrder,jsonDefinition,imagePath)
VALUES
('activity','$portfolioCourseId','$doenetId','$portfolioCourseId','$label',CONVERT_TZ(NOW(), @@session.time_zone, '+00:00'),'$isPublic',
'$sortOrder','$jsonDefinition','$imagePath','$learningOutcomes')
'$sortOrder','$jsonDefinition','$imagePath')
";
// $sql = "
// INSERT INTO course_content
// (type,courseId,doenetId,parentDoenetId,label,creationDate,isPublic,
// sortOrder,jsonDefinition,imagePath,learningOutcomes)
// VALUES
// ('activity','$portfolioCourseId','$doenetId','$portfolioCourseId','$label',CONVERT_TZ(NOW(), @@session.time_zone, '+00:00'),'$isPublic',
// '$sortOrder','$jsonDefinition','$imagePath','$learningOutcomes')
// ";

$conn->query($sql);

Expand Down
14 changes: 11 additions & 3 deletions dist/api/getPortfolioActivityData.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
'doenetId' => $doenetId,
'imagePath' => '/activity_default.jpg',
'label' => '',
'learningOutcomes' => '',
// 'learningOutcomes' => '',
'public' => false, //default to private
'isNew' => true,
'pageDoenetId' => $pageDoenetId,
Expand Down Expand Up @@ -78,10 +78,18 @@
}
//Assume we are updating the activity and need the current settings
if ($success) {
// $sql = "
// SELECT imagePath,
// label,
// learningOutcomes,
// isPublic
// FROM course_content
// WHERE doenetId='$doenetId'
// AND courseId = (SELECT courseId FROM course WHERE portfolioCourseForUserId = '$userId')
// ";
$sql = "
SELECT imagePath,
label,
learningOutcomes,
isPublic
FROM course_content
WHERE doenetId='$doenetId'
Expand All @@ -95,7 +103,7 @@
'doenetId' => $doenetId,
'imagePath' => $row['imagePath'],
'label' => $row['label'],
'learningOutcomes' => $row['learningOutcomes'],
// 'learningOutcomes' => $row['learningOutcomes'],
'public' => $row['isPublic'],
'isNew' => false,
'pageDoenetId' => $pageDoenetId,
Expand Down
20 changes: 14 additions & 6 deletions dist/api/updatePortfolioActivitySettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
$label = mysqli_real_escape_string($conn, $_POST['label']);
$imagePath = mysqli_real_escape_string($conn, $_POST['imagePath']);
$public = mysqli_real_escape_string($conn, $_POST['public']);
$learningOutcomes = mysqli_real_escape_string(
$conn,
$_POST['learningOutcomes']
);
// $learningOutcomes = mysqli_real_escape_string(
// $conn,
// $_POST['learningOutcomes']
// );

$isPublic = '0';
if ($public) {
Expand Down Expand Up @@ -88,12 +88,20 @@
}

if ($success) {
// $sql = "
// UPDATE course_content
// SET label = '$label',
// imagePath = '$imagePath',
// isPublic = '$isPublic',
// learningOutcomes = '$learningOutcomes'
// WHERE doenetId = '$doenetId'
// AND courseId = '$portfolioCourseId'
// ";
$sql = "
UPDATE course_content
SET label = '$label',
imagePath = '$imagePath',
isPublic = '$isPublic',
learningOutcomes = '$learningOutcomes'
isPublic = '$isPublic'
WHERE doenetId = '$doenetId'
AND courseId = '$portfolioCourseId'
";
Expand Down
32 changes: 16 additions & 16 deletions dist/api/upload.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,22 +33,22 @@

//Test if user has permission to upload files

$canUpload = false;
$sql = "
SELECT canUpload
FROM user
WHERE userId = '$userId'
";
$result = $conn->query($sql);
$row = $result->fetch_assoc();
if ($row['canUpload'] == '1') {
$canUpload = true;
}

if (!$canUpload) {
$success = false;
$msg = "You don't have permission to upload files.";
}
// $canUpload = false;
// $sql = "
// SELECT canUpload
// FROM user
// WHERE userId = '$userId'
// ";
// $result = $conn->query($sql);
// $row = $result->fetch_assoc();
// if ($row['canUpload'] == '1') {
// $canUpload = true;
// }

// if (!$canUpload) {
// $success = false;
// $msg = "You don't have permission to upload files.";
// }

//Test if user has space to upload files
if ($success) {
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import{j as o,F as h,a as u,s as d}from"./index-f703603d.js";const c=d.button`
import{j as o,F as h,a as u,s as d}from"./index-6c514841.js";const c=d.button`
margin: ${e=>e.theme.margin};
height: 24px;
width: ${e=>e.width};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import{s as r,aw as l,j as a,F as f,a as m,ax as p}from"./index-f703603d.js";const h=r.div`
import{s as r,aw as l,j as a,F as f,a as m,ax as p}from"./index-6c514841.js";const h=r.div`
/* margin-left: 3px; */
display: ${e=>e.vertical?"static":"flex"};
overflow: auto;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion dist/assets/AssignmentBreadCrumb-8e3f908a.js

This file was deleted.

1 change: 1 addition & 0 deletions dist/assets/AssignmentBreadCrumb-d3753dea.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 041c902

Please sign in to comment.