Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kumir2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
kumir
kumir2
Commits
dcdb27b2
Commit
dcdb27b2
authored
Sep 03, 2013
by
Denis Khachko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resent tasks.
parent
9df1ac1b
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
44 additions
and
2 deletions
+44
-2
src/plugins/coursemanager/coursemanager_plugin.cpp
src/plugins/coursemanager/coursemanager_plugin.cpp
+5
-0
src/plugins/coursemanager/coursemanager_plugin.h
src/plugins/coursemanager/coursemanager_plugin.h
+3
-2
src/plugins/coursemanager/task/mainwindow.cpp
src/plugins/coursemanager/task/mainwindow.cpp
+35
-0
src/plugins/coursemanager/task/mainwindow.h
src/plugins/coursemanager/task/mainwindow.h
+1
-0
No files found.
src/plugins/coursemanager/coursemanager_plugin.cpp
View file @
dcdb27b2
...
...
@@ -134,6 +134,7 @@ void Plugin::selectNext(KumZadanie* task)
actor
->
loadActorData
(
field_data
);
}
}
void
Plugin
::
checkNext
(
KumZadanie
*
task
)
{
...
...
@@ -141,6 +142,10 @@ void Plugin::checkNext(KumZadanie* task)
selectNext
(
task
);
gui
->
startTesting
();
};
void
Plugin
::
loadCource
(
QString
file
)
{
MW
->
loadCourseFromFile
(
file
);
}
void
Plugin
::
startProgram
(
QVariant
param
,
KumZadanie
*
task
)
{
field_no
=
0
;
...
...
src/plugins/coursemanager/coursemanager_plugin.h
View file @
dcdb27b2
...
...
@@ -39,9 +39,9 @@ public:
{
mainWindow
()
->
showNormal
();
}
inline
void
activateCourseFromList
(
QString
file
)
{
Q_UNUSED
(
file
);
}
inline
void
activateCourseFromList
(
QString
file
)
{
loadCource
(
file
);
}
inline
QStringList
getListOfCourses
()
const
{
return
mySettings
()
->
value
(
"Courses/LastFiles"
,
""
).
toString
().
split
(
";"
);
return
mySettings
()
->
value
(
"Courses/LastFiles"
,
""
).
toString
().
split
(
";"
,
QString
::
SkipEmptyParts
);
}
public
slots
:
void
setEnabled
(
bool
value
);
...
...
@@ -60,6 +60,7 @@ private /*methods*/:
void
updateSettings
(
const
QStringList
&
keys
);
private
/*fields*/
:
void
loadCource
(
QString
file
);
AI
*
getActor
(
QString
name
);
QWidget
*
mainWindow_
;
QAction
*
actionPerformCheck_
;
...
...
src/plugins/coursemanager/task/mainwindow.cpp
View file @
dcdb27b2
...
...
@@ -222,7 +222,42 @@ for(int i=0;i<prgElListT.count();i++)
};
};
void
MainWindowTask
::
loadCourseFromFile
(
const
QString
&
file
)
{
QFileInfo
fi
(
file
);
if
(
!
fi
.
exists
())
{
return
;
};
baseKursFile
=
fi
;
curDir
=
fi
.
absolutePath
();
settings
->
setValue
(
"Directories/Kurs"
,
curDir
);
qDebug
()
<<
"curDir"
<<
curDir
;
QString
fileName
=
file
;
progChange
.
clear
();
if
(
fileName
.
right
(
9
)
==
".work.xml"
)
//Загрузка оценок и программ
{
loadMarks
(
fileName
);
this
->
show
();
return
;
}
else
cursWorkFile
.
setFileName
(
""
);
loadCourseData
(
fileName
);
QString
cText
=
course
->
courceDescr
();
if
(
cText
.
right
(
4
)
==
".htm"
||
cText
.
right
(
5
)
==
".html"
)
{
loadHtml
(
cText
);
}
else
ui
->
webView
->
setHtml
(
cText
);
// if(isTeacher)ui->actionEdit->setEnabled(true);
setWindowTitle
(
course
->
name
()
+
trUtf8
(
" - Практикум"
));
updateLastFiles
(
fileName
);
interface
->
lockContrls
();
ui
->
checkTask
->
setEnabled
(
false
);
this
->
show
();
};
void
MainWindowTask
::
loadCourse
()
{
...
...
src/plugins/coursemanager/task/mainwindow.h
View file @
dcdb27b2
...
...
@@ -92,6 +92,7 @@ public slots:
void
aboutToQuit
();
void
loadCourse
();
void
loadCourseFromFile
(
const
QString
&
file
);
void
returnTested
();
void
saveCourse
();
void
saveCourseFile
();
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment