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 ManageReports from './manage_reports/views/ManageReports';
|
||||
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';
|
||||
|
||||
|
|
@ -54,9 +52,6 @@ const AdminRoutes = () => {
|
|||
<Route path="learning-progress/c/:progressId" element={<ClassProgress />} />
|
||||
<Route path="report" element={<ManageReports />} />
|
||||
<Route path="profile" element={<Setting />} />
|
||||
|
||||
|
||||
<Route path="review/s/:stdLearning" element={<Review />} />
|
||||
</Route>
|
||||
|
||||
{/* <Route path="*" element={<NotFound/>} />
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ const AdminDashboard = () => {
|
|||
<Table hover>
|
||||
<thead>
|
||||
<tr>
|
||||
<th className='text-start'>Full Name</th>
|
||||
<th>Full Name</th>
|
||||
<th className='text-center'>Class</th>
|
||||
<th>Topic</th>
|
||||
<th>Level</th>
|
||||
|
|
@ -70,13 +70,13 @@ const AdminDashboard = () => {
|
|||
activity.length > 0?(
|
||||
activity.map((data, 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>{data.NAME_TOPIC}</td>
|
||||
<td>{data.NAME_LEVEL}</td>
|
||||
<td className='text-center'>{data.SCORE}</td>
|
||||
<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>
|
||||
</tr>
|
||||
))
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ const UpdateExercises = () => {
|
|||
</Button>
|
||||
<Breadcrumb className='custom-breadcrumb'>
|
||||
<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>
|
||||
</Col>
|
||||
|
|
|
|||
|
|
@ -187,7 +187,7 @@ const ManageProgress = () => {
|
|||
out of {data.TOTAL_STUDENT} students
|
||||
</>
|
||||
):(
|
||||
`${data.STUDENTS} students`
|
||||
`${data.TOTAL_STUDENT} students`
|
||||
)}
|
||||
</Card.Text>
|
||||
{/* <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 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 = () => {
|
||||
return (
|
||||
<div className='bg-white landing-page'>
|
||||
|
|
@ -114,7 +110,7 @@ const Home = () => {
|
|||
</Col>
|
||||
<Col md={6} className='col-12'>
|
||||
<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='me-3'>
|
||||
<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>
|
||||
<h6>Personalized Learning.</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>
|
||||
<h6>Feugiat varius imperdiet ultrices pretium.</h6>
|
||||
<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 className="p-3 mb-3 rounded-3 shadow shadow-sm d-flex">
|
||||
|
|
@ -133,8 +129,8 @@ const Home = () => {
|
|||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h6>Time Efficiency.</h6>
|
||||
<p className='text-secondary fs-7 m-0'>Learn faster and more effectively by focusing on the material you really need.</p>
|
||||
<h6>Feugiat varius imperdiet ultrices pretium.</h6>
|
||||
<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 className="p-3 mb-3 rounded-3 shadow shadow-sm d-flex">
|
||||
|
|
@ -144,8 +140,8 @@ const Home = () => {
|
|||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h6>Increased Motivation.</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>
|
||||
<h6>Feugiat varius imperdiet ultrices pretium.</h6>
|
||||
<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>
|
||||
</Col>
|
||||
|
|
@ -182,8 +178,7 @@ const Home = () => {
|
|||
<Row>
|
||||
<Col md={6} className='col-12 pe-5'>
|
||||
<div>
|
||||
{/* <h4>SEALS</h4> */}
|
||||
<img src={logo} alt="" className='mb-2'/>
|
||||
<h4>SEALS</h4>
|
||||
<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 className='mt-5 d-flex justify-content-between align-items-end'>
|
||||
|
|
@ -237,14 +232,12 @@ const Home = () => {
|
|||
Number Office 22/2/5
|
||||
</p>
|
||||
</div>
|
||||
<div className='d-flex justify-content-center align-items-center'>
|
||||
{/* <h6>Languages</h6>
|
||||
<div>
|
||||
<h6>Languages</h6>
|
||||
<ButtonGroup size='sm' aria-label="Basic example">
|
||||
<Button variant="ts" className='text-white'>ENG</Button>
|
||||
<Button variant="ts" className='text-white'>IND</Button>
|
||||
</ButtonGroup> */}
|
||||
<img src={polinema} alt="" style={{height:"70px"}} className='me-3'/>
|
||||
<img src={pis} alt="" style={{height:"55px"}}/>
|
||||
</ButtonGroup>
|
||||
</div>
|
||||
</div>
|
||||
</Col>
|
||||
|
|
|
|||
|
|
@ -62,7 +62,7 @@ const fetchDataClassProgress = async (dataId, search, sort, page, limit) => {
|
|||
|
||||
const postFeedback = async (id, feedback) => {
|
||||
try {
|
||||
const response = await axiosInstance.post(`/monitoring/feedback/${id}`, {feedback});
|
||||
const response = await axiosInstance.post(`/monitoring/feedback/${id}`, feedback);
|
||||
return response.data;
|
||||
} catch (error) {
|
||||
console.error('Error post feedback:', error);
|
||||
|
|
|
|||
|
|
@ -152,7 +152,7 @@ const StudentFeedback = () => {
|
|||
{successFeedback?(
|
||||
<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>
|
||||
<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>
|
||||
<Button variant="gd" className="py-2 px-5 mt-4 w-50 rounded-35" onClick={handleCloseFeedback}>Done</Button>
|
||||
</Modal.Body>
|
||||
|
|
|
|||
|
|
@ -106,9 +106,9 @@ const Dashboard = () => {
|
|||
</Button>
|
||||
</Col>
|
||||
) : (
|
||||
journey.map((data, index) => (
|
||||
journey.map(data => (
|
||||
<Card
|
||||
key={index}
|
||||
key={data.ID}
|
||||
className="flex-row p-3 mb-3 border-0 shadow shadow-sm rounded-4"
|
||||
>
|
||||
<Card.Img
|
||||
|
|
|
|||
|
|
@ -6,21 +6,12 @@ const useMaterials = (section, topic, level) => {
|
|||
const [materials, setMaterial] = useState(null);
|
||||
const [loading, setLoading] = useState(true);
|
||||
const [error, setError] = useState(null);
|
||||
const { sectionSlugMap, topicSlugMap, groupSlugMap } = useSlugContext();
|
||||
const { topicSlugMap } = useSlugContext();
|
||||
|
||||
useEffect(() => {
|
||||
const fetchData = async () => {
|
||||
try {
|
||||
const secId = sectionSlugMap[section];
|
||||
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);
|
||||
const data = await materialService.fetchMaterials(topicSlugMap[topic], level);
|
||||
setMaterial(data[0]);
|
||||
} catch (err) {
|
||||
setError(err);
|
||||
|
|
|
|||
|
|
@ -22,17 +22,6 @@ function stringToArray(str) {
|
|||
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 savedAnswer = studentAnswer !== null ? studentAnswer : null;
|
||||
const [pairs, setPairs] = useState([]);
|
||||
|
|
@ -65,12 +54,7 @@ const MatchingPairsQuestion = ({ question, studentAnswer, index }) => {
|
|||
}));
|
||||
|
||||
if (savedAnswer !== null) {
|
||||
//if use "," as separator
|
||||
// const arrSavedAnswer = stringToArray(savedAnswer);
|
||||
|
||||
//if use ">" as separator
|
||||
const arrSavedAnswer = extractAnswer(savedAnswer);
|
||||
|
||||
const arrSavedAnswer = stringToArray(savedAnswer);
|
||||
const updatedPairs = initialPairs.map((pair, index) => ({
|
||||
...pair,
|
||||
right: arrSavedAnswer[index],
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
export const API_URL = 'https://api.seals.id/api';
|
||||
export const MEDIA_URL = 'https://api.seals.id/api/uploads';
|
||||
export const API_URL = 'http://54.173.167.62/api';
|
||||
export const MEDIA_URL = 'http://54.173.167.62/api/uploads';
|
||||
|
||||
export let headerSection = 'section'
|
||||
export let headerTopic = 'topic'
|
||||
|
|
|
|||
|
|
@ -15,12 +15,8 @@ const config = {
|
|||
export const SlugProvider = ({ children, logout }) => {
|
||||
const [sectionSlugMap, setSectionSlugMap] = useState({});
|
||||
const [topicSlugMap, setTopicSlugMap] = useState({});
|
||||
const [groupSlugMap, setGroupSlugMap] = useState({});
|
||||
const [loading, setLoading] = useState(true);
|
||||
|
||||
const [sectionSuccess, setSectionSuccess] = useState(false);
|
||||
const [topicSuccess, setTopicSuccess] = useState(false);
|
||||
|
||||
const fetchData = async () => {
|
||||
try {
|
||||
const sectionMapping = {};
|
||||
|
|
@ -31,7 +27,6 @@ export const SlugProvider = ({ children, logout }) => {
|
|||
sectionMapping[slug] = section.ID_SECTION;
|
||||
});
|
||||
setSectionSlugMap(sectionMapping);
|
||||
setSectionSuccess(true);
|
||||
} catch (error) {
|
||||
if (error.status === 403 || error.status === 401) {
|
||||
logout();
|
||||
|
|
@ -48,30 +43,6 @@ export const SlugProvider = ({ children, logout }) => {
|
|||
topicMapping[slug] = topic.ID_TOPIC;
|
||||
});
|
||||
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) {
|
||||
if (error.status === 403 || error.status === 401) {
|
||||
logout();
|
||||
|
|
@ -83,7 +54,6 @@ export const SlugProvider = ({ children, logout }) => {
|
|||
setLoading(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
|
|
@ -95,7 +65,7 @@ export const SlugProvider = ({ children, logout }) => {
|
|||
}
|
||||
|
||||
return (
|
||||
<SlugContext.Provider value={{ sectionSlugMap, topicSlugMap, groupSlugMap }}>
|
||||
<SlugContext.Provider value={{ sectionSlugMap, topicSlugMap }}>
|
||||
{children}
|
||||
</SlugContext.Provider>
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user