Compare commits
No commits in common. "e0f83ca1b2ce19fb7cca77f4e2b0a89fcee8c9c7" and "3fa01af39bbe2e8e840ff0285c2c18fa462b76bd" have entirely different histories.
e0f83ca1b2
...
3fa01af39b
Binary file not shown.
|
Before Width: | Height: | Size: 2.2 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 306 KiB |
|
|
@ -22,9 +22,7 @@ import StudentProgress from './manage_progress/views/StudentProgress';
|
||||||
import ClassProgress from './manage_progress/views/ClassProgress';
|
import ClassProgress from './manage_progress/views/ClassProgress';
|
||||||
import ManageReports from './manage_reports/views/ManageReports';
|
import ManageReports from './manage_reports/views/ManageReports';
|
||||||
import Setting from './setting/views/Setting';
|
import Setting from './setting/views/Setting';
|
||||||
import Review from '../user/review/views/Review';
|
import '../../assets/styles/admin.css'
|
||||||
|
|
||||||
import '../../assets/styles/admin.css';
|
|
||||||
|
|
||||||
import ProtectedRoute from '../../utils/ProtectedRoute';
|
import ProtectedRoute from '../../utils/ProtectedRoute';
|
||||||
|
|
||||||
|
|
@ -54,9 +52,6 @@ const AdminRoutes = () => {
|
||||||
<Route path="learning-progress/c/:progressId" element={<ClassProgress />} />
|
<Route path="learning-progress/c/:progressId" element={<ClassProgress />} />
|
||||||
<Route path="report" element={<ManageReports />} />
|
<Route path="report" element={<ManageReports />} />
|
||||||
<Route path="profile" element={<Setting />} />
|
<Route path="profile" element={<Setting />} />
|
||||||
|
|
||||||
|
|
||||||
<Route path="review/s/:stdLearning" element={<Review />} />
|
|
||||||
</Route>
|
</Route>
|
||||||
|
|
||||||
{/* <Route path="*" element={<NotFound/>} />
|
{/* <Route path="*" element={<NotFound/>} />
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ const AdminDashboard = () => {
|
||||||
<Table hover>
|
<Table hover>
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th className='text-start'>Full Name</th>
|
<th>Full Name</th>
|
||||||
<th className='text-center'>Class</th>
|
<th className='text-center'>Class</th>
|
||||||
<th>Topic</th>
|
<th>Topic</th>
|
||||||
<th>Level</th>
|
<th>Level</th>
|
||||||
|
|
@ -70,13 +70,13 @@ const AdminDashboard = () => {
|
||||||
activity.length > 0?(
|
activity.length > 0?(
|
||||||
activity.map((data, index) => (
|
activity.map((data, index) => (
|
||||||
<tr key={index}>
|
<tr key={index}>
|
||||||
<td className='text-start'>{data.NAME_USERS}</td>
|
<td>{data.NAME_USERS}</td>
|
||||||
<td className='text-center'>{data.NAME_CLASS ? data.NAME_CLASS : '-'}</td>
|
<td className='text-center'>{data.NAME_CLASS ? data.NAME_CLASS : '-'}</td>
|
||||||
<td>{data.NAME_TOPIC}</td>
|
<td>{data.NAME_TOPIC}</td>
|
||||||
<td>{data.NAME_LEVEL}</td>
|
<td>{data.NAME_LEVEL}</td>
|
||||||
<td className='text-center'>{data.SCORE}</td>
|
<td className='text-center'>{data.SCORE}</td>
|
||||||
<td className='text-center action-col'>
|
<td className='text-center action-col'>
|
||||||
<Link className='btn btn-sm btn-view' to={`/admin/review/s/${data.ID_STUDENT_LEARNING}`}><i className="bi bi-eye"></i></Link>
|
<Link className='btn btn-sm btn-view' to={`s/${data.ID_STUDENT_LEARNING}`}><i className="bi bi-eye"></i></Link>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
))
|
))
|
||||||
|
|
|
||||||
|
|
@ -66,7 +66,7 @@ const UpdateExercises = () => {
|
||||||
</Button>
|
</Button>
|
||||||
<Breadcrumb className='custom-breadcrumb'>
|
<Breadcrumb className='custom-breadcrumb'>
|
||||||
<Breadcrumb.Item href="#">Learning</Breadcrumb.Item>
|
<Breadcrumb.Item href="#">Learning</Breadcrumb.Item>
|
||||||
<Breadcrumb.Item href="/admin/exercise" className='text-capitalize'>Exercise</Breadcrumb.Item>
|
<Breadcrumb.Item href="/admin/material" className='text-capitalize'>Exercise</Breadcrumb.Item>
|
||||||
<Breadcrumb.Item active>Update Exercise</Breadcrumb.Item>
|
<Breadcrumb.Item active>Update Exercise</Breadcrumb.Item>
|
||||||
</Breadcrumb>
|
</Breadcrumb>
|
||||||
</Col>
|
</Col>
|
||||||
|
|
|
||||||
|
|
@ -187,7 +187,7 @@ const ManageProgress = () => {
|
||||||
out of {data.TOTAL_STUDENT} students
|
out of {data.TOTAL_STUDENT} students
|
||||||
</>
|
</>
|
||||||
):(
|
):(
|
||||||
`${data.STUDENTS} students`
|
`${data.TOTAL_STUDENT} students`
|
||||||
)}
|
)}
|
||||||
</Card.Text>
|
</Card.Text>
|
||||||
{/* <Button as={Link} to={`c/${data.ID_CLASS}`} variant="warning" className='py-2 w-100 rounded-35'>See Details</Button> */}
|
{/* <Button as={Link} to={`c/${data.ID_CLASS}`} variant="warning" className='py-2 w-100 rounded-35'>See Details</Button> */}
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,6 @@ import Feature2 from '../../../../assets/images/feature2.png';
|
||||||
import Feature3 from '../../../../assets/images/feature3.png';
|
import Feature3 from '../../../../assets/images/feature3.png';
|
||||||
import Feature4 from '../../../../assets/images/feature4.png';
|
import Feature4 from '../../../../assets/images/feature4.png';
|
||||||
|
|
||||||
import logo from '../../../../assets/images/logo-w.png'
|
|
||||||
import polinema from '../../../../assets/images/logo-polinema.png'
|
|
||||||
import pis from '../../../../assets/images/logo-pis.png'
|
|
||||||
|
|
||||||
const Home = () => {
|
const Home = () => {
|
||||||
return (
|
return (
|
||||||
<div className='bg-white landing-page'>
|
<div className='bg-white landing-page'>
|
||||||
|
|
@ -114,7 +110,7 @@ const Home = () => {
|
||||||
</Col>
|
</Col>
|
||||||
<Col md={6} className='col-12'>
|
<Col md={6} className='col-12'>
|
||||||
<h1 className='fw-bold'>What Will You <span className='text-blue'>Get </span>?</h1>
|
<h1 className='fw-bold'>What Will You <span className='text-blue'>Get </span>?</h1>
|
||||||
<p className='text-secondary'>Reach your full potential with smart adaptive learning. Get better learning outcomes and boost your confidence.</p>
|
<p className='text-secondary'>In sem orci feugiat nibh. Rhoncus sit integer sed sit pla feugiat elementum suscipit ac ut rhoncus sit.</p>
|
||||||
<div className="p-3 mb-3 rounded-3 shadow shadow-sm d-flex">
|
<div className="p-3 mb-3 rounded-3 shadow shadow-sm d-flex">
|
||||||
<div className='me-3'>
|
<div className='me-3'>
|
||||||
<div className="bg-blue ratio-1 rounded-3 d-flex items-center" style={{width:"40px",height:"40px"}}>
|
<div className="bg-blue ratio-1 rounded-3 d-flex items-center" style={{width:"40px",height:"40px"}}>
|
||||||
|
|
@ -122,8 +118,8 @@ const Home = () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<h6>Personalized Learning.</h6>
|
<h6>Feugiat varius imperdiet ultrices pretium.</h6>
|
||||||
<p className='text-secondary fs-7 m-0'>Learning materials will automatically adjust to your level of understanding, so you won't feel too easy or too difficult.</p>
|
<p className='text-secondary fs-7 m-0'>Arcu venenatis iaculis et arcu quis sed. Sed sollicitudin nulla sagittis id et diam lobortis</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="p-3 mb-3 rounded-3 shadow shadow-sm d-flex">
|
<div className="p-3 mb-3 rounded-3 shadow shadow-sm d-flex">
|
||||||
|
|
@ -133,8 +129,8 @@ const Home = () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<h6>Time Efficiency.</h6>
|
<h6>Feugiat varius imperdiet ultrices pretium.</h6>
|
||||||
<p className='text-secondary fs-7 m-0'>Learn faster and more effectively by focusing on the material you really need.</p>
|
<p className='text-secondary fs-7 m-0'>Arcu venenatis iaculis et arcu quis sed. Sed sollicitudin nulla sagittis id et diam lobortis</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className="p-3 mb-3 rounded-3 shadow shadow-sm d-flex">
|
<div className="p-3 mb-3 rounded-3 shadow shadow-sm d-flex">
|
||||||
|
|
@ -144,8 +140,8 @@ const Home = () => {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<h6>Increased Motivation.</h6>
|
<h6>Feugiat varius imperdiet ultrices pretium.</h6>
|
||||||
<p className='text-secondary fs-7 m-0'>Feel satisfied when you reach your learning goals and see your progress in real time.</p>
|
<p className='text-secondary fs-7 m-0'>Arcu venenatis iaculis et arcu quis sed. Sed sollicitudin nulla sagittis id et diam lobortis</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Col>
|
</Col>
|
||||||
|
|
@ -182,8 +178,7 @@ const Home = () => {
|
||||||
<Row>
|
<Row>
|
||||||
<Col md={6} className='col-12 pe-5'>
|
<Col md={6} className='col-12 pe-5'>
|
||||||
<div>
|
<div>
|
||||||
{/* <h4>SEALS</h4> */}
|
<h4>SEALS</h4>
|
||||||
<img src={logo} alt="" className='mb-2'/>
|
|
||||||
<p className='text-blue-50'>The first free end-to-end analytics service for the site, designed to work with enterprises of various levels and business segments.</p>
|
<p className='text-blue-50'>The first free end-to-end analytics service for the site, designed to work with enterprises of various levels and business segments.</p>
|
||||||
</div>
|
</div>
|
||||||
<div className='mt-5 d-flex justify-content-between align-items-end'>
|
<div className='mt-5 d-flex justify-content-between align-items-end'>
|
||||||
|
|
@ -237,14 +232,12 @@ const Home = () => {
|
||||||
Number Office 22/2/5
|
Number Office 22/2/5
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div className='d-flex justify-content-center align-items-center'>
|
<div>
|
||||||
{/* <h6>Languages</h6>
|
<h6>Languages</h6>
|
||||||
<ButtonGroup size='sm' aria-label="Basic example">
|
<ButtonGroup size='sm' aria-label="Basic example">
|
||||||
<Button variant="ts" className='text-white'>ENG</Button>
|
<Button variant="ts" className='text-white'>ENG</Button>
|
||||||
<Button variant="ts" className='text-white'>IND</Button>
|
<Button variant="ts" className='text-white'>IND</Button>
|
||||||
</ButtonGroup> */}
|
</ButtonGroup>
|
||||||
<img src={polinema} alt="" style={{height:"70px"}} className='me-3'/>
|
|
||||||
<img src={pis} alt="" style={{height:"55px"}}/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</Col>
|
</Col>
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ const fetchDataClassProgress = async (dataId, search, sort, page, limit) => {
|
||||||
|
|
||||||
const postFeedback = async (id, feedback) => {
|
const postFeedback = async (id, feedback) => {
|
||||||
try {
|
try {
|
||||||
const response = await axiosInstance.post(`/monitoring/feedback/${id}`, {feedback});
|
const response = await axiosInstance.post(`/monitoring/feedback/${id}`, feedback);
|
||||||
return response.data;
|
return response.data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('Error post feedback:', error);
|
console.error('Error post feedback:', error);
|
||||||
|
|
|
||||||
|
|
@ -152,7 +152,7 @@ const StudentFeedback = () => {
|
||||||
{successFeedback?(
|
{successFeedback?(
|
||||||
<Modal.Body className='p-4 d-flex flex-column items-center'>
|
<Modal.Body className='p-4 d-flex flex-column items-center'>
|
||||||
<h4 className='mb-4 fw-bold text-dark'>Feedback <span className='text-blue'>sent</span>!</h4>
|
<h4 className='mb-4 fw-bold text-dark'>Feedback <span className='text-blue'>sent</span>!</h4>
|
||||||
<img src={successIllustration} alt="" style={{width:'20vw'}}/>
|
<img src={successIllustration} alt="" />
|
||||||
<p className='my-3 text-muted fw-light'>Thank you for letting us know. We’ll investigate the issue and work on resolving it promptly.</p>
|
<p className='my-3 text-muted fw-light'>Thank you for letting us know. We’ll investigate the issue and work on resolving it promptly.</p>
|
||||||
<Button variant="gd" className="py-2 px-5 mt-4 w-50 rounded-35" onClick={handleCloseFeedback}>Done</Button>
|
<Button variant="gd" className="py-2 px-5 mt-4 w-50 rounded-35" onClick={handleCloseFeedback}>Done</Button>
|
||||||
</Modal.Body>
|
</Modal.Body>
|
||||||
|
|
|
||||||
|
|
@ -106,9 +106,9 @@ const Dashboard = () => {
|
||||||
</Button>
|
</Button>
|
||||||
</Col>
|
</Col>
|
||||||
) : (
|
) : (
|
||||||
journey.map((data, index) => (
|
journey.map(data => (
|
||||||
<Card
|
<Card
|
||||||
key={index}
|
key={data.ID}
|
||||||
className="flex-row p-3 mb-3 border-0 shadow shadow-sm rounded-4"
|
className="flex-row p-3 mb-3 border-0 shadow shadow-sm rounded-4"
|
||||||
>
|
>
|
||||||
<Card.Img
|
<Card.Img
|
||||||
|
|
|
||||||
|
|
@ -6,21 +6,12 @@ const useMaterials = (section, topic, level) => {
|
||||||
const [materials, setMaterial] = useState(null);
|
const [materials, setMaterial] = useState(null);
|
||||||
const [loading, setLoading] = useState(true);
|
const [loading, setLoading] = useState(true);
|
||||||
const [error, setError] = useState(null);
|
const [error, setError] = useState(null);
|
||||||
const { sectionSlugMap, topicSlugMap, groupSlugMap } = useSlugContext();
|
const { topicSlugMap } = useSlugContext();
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
try {
|
try {
|
||||||
const secId = sectionSlugMap[section];
|
const data = await materialService.fetchMaterials(topicSlugMap[topic], level);
|
||||||
const findTopic = groupSlugMap[secId].find(
|
|
||||||
(item) => item.nametopic === topic
|
|
||||||
);
|
|
||||||
|
|
||||||
// console.log('slug', topicSlugMap[topic]);
|
|
||||||
// console.log('find', findTopic.idtopic);
|
|
||||||
|
|
||||||
// const data = await materialService.fetchMaterials(topicSlugMap[topic], level);
|
|
||||||
const data = await materialService.fetchMaterials(findTopic.idtopic, level);
|
|
||||||
setMaterial(data[0]);
|
setMaterial(data[0]);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
setError(err);
|
setError(err);
|
||||||
|
|
|
||||||
|
|
@ -22,17 +22,6 @@ function stringToArray(str) {
|
||||||
return str.split(', ');
|
return str.split(', ');
|
||||||
}
|
}
|
||||||
|
|
||||||
function extractAnswer(input) {
|
|
||||||
const lines = input.split('|');
|
|
||||||
|
|
||||||
const descriptions = lines.map(line => {
|
|
||||||
const parts = line.split('>');
|
|
||||||
return parts[1]?.trim();
|
|
||||||
});
|
|
||||||
|
|
||||||
return descriptions;
|
|
||||||
}
|
|
||||||
|
|
||||||
const MatchingPairsQuestion = ({ question, studentAnswer, index }) => {
|
const MatchingPairsQuestion = ({ question, studentAnswer, index }) => {
|
||||||
const savedAnswer = studentAnswer !== null ? studentAnswer : null;
|
const savedAnswer = studentAnswer !== null ? studentAnswer : null;
|
||||||
const [pairs, setPairs] = useState([]);
|
const [pairs, setPairs] = useState([]);
|
||||||
|
|
@ -65,12 +54,7 @@ const MatchingPairsQuestion = ({ question, studentAnswer, index }) => {
|
||||||
}));
|
}));
|
||||||
|
|
||||||
if (savedAnswer !== null) {
|
if (savedAnswer !== null) {
|
||||||
//if use "," as separator
|
const arrSavedAnswer = stringToArray(savedAnswer);
|
||||||
// const arrSavedAnswer = stringToArray(savedAnswer);
|
|
||||||
|
|
||||||
//if use ">" as separator
|
|
||||||
const arrSavedAnswer = extractAnswer(savedAnswer);
|
|
||||||
|
|
||||||
const updatedPairs = initialPairs.map((pair, index) => ({
|
const updatedPairs = initialPairs.map((pair, index) => ({
|
||||||
...pair,
|
...pair,
|
||||||
right: arrSavedAnswer[index],
|
right: arrSavedAnswer[index],
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
export const API_URL = 'https://api.seals.id/api';
|
export const API_URL = 'http://54.173.167.62/api';
|
||||||
export const MEDIA_URL = 'https://api.seals.id/api/uploads';
|
export const MEDIA_URL = 'http://54.173.167.62/api/uploads';
|
||||||
|
|
||||||
export let headerSection = 'section'
|
export let headerSection = 'section'
|
||||||
export let headerTopic = 'topic'
|
export let headerTopic = 'topic'
|
||||||
|
|
|
||||||
|
|
@ -15,12 +15,8 @@ const config = {
|
||||||
export const SlugProvider = ({ children, logout }) => {
|
export const SlugProvider = ({ children, logout }) => {
|
||||||
const [sectionSlugMap, setSectionSlugMap] = useState({});
|
const [sectionSlugMap, setSectionSlugMap] = useState({});
|
||||||
const [topicSlugMap, setTopicSlugMap] = useState({});
|
const [topicSlugMap, setTopicSlugMap] = useState({});
|
||||||
const [groupSlugMap, setGroupSlugMap] = useState({});
|
|
||||||
const [loading, setLoading] = useState(true);
|
const [loading, setLoading] = useState(true);
|
||||||
|
|
||||||
const [sectionSuccess, setSectionSuccess] = useState(false);
|
|
||||||
const [topicSuccess, setTopicSuccess] = useState(false);
|
|
||||||
|
|
||||||
const fetchData = async () => {
|
const fetchData = async () => {
|
||||||
try {
|
try {
|
||||||
const sectionMapping = {};
|
const sectionMapping = {};
|
||||||
|
|
@ -31,7 +27,6 @@ export const SlugProvider = ({ children, logout }) => {
|
||||||
sectionMapping[slug] = section.ID_SECTION;
|
sectionMapping[slug] = section.ID_SECTION;
|
||||||
});
|
});
|
||||||
setSectionSlugMap(sectionMapping);
|
setSectionSlugMap(sectionMapping);
|
||||||
setSectionSuccess(true);
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.status === 403 || error.status === 401) {
|
if (error.status === 403 || error.status === 401) {
|
||||||
logout();
|
logout();
|
||||||
|
|
@ -48,30 +43,6 @@ export const SlugProvider = ({ children, logout }) => {
|
||||||
topicMapping[slug] = topic.ID_TOPIC;
|
topicMapping[slug] = topic.ID_TOPIC;
|
||||||
});
|
});
|
||||||
setTopicSlugMap(topicMapping);
|
setTopicSlugMap(topicMapping);
|
||||||
setTopicSuccess(true);
|
|
||||||
} catch (error) {
|
|
||||||
if (error.status === 403 || error.status === 401) {
|
|
||||||
logout();
|
|
||||||
}else{
|
|
||||||
console.error('Error fetching section', error);
|
|
||||||
setLoading(false);
|
|
||||||
}
|
|
||||||
} finally{
|
|
||||||
try{
|
|
||||||
const groupMapping = {};
|
|
||||||
const topicResponse = await axiosInstance.get(`/topic`);
|
|
||||||
topicResponse.data.payload.forEach((topic) => {
|
|
||||||
// const slug = slugify(topic.NAME_TOPIC);
|
|
||||||
// groupMapping[slug] = topic.ID_TOPIC;
|
|
||||||
|
|
||||||
if (!groupMapping[topic.ID_SECTION]) {
|
|
||||||
groupMapping[topic.ID_SECTION] = [];
|
|
||||||
}
|
|
||||||
const idtopic = topic.ID_TOPIC;
|
|
||||||
const nametopic = slugify(topic.NAME_TOPIC);
|
|
||||||
groupMapping[topic.ID_SECTION].push({ idtopic, nametopic });
|
|
||||||
});
|
|
||||||
setGroupSlugMap(groupMapping);
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error.status === 403 || error.status === 401) {
|
if (error.status === 403 || error.status === 401) {
|
||||||
logout();
|
logout();
|
||||||
|
|
@ -83,7 +54,6 @@ export const SlugProvider = ({ children, logout }) => {
|
||||||
setLoading(false);
|
setLoading(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
@ -95,7 +65,7 @@ export const SlugProvider = ({ children, logout }) => {
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SlugContext.Provider value={{ sectionSlugMap, topicSlugMap, groupSlugMap }}>
|
<SlugContext.Provider value={{ sectionSlugMap, topicSlugMap }}>
|
||||||
{children}
|
{children}
|
||||||
</SlugContext.Provider>
|
</SlugContext.Provider>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user